From 7de67f6dd9d0b8e568a43b4b250099f4fe1dd2ac Mon Sep 17 00:00:00 2001 From: tensor-programming Date: Tue, 6 Aug 2019 03:44:16 -0400 Subject: [PATCH] fix target strings. --- tools/rust/cargo-proton-bundle/src/bundle/msi_bundle.rs | 2 +- tools/rust/cargo-proton-bundle/src/bundle/wix.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/rust/cargo-proton-bundle/src/bundle/msi_bundle.rs b/tools/rust/cargo-proton-bundle/src/bundle/msi_bundle.rs index a192a7803..35d5843ff 100644 --- a/tools/rust/cargo-proton-bundle/src/bundle/msi_bundle.rs +++ b/tools/rust/cargo-proton-bundle/src/bundle/msi_bundle.rs @@ -97,7 +97,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { wix::get_and_extract_wix(&logger, &wix_path)?; - wix::build_wix_app_installer(&logger, &settings, &wix_path, PathBuf::from("."))?; + wix::build_wix_app_installer(&logger, &settings, &wix_path, base_dir)?; // Set up installer database tables: // create_directory_table(&mut package, &directories) diff --git a/tools/rust/cargo-proton-bundle/src/bundle/wix.rs b/tools/rust/cargo-proton-bundle/src/bundle/wix.rs index 1cd43088d..4f9929962 100644 --- a/tools/rust/cargo-proton-bundle/src/bundle/wix.rs +++ b/tools/rust/cargo-proton-bundle/src/bundle/wix.rs @@ -271,10 +271,12 @@ pub fn build_wix_app_installer( ) -> Result<(), String> { let arch = match settings.binary_arch() { "i686-pc-windows-msvc" => "x86", - "x86_64-pc-windows-msvc" => "amd64", + "x86_64-pc-windows-msvc" => "x64", target => return Err(format!("unsupported target: {}", target)), }; + info!(logger, "Target: {}", settings.binary_arch()); + let output_path = settings.project_out_directory().join("wix").join(arch); let mut data = BTreeMap::new(); @@ -294,7 +296,7 @@ pub fn build_wix_app_installer( ) .to_string() } else { - panic!("unsupported target: {}"); + return Err(format!("unsupported target: {}", arch)); }; data.insert("upgrade_code", &upgrade_code);