File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments