spacedrive/scripts/tauri.mjs

158 lines
4.6 KiB
JavaScript
Raw Normal View History

[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
#!/usr/bin/env node
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
import * as fs from 'node:fs/promises'
import * as path from 'node:path'
import { env, exit, umask, platform } from 'node:process'
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
import { setTimeout } from 'node:timers/promises'
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
import { fileURLToPath } from 'node:url'
import * as toml from '@iarna/toml'
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
import { waitLockUnlock } from './utils/flock.mjs'
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
import { patchTauri } from './utils/patchTauri.mjs'
[ENG-1479] AI Prototype (#1845) * First draft on image labeling * Fixing execution providers for other OSs * Better error handling and shutdown * Working with shallow media processor * bruh * Fix warnings * Now hooked to media processor job * Link desktop app with libonnxruntime to avoid TLS error during startup * Be able to change models on runtime Revert to use labels table instead of tags * A bug on a model-less inference * Show AI labels on Inspector - Change yolo inference to use half precision - Add labels api to core * Remove LD_PRELOAD * Fix race condition on model executor shutdown * Don't load all images in memory moron * Embeed yolo model in prod build - Change yolo model path to new one relative to executable * Disable volume watcher on linux, it was crashing the app - Invalidate labels when they are updated * Rust fmt * Minor changes * Gate onnxruntime linking to the ai-models feature * Add build script to sd-server to handle onnxruntime linking workaround * Move AI stuff to its own crate and normalize deps * Rust fmt * Don't regenerate labels unless asked to * Now blazingly fast * Bad merge * Fix * Fix * Add backend logic to download extra yolo models * Add models api route - Add api call to get available model version - Add api call to change the model version * Improve new model download logic - Add frontend to change image labeler model * Fix new model downloader * Fix model select width * invalidate labels count after media_processor generates a new output * Rename AI crate and first draft on download notifications * fix types --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-19 09:28:57 +00:00
import { symlinkSharedLibsLinux } from './utils/shared.mjs'
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
import spawn from './utils/spawn.mjs'
if (/^(msys|mingw|cygwin)$/i.test(env.OSTYPE ?? '')) {
console.error(
'Bash for windows is not supported, please interact with this repo from Powershell or CMD'
)
exit(255)
}
// Limit file permissions
umask(0o026)
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const [_, __, ...args] = process.argv
// NOTE: Must point to package root path
const __root = path.resolve(path.join(__dirname, '..'))
// Location for desktop app
const desktopApp = path.join(__root, 'apps', 'desktop')
// Location of the native dependencies
const nativeDeps = path.join(__root, 'apps', '.deps')
// Files to be removed when script finish executing
const __cleanup = /** @type {string[]} */ ([])
const cleanUp = () => Promise.all(__cleanup.map(file => fs.unlink(file).catch(() => {})))
process.on('SIGINT', cleanUp)
// Check if file/dir exists
const exists = (/** @type {string} */ path) =>
fs
.access(path, fs.constants.R_OK)
.then(() => true)
.catch(() => false)
// Export environment variables defined in cargo.toml
const cargoConfig = await fs
.readFile(path.resolve(__root, '.cargo', 'config.toml'), { encoding: 'binary' })
.then(toml.parse)
if (cargoConfig.env && typeof cargoConfig.env === 'object')
for (const [name, value] of Object.entries(cargoConfig.env)) if (!env[name]) env[name] = value
// Default command
if (args.length === 0) args.push('build')
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
const targets = args
.filter((_, index, args) => {
if (index === 0) return false
const previous = args[index - 1]
return previous === '-t' || previous === '--target'
})
.flatMap(target => target.split(','))
const bundles = args
.filter((_, index, args) => {
if (index === 0) return false
const previous = args[index - 1]
return previous === '-b' || previous === '--bundles'
})
.flatMap(target => target.split(','))
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
let code = 0
[ENG-1479] AI Prototype (#1845) * First draft on image labeling * Fixing execution providers for other OSs * Better error handling and shutdown * Working with shallow media processor * bruh * Fix warnings * Now hooked to media processor job * Link desktop app with libonnxruntime to avoid TLS error during startup * Be able to change models on runtime Revert to use labels table instead of tags * A bug on a model-less inference * Show AI labels on Inspector - Change yolo inference to use half precision - Add labels api to core * Remove LD_PRELOAD * Fix race condition on model executor shutdown * Don't load all images in memory moron * Embeed yolo model in prod build - Change yolo model path to new one relative to executable * Disable volume watcher on linux, it was crashing the app - Invalidate labels when they are updated * Rust fmt * Minor changes * Gate onnxruntime linking to the ai-models feature * Add build script to sd-server to handle onnxruntime linking workaround * Move AI stuff to its own crate and normalize deps * Rust fmt * Don't regenerate labels unless asked to * Now blazingly fast * Bad merge * Fix * Fix * Add backend logic to download extra yolo models * Add models api route - Add api call to get available model version - Add api call to change the model version * Improve new model download logic - Add frontend to change image labeler model * Fix new model downloader * Fix model select width * invalidate labels count after media_processor generates a new output * Rename AI crate and first draft on download notifications * fix types --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-19 09:28:57 +00:00
if (process.platform === 'linux' && (args[0] === 'dev' || args[0] === 'build'))
await symlinkSharedLibsLinux(__root, nativeDeps)
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
try {
switch (args[0]) {
case 'dev': {
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
__cleanup.push(...(await patchTauri(__root, nativeDeps, targets, bundles, args)))
switch (process.platform) {
case 'linux':
[ENG-1479] AI Prototype (#1845) * First draft on image labeling * Fixing execution providers for other OSs * Better error handling and shutdown * Working with shallow media processor * bruh * Fix warnings * Now hooked to media processor job * Link desktop app with libonnxruntime to avoid TLS error during startup * Be able to change models on runtime Revert to use labels table instead of tags * A bug on a model-less inference * Show AI labels on Inspector - Change yolo inference to use half precision - Add labels api to core * Remove LD_PRELOAD * Fix race condition on model executor shutdown * Don't load all images in memory moron * Embeed yolo model in prod build - Change yolo model path to new one relative to executable * Disable volume watcher on linux, it was crashing the app - Invalidate labels when they are updated * Rust fmt * Minor changes * Gate onnxruntime linking to the ai-models feature * Add build script to sd-server to handle onnxruntime linking workaround * Move AI stuff to its own crate and normalize deps * Rust fmt * Don't regenerate labels unless asked to * Now blazingly fast * Bad merge * Fix * Fix * Add backend logic to download extra yolo models * Add models api route - Add api call to get available model version - Add api call to change the model version * Improve new model download logic - Add frontend to change image labeler model * Fix new model downloader * Fix model select width * invalidate labels count after media_processor generates a new output * Rename AI crate and first draft on download notifications * fix types --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-19 09:28:57 +00:00
case 'darwin':
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
void waitLockUnlock(path.join(__root, 'target', 'debug', '.cargo-lock')).then(
() => setTimeout(1000).then(cleanUp),
() => {}
)
break
}
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
break
}
case 'build': {
if (!env.NODE_OPTIONS || !env.NODE_OPTIONS.includes('--max_old_space_size')) {
env.NODE_OPTIONS = `--max_old_space_size=4096 ${env.NODE_OPTIONS ?? ''}`
}
env.GENERATE_SOURCEMAP = 'false'
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
__cleanup.push(...(await patchTauri(__root, nativeDeps, targets, bundles, args)))
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
if (process.platform === 'darwin') {
// Configure DMG background
env.BACKGROUND_FILE = path.resolve(desktopApp, 'src-tauri', 'dmg-background.png')
env.BACKGROUND_FILE_NAME = path.basename(env.BACKGROUND_FILE)
env.BACKGROUND_CLAUSE = `set background picture of opts to file ".background:${env.BACKGROUND_FILE_NAME}"`
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
if (!(await exists(env.BACKGROUND_FILE)))
console.warn(
`WARNING: DMG background file not found at ${env.BACKGROUND_FILE}`
)
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
break
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
}
}
}
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
await spawn('pnpm', ['exec', 'tauri', ...args], desktopApp)
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
if (args[0] === 'build' && bundles.some(bundle => bundle === 'deb' || bundle === 'all')) {
const linuxTargets = targets.filter(target => target.includes('-linux-'))
if (linuxTargets.length > 0)
for (const target of linuxTargets) {
env.TARGET = target
await spawn(path.join(__dirname, 'fix-deb.sh'), [], __dirname)
}
else if (process.platform === 'linux')
await spawn(path.join(__dirname, 'fix-deb.sh'), [], __dirname)
}
} catch (error) {
console.error(
`tauri ${args[0]} failed with exit code ${typeof error === 'number' ? error : 1}`
)
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) (#1685) * Almost working * Downgrade libplacebo - FFMpeg 6.0 uses some now removed deprecated functions * Use -Oz for zimg * Fix CI script to run the new ffmpeg build script * Fix heif step name + Ignore docker cache while building in CI * Fix Opencl build on linux * Fix adding incorrect -target argument to linker - Update zig for windows target * Disable opengl for ffmpeg, it only uses it as an outdev, not for processing - Disable opengl and directx for libplacebo, ffmpeg only supports vulkan when using it - Add WIN32_LEAN_AND_MEAN to global cflags to optimize windows api usage - Fix 99-heif.sh incorrect bsdtar flag * Remove WIN32_LEAN_AND_MEAN from global CFLAGS as that was breaking OpenCL build - Fix Dockerfile step for cleaning up the out dir - Improve licensing handling * x86_64 windows and linux builds are working * Fix aarch64 build for windows and linux * Fix symbol visibility in linux builds - Fix soxr failing to download due to sourcefourge - Only patch zimg on windows targets - Tell cmake to hide libheif symbols * Fix Linux .so rpath - Add lzo dependency - Publish source for the built libs - Add warning for missing nasm in tauri.mjs - Remove ffmpeg install from setup.sh - Add download logic for our linux ffmpeg bundle in preprep.mjs * Remove jobs, docker doesn't support this * Fix typing * Change ffmpeg references to native deps - Rename FFMpeg.framework to Spacedrive.framework - Centralize the macOS native deps build with the windows and linux one - Change the preprep script to only download our native deps - Remove old macOS ffmpeg build scripts * Compress native deps before creating github artifact - The zip implementation for github artifact does not mantain symlinks and permissions - Remove conditional protoc, it is now always included * Don't strip dylibs, it was breaking them - Only download macOS Framework for darwin targets - Fix preprep script - Improve README.md for native-deps - Fix not finding native-deps src * Attempt to fix macOS dylib * Fix macOS dylibs - Replace lld.ld64 with apple's own linker - Add stages for building apple's compiler tools to use instead of LLVM ones * Ensure sourced file exists * All targets should build now - Fix environment sourcing in build.sh - Some minor improvements to cc.sh - Fix incorrect flag in zlib.sh - Improve how -f[...] flags are passed to compiler and linker - Add more stack hardening flags * We now can support macOS 11.0 on arm64 * Improve macOS Framework generation - Remove installed unused deps - Improve cleanup and organization logic in Dockerfile last step - Move libav* .dll.a to .lib to fix missing files in windows target - Remove apple tools from /srv folder after installation to prevent their files from being copied by other stage steps - Create all the necessary symlinks for the macOS targets while building - Remove symlink logic for macOS target from preprep.mjs * Remove native-deps from spacedrive repo - It now resides in https://github.com/spacedriveapp/native-deps - Modify preprep script to dowload native-deps from new location - Remove Github API code from scripts (not needed anymore) - Add flock.mjs to allow running tauri.mjs cleanup as soon as cargo finishes building in linux * Handle flock not present in system - Allow macOS to try using flock * Fix preprep on macOS * Add script that patch deb to fix errors and warnings raised by lintian * Fix ctrl+c/ctrl+v typo * Remove gstreamer1.0-gtk3 from deb dependencies * eval is evil * Handle tauri build release with an explicit target in fix-deb.sh * Preserve environment variables when re-executing fix-deb with sudo * Only execute fix-deb.sh when building a deb bundle * Improvements fix-deb.sh * Improve setup.sh (Add experiemental alpine support)
2023-11-17 19:20:14 +00:00
console.warn(
`If you got an error related to libav*/FFMpeg or Protoc/Protobuf you may need to re-run \`pnpm prep\``,
`If you got an error related to missing nasm you need to run ${
platform === 'win32' ? './scripts/setup.ps1' : './scripts/setup.sh'
}`
)
[ENG-927, ENG-735, ENG-766] Fix Updater & Tauri 1.5 (#1361) * custom updater with toasts * new state management + updated router route * tauri-specific update route * ref * update in prod only * change 'Install' to 'Update' * fix tsconfig * desktop tauri * remove tauri patch * tauri 1.5 * tauri 1.5 * use tauri script * native-deps * Rework preprep and tauri script to better support tauri 1.5 * Update to tauri 1.5.1 - Update workspace and apps/desktop dependencies - Fix mustache import, @types/mustache is not compatible with ES imports - Replace arm64 with aarch64 in machineID, they should be treated the same and this simplyfies the code * Fix tauri updater not building due to missing key - Fix dmg background not being found - Generate an adhoc key for tauri updater with it is enabled and the user is doing a prod build * Fix ctrl+c/ctrl+v typo * Normalie @tanstack/react-query version through workspace - Use undici in scripts instead of global fetch - Fix typecheck * Fix linux prod and dev builds - Improve error handling in tauri.mjs * Normalize dev deps in workspace - Improve linux shared libs setup * Fix CI and server docker * Fix windows - Remove superfluous envvar * Attempt to fix server, mobile, deb and release updater * Attempt to fix deb and mobile again - Fix type on deb dependency - Enable release deb for aarch64-unknown-linux-gnu * Github doesn't have arm runners - Fix typo in server Dockerfile * Publish deb and updater artifacts * remove version from asset name * update commands * log release * Some logs on updater errors * show updater errors on frontend * fix desktop ui caching --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 07:30:56 +00:00
if (typeof error === 'number') {
code = error
} else {
if (error instanceof Error) console.error(error)
code = 1
}
} finally {
cleanUp()
exit(code)
}