fix: restrict Windows-specific code to x86_64 and update scripts
Updated Rust code to apply Windows-specific logic only on x86_64 targets using #[cfg(all(windows, target_arch = "x86_64"))]. Modified dev:tauri script in package.json to remove CLEAN=true and added CLEAN=true to beforeDevCommand in tauri.conf.json for consistency. Minor formatting changes in tauri.conf.json.
This commit is contained in:
parent
2bdbce2e40
commit
d264220245
@ -20,7 +20,7 @@
|
||||
"test:e2e:darwin": "echo 'E2E tests are not supported on macOS yet due to WebDriver limitations'",
|
||||
"test:e2e": "run-script-os",
|
||||
"dev:web": "yarn workspace @janhq/web-app dev",
|
||||
"dev:tauri": "CLEAN=true yarn build:icon && yarn copy:assets:tauri && tauri dev",
|
||||
"dev:tauri": "yarn build:icon && yarn copy:assets:tauri && tauri dev",
|
||||
"copy:assets:tauri": "cpx \"pre-install/*.tgz\" \"src-tauri/resources/pre-install/\"",
|
||||
"download:lib": "node ./scripts/download-lib.mjs",
|
||||
"download:bin": "node ./scripts/download-bin.mjs",
|
||||
|
||||
@ -29,7 +29,7 @@ pub async fn cleanup_processes(state: State<'_, AppState>) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(windows, target_arch = "x86_64"))]
|
||||
{
|
||||
use windows_sys::Win32::System::Console::{GenerateConsoleCtrlEvent, CTRL_C_EVENT};
|
||||
use windows_sys::Win32::Foundation::BOOL;
|
||||
|
||||
@ -133,7 +133,7 @@ pub async fn load_llama_model(
|
||||
// Optional: Redirect stdio if needed (e.g., for logging within Jan)
|
||||
// command.stdout(Stdio::piped());
|
||||
// command.stderr(Stdio::piped());
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(windows, target_arch = "x86_64"))]
|
||||
{
|
||||
command.creation_flags(CREATE_NEW_PROCESS_GROUP);
|
||||
}
|
||||
@ -196,7 +196,7 @@ pub async fn unload_llama_model(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(windows, target_arch = "x86_64"))]
|
||||
{
|
||||
use windows_sys::Win32::System::Console::{GenerateConsoleCtrlEvent, CTRL_C_EVENT};
|
||||
use windows_sys::Win32::Foundation::BOOL;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"build": {
|
||||
"frontendDist": "../web-app/dist",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeDevCommand": "cross-env IS_TAURI=true yarn dev:web",
|
||||
"beforeDevCommand": "cross-env IS_TAURI=true CLEAN=true yarn dev:web",
|
||||
"beforeBuildCommand": "cross-env IS_TAURI=true yarn build:web"
|
||||
},
|
||||
"app": {
|
||||
@ -90,10 +90,7 @@
|
||||
"resources/lib/",
|
||||
"binaries/**/*"
|
||||
],
|
||||
"externalBin": [
|
||||
"resources/bin/bun",
|
||||
"resources/bin/uv"
|
||||
],
|
||||
"externalBin": ["resources/bin/bun", "resources/bin/uv"],
|
||||
"linux": {
|
||||
"appimage": {
|
||||
"bundleMediaFramework": false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user