File tree 4 files changed +37
-11
lines changed
cli/tauri-bundler/src/bundle
4 files changed +37
-11
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " tauri-bundler " : minor
3
+ ---
4
+
5
+ Bundler output refactor: move Windows artifacts to the ` bundle/wix ` folder and use a standard output name ` ${bundleName}_${version}_${arch}.${extension} ` .
Original file line number Diff line number Diff line change @@ -15,14 +15,18 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
15
15
// generate the .app bundle
16
16
osx_bundle:: bundle_project ( settings) ?;
17
17
18
- let app_name = settings. bundle_name ( ) ;
19
-
20
18
// get the target path
21
19
let output_path = settings. project_out_directory ( ) . join ( "bundle/dmg" ) ;
22
- let dmg_name = format ! ( "{}.dmg" , app_name. clone( ) ) ;
20
+ let package_base_name = format ! (
21
+ "{}_{}_{}" ,
22
+ settings. main_binary_name( ) ,
23
+ settings. version_string( ) ,
24
+ settings. binary_arch( )
25
+ ) ;
26
+ let dmg_name = format ! ( "{}.dmg" , & package_base_name) ;
23
27
let dmg_path = output_path. join ( & dmg_name. clone ( ) ) ;
24
28
25
- let bundle_name = & format ! ( "{}.app" , app_name ) ;
29
+ let bundle_name = & format ! ( "{}.app" , & package_base_name ) ;
26
30
let bundle_dir = settings. project_out_directory ( ) . join ( "bundle/osx" ) ;
27
31
let bundle_path = bundle_dir. join ( & bundle_name. clone ( ) ) ;
28
32
@@ -71,7 +75,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
71
75
72
76
let mut args = vec ! [
73
77
"--volname" ,
74
- & app_name ,
78
+ & package_base_name ,
75
79
"--volicon" ,
76
80
"../../../../icons/icon.icns" ,
77
81
"--icon" ,
Original file line number Diff line number Diff line change @@ -37,7 +37,13 @@ use std::process::{Command, Stdio};
37
37
/// Bundles the project.
38
38
/// Returns a vector of PathBuf that shows where the .app was created.
39
39
pub fn bundle_project ( settings : & Settings ) -> crate :: Result < Vec < PathBuf > > {
40
- let app_bundle_name = format ! ( "{}.app" , settings. bundle_name( ) ) ;
40
+ let package_base_name = format ! (
41
+ "{}_{}_{}" ,
42
+ settings. main_binary_name( ) ,
43
+ settings. version_string( ) ,
44
+ settings. binary_arch( )
45
+ ) ;
46
+ let app_bundle_name = format ! ( "{}.app" , package_base_name) ;
41
47
common:: print_bundling ( & app_bundle_name) ?;
42
48
let app_bundle_path = settings
43
49
. project_out_directory ( )
Original file line number Diff line number Diff line change @@ -199,11 +199,19 @@ fn app_installer_dir(settings: &Settings) -> crate::Result<PathBuf> {
199
199
}
200
200
} ;
201
201
202
- Ok ( settings. project_out_directory ( ) . to_path_buf ( ) . join ( format ! (
203
- "{}.{}.msi" ,
204
- settings. bundle_name( ) ,
202
+ let package_base_name = format ! (
203
+ "{}_{}_{}" ,
204
+ settings. main_binary_name( ) ,
205
+ settings. version_string( ) ,
205
206
arch
206
- ) ) )
207
+ ) ;
208
+
209
+ Ok (
210
+ settings
211
+ . project_out_directory ( )
212
+ . to_path_buf ( )
213
+ . join ( format ! ( "bundle/wix/{}.msi" , package_base_name) ) ,
214
+ )
207
215
}
208
216
209
217
/// Extracts the zips from Wix and VC_REDIST into a useable path.
@@ -407,7 +415,10 @@ pub fn build_wix_app_installer(
407
415
// target only supports x64.
408
416
common:: print_info ( format ! ( "Target: {}" , arch) . as_str ( ) ) ?;
409
417
410
- let output_path = settings. project_out_directory ( ) . join ( "wix" ) . join ( arch) ;
418
+ let output_path = settings
419
+ . project_out_directory ( )
420
+ . join ( "bundle/wix" )
421
+ . join ( arch) ;
411
422
412
423
let mut data = BTreeMap :: new ( ) ;
413
424
You can’t perform that action at this time.
0 commit comments