diff --git a/scripts/build_windows_installer.rs b/scripts/build_windows_installer.rs index ac6969e..a23ca78 100644 --- a/scripts/build_windows_installer.rs +++ b/scripts/build_windows_installer.rs @@ -61,7 +61,7 @@ fn main() { let espanso_toml = espanso_toml_str .parse::() .expect("unable to parse Cargo.toml"); - + let arch = envmnt::get_or_panic("BUILD_ARCH"); let arch = if arch == "current" { std::env::consts::ARCH @@ -111,13 +111,10 @@ fn main() { .to_string_lossy() .to_string(), ); - iss_setup = iss_setup.replace( - "{{{output_name}}}", - &format!("{}-{}", INSTALLER_NAME, arch), - ); + iss_setup = iss_setup.replace("{{{output_name}}}", &format!("{}-{}", INSTALLER_NAME, arch)); iss_setup = iss_setup.replace( "{{{executable_path}}}", - &dunce::canonicalize(&format!("{}.exe", envmnt::get_or_panic("EXEC_PATH"))) + &dunce::canonicalize(&resources_dir.join("espansod.exe")) .unwrap() .to_string_lossy() .to_string(),