tensor-programming 6 лет назад
Родитель
Сommit
7de67f6dd9

+ 1 - 1
tools/rust/cargo-proton-bundle/src/bundle/msi_bundle.rs

@@ -97,7 +97,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
 
   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)

+ 4 - 2
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);