|
6 | 6 | use crate::bundle::{ |
7 | 7 | common::CommandExt, |
8 | 8 | path_utils::{copy_file, FileOpts}, |
9 | | - settings::Settings, |
| 9 | + settings::{Arch, Settings}, |
10 | 10 | windows::{ |
11 | 11 | sign::try_sign, |
12 | 12 | util::{ |
@@ -217,12 +217,12 @@ fn app_installer_output_path( |
217 | 217 | updater: bool, |
218 | 218 | ) -> crate::Result<PathBuf> { |
219 | 219 | let arch = match settings.binary_arch() { |
220 | | - "x86" => "x86", |
221 | | - "x86_64" => "x64", |
222 | | - "aarch64" => "arm64", |
| 220 | + Arch::X86_64 => "x64", |
| 221 | + Arch::X86 => "x86", |
| 222 | + Arch::AArch64 => "arm64", |
223 | 223 | target => { |
224 | 224 | return Err(crate::Error::ArchError(format!( |
225 | | - "Unsupported architecture: {}", |
| 225 | + "Unsupported architecture: {:?}", |
226 | 226 | target |
227 | 227 | ))) |
228 | 228 | } |
@@ -330,12 +330,12 @@ fn run_candle( |
330 | 330 | extensions: Vec<PathBuf>, |
331 | 331 | ) -> crate::Result<()> { |
332 | 332 | let arch = match settings.binary_arch() { |
333 | | - "x86_64" => "x64", |
334 | | - "x86" => "x86", |
335 | | - "aarch64" => "arm64", |
| 333 | + Arch::X86_64 => "x64", |
| 334 | + Arch::X86 => "x86", |
| 335 | + Arch::AArch64 => "arm64", |
336 | 336 | target => { |
337 | 337 | return Err(crate::Error::ArchError(format!( |
338 | | - "unsupported target: {}", |
| 338 | + "unsupported architecture: {:?}", |
339 | 339 | target |
340 | 340 | ))) |
341 | 341 | } |
@@ -421,12 +421,12 @@ pub fn build_wix_app_installer( |
421 | 421 | updater: bool, |
422 | 422 | ) -> crate::Result<Vec<PathBuf>> { |
423 | 423 | let arch = match settings.binary_arch() { |
424 | | - "x86_64" => "x64", |
425 | | - "x86" => "x86", |
426 | | - "aarch64" => "arm64", |
| 424 | + Arch::X86_64 => "x64", |
| 425 | + Arch::X86 => "x86", |
| 426 | + Arch::AArch64 => "arm64", |
427 | 427 | target => { |
428 | 428 | return Err(crate::Error::ArchError(format!( |
429 | | - "unsupported target: {}", |
| 429 | + "unsupported architecture: {:?}", |
430 | 430 | target |
431 | 431 | ))) |
432 | 432 | } |
|
0 commit comments