fix(misc): fix arch naming on windows installer

This commit is contained in:
Federico Terzi 2021-08-25 22:14:55 +02:00
parent 27f665d0d4
commit d95ec773ad

View File

@ -62,6 +62,13 @@ fn main() {
.parse::<Value>() .parse::<Value>()
.expect("unable to parse Cargo.toml"); .expect("unable to parse Cargo.toml");
let arch = envmnt::get_or_panic("BUILD_ARCH");
let arch = if arch == "current" {
std::env::consts::ARCH
} else {
&arch
};
// Populating template variables // Populating template variables
let mut iss_setup = template; let mut iss_setup = template;
iss_setup = iss_setup.replace( iss_setup = iss_setup.replace(
@ -106,7 +113,7 @@ fn main() {
); );
iss_setup = iss_setup.replace( iss_setup = iss_setup.replace(
"{{{output_name}}}", "{{{output_name}}}",
&format!("{}-{}", INSTALLER_NAME, envmnt::get_or_panic("BUILD_ARCH")), &format!("{}-{}", INSTALLER_NAME, arch),
); );
iss_setup = iss_setup.replace( iss_setup = iss_setup.replace(
"{{{executable_path}}}", "{{{executable_path}}}",