fix: model run failed on windows (#5168)
* fix: model run failed on windows * chore: fix dependency path on windows
This commit is contained in:
parent
aeba895250
commit
817e3175f3
@ -241,19 +241,9 @@ pub fn setup_sidecar(app: &App) -> Result<(), String> {
|
||||
"--api_keys",
|
||||
app_state.inner().app_token.as_deref().unwrap_or(""),
|
||||
]);
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
cmd = cmd.env("PATH", {
|
||||
let exe_path = env::current_exe().expect("Failed to get current exe path");
|
||||
let exe_parent_path = exe_path
|
||||
.parent()
|
||||
.expect("Executable must have a parent directory");
|
||||
let bin_path = exe_parent_path.to_path_buf();
|
||||
let dest = bin_path.display();
|
||||
let path = std::env::var("PATH").unwrap_or_default();
|
||||
format!("{}{}{}", path, std::path::MAIN_SEPARATOR, dest)
|
||||
});
|
||||
cmd = cmd.current_dir(app_handle.path().resource_dir().unwrap());
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
|
||||
@ -82,9 +82,9 @@
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"resources": [
|
||||
"binaries/engines/**/*",
|
||||
"resources/pre-install/**/*",
|
||||
"resources/lib/"
|
||||
"resources/lib/",
|
||||
"binaries/**/*"
|
||||
],
|
||||
"externalBin": [
|
||||
"binaries/cortex-server",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user