spacedrive/scripts/utils/patchTauri.mjs

152 lines
4.3 KiB
JavaScript
Raw Permalink Normal View History

[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 { exec as _exec } from 'node:child_process'
import * as fs from 'node:fs/promises'
import * as os from 'node:os'
import * as path from 'node:path'
import { env } from 'node:process'
import { promisify } from 'node:util'
import * as semver from 'semver'
[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 { linuxLibs, windowsDLLs } from './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
const exec = promisify(_exec)
const __debug = env.NODE_ENV === 'debug'
/**
* @param {string} nativeDeps
* @returns {Promise<string?>}
*/
export async function tauriUpdaterKey(nativeDeps) {
if (env.TAURI_SIGNING_PRIVATE_KEY) return null
[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
// pnpm exec tauri signer generate -w
const privateKeyPath = path.join(nativeDeps, 'tauri.key')
const publicKeyPath = path.join(nativeDeps, 'tauri.key.pub')
const readKeys = () =>
Promise.all([
fs.readFile(publicKeyPath, { encoding: 'utf-8' }),
fs.readFile(privateKeyPath, { encoding: 'utf-8' }),
])
let privateKey, publicKey
try {
;[publicKey, privateKey] = await readKeys()
if (!(publicKey && privateKey)) throw new Error('Empty keys')
} catch (err) {
if (__debug) {
console.warn('Failed to read tauri updater keys')
console.error(err)
}
const quote = os.type() === 'Windows_NT' ? '"' : "'"
await exec(`pnpm exec tauri signer generate --ci -w ${quote}${privateKeyPath}${quote}`)
;[publicKey, privateKey] = await readKeys()
if (!(publicKey && privateKey)) throw new Error('Empty keys')
}
env.TAURI_SIGNING_PRIVATE_KEY = privateKey
env.TAURI_SIGNING_PRIVATE_KEY_PASSWORD = ''
[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
return publicKey
}
/**
* @param {string} root
* @param {string} nativeDeps
[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
* @param {string[]} targets
* @param {string[]} bundles
[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
* @param {string[]} args
* @returns {Promise<string[]>}
*/
[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
export async function 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
if (args.findIndex(e => e === '-c' || e === '--config') !== -1) {
throw new Error('Custom tauri build config is not supported.')
}
const osType = os.type()
const tauriPatch = {
build: {
features: /** @type {string[]} */ ([]),
},
bundle: {
macOS: { minimumSystemVersion: '' },
resources: {},
},
plugins: {
[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
updater: /** @type {{ pubkey?: string }} */ ({}),
},
}
[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 (osType === 'Linux') {
tauriPatch.bundle.resources = await linuxLibs(nativeDeps)
[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
} else if (osType === 'Windows_NT') {
tauriPatch.bundle.resources = {
[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
...(await windowsDLLs(nativeDeps)),
[path.join(nativeDeps, 'models', 'yolov8s.onnx')]: './models/yolov8s.onnx',
}
}
// Location for desktop app tauri code
const tauriRoot = path.join(root, 'apps', 'desktop', 'src-tauri')
[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
const tauriConfig = await fs
.readFile(path.join(tauriRoot, 'tauri.conf.json'), 'utf-8')
.then(JSON.parse)
[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 (bundles.length === 0) {
const defaultBundles = tauriConfig?.bundle?.targets
[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 (Array.isArray(defaultBundles)) bundles.push(...defaultBundles)
if (bundles.length === 0) bundles.push('all')
}
switch (args[0]) {
case 'dev':
tauriPatch.build.features.push('devtools')
break
case 'build': {
if (tauriConfig?.plugins?.updater?.active) {
const pubKey = await tauriUpdaterKey(nativeDeps)
if (pubKey != null) tauriPatch.plugins.updater.pubkey = pubKey
}
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
}
}
if (osType === '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
const macOSArm64MinimumVersion = '11.0'
[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 macOSMinimumVersion = tauriConfig?.bundle?.macOS?.minimumSystemVersion
[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 (
(targets.includes('aarch64-apple-darwin') ||
(targets.length === 0 && process.arch === 'arm64')) &&
(macOSMinimumVersion == null ||
semver.lt(
/** @type {import('semver').SemVer} */ (semver.coerce(macOSMinimumVersion)),
/** @type {import('semver').SemVer} */ (
semver.coerce(macOSArm64MinimumVersion)
)
))
) {
macOSMinimumVersion = macOSArm64MinimumVersion
console.log(
`aarch64-apple-darwin target detected, setting minimum system version to ${macOSMinimumVersion}`
)
}
if (macOSMinimumVersion) {
env.MACOSX_DEPLOYMENT_TARGET = macOSMinimumVersion
tauriPatch.bundle.macOS.minimumSystemVersion = macOSMinimumVersion
[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
} else {
throw new Error('No minimum macOS version detected, please review tauri.conf.json')
}
}
const tauriPatchConf = path.join(tauriRoot, 'tauri.conf.patch.json')
await fs.writeFile(tauriPatchConf, JSON.stringify(tauriPatch, null, 2))
// Modify args to load patched tauri config
args.splice(1, 0, '-c', tauriPatchConf)
// Files to be removed
[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
return [tauriPatchConf]
[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
}