Skip to content

Commit 1a18db1

Browse files
committed
Bump version to 0.1.41 and improve sidecar path detection
1 parent 03f17c4 commit 1a18db1

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ps-analyzer",
3-
"version": "0.1.40",
3+
"version": "0.1.41",
44
"author": "Pablo Fernández Lagos <pablo.fernandez.lago@idipaz.es>",
55
"scripts": {
66
"ng": "ng",

src-tauri/src/lib.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,27 @@ pub fn run() {
134134
let resource_path_str = resource_path.to_string_lossy().to_string();
135135
println!("Passing resource path to bio-engine: {}", resource_path_str);
136136
sidecar_command = sidecar_command.args(["--resource-path", &resource_path_str]);
137+
138+
// BEST PRACTICE: Add resource and binaries folders to the sidecar's PATH directly
139+
// This helps Windows find DLLs even if the sidecar is launched from elsewhere
140+
if let Ok(current_path) = std::env::var("PATH") {
141+
let mut new_path = vec![resource_path_str.clone()];
142+
143+
// Also add standard subfolders where DLLs might be
144+
let binaries_sub = resource_path.join("binaries");
145+
if binaries_sub.exists() {
146+
new_path.push(binaries_sub.to_string_lossy().to_string());
147+
}
148+
149+
let resources_sub = resource_path.join("resources/binaries");
150+
if resources_sub.exists() {
151+
new_path.push(resources_sub.to_string_lossy().to_string());
152+
}
153+
154+
new_path.push(current_path);
155+
let final_path_env = new_path.join(if cfg!(target_os = "windows") { ";" } else { ":" });
156+
sidecar_command = sidecar_command.env("PATH", final_path_env);
157+
}
137158
}
138159

139160
let (mut rx, _child) = sidecar_command

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "PS Analyzer",
4-
"version": "0.1.40",
4+
"version": "0.1.41",
55
"identifier": "com.lagosproject.ps-analyzer",
66
"build": {
77
"beforeDevCommand": "npm run start",

0 commit comments

Comments
 (0)