File tree Expand file tree Collapse file tree 4 files changed +37
-11
lines changed
cli/tauri-bundler/src/bundle Expand file tree Collapse file tree 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>> {
1515 // generate the .app bundle
1616 osx_bundle:: bundle_project ( settings) ?;
1717
18- let app_name = settings. bundle_name ( ) ;
19-
2018 // get the target path
2119 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) ;
2327 let dmg_path = output_path. join ( & dmg_name. clone ( ) ) ;
2428
25- let bundle_name = & format ! ( "{}.app" , app_name ) ;
29+ let bundle_name = & format ! ( "{}.app" , & package_base_name ) ;
2630 let bundle_dir = settings. project_out_directory ( ) . join ( "bundle/osx" ) ;
2731 let bundle_path = bundle_dir. join ( & bundle_name. clone ( ) ) ;
2832
@@ -71,7 +75,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
7175
7276 let mut args = vec ! [
7377 "--volname" ,
74- & app_name ,
78+ & package_base_name ,
7579 "--volicon" ,
7680 "../../../../icons/icon.icns" ,
7781 "--icon" ,
Original file line number Diff line number Diff line change @@ -37,7 +37,13 @@ use std::process::{Command, Stdio};
3737/// Bundles the project.
3838/// Returns a vector of PathBuf that shows where the .app was created.
3939pub 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) ;
4147 common:: print_bundling ( & app_bundle_name) ?;
4248 let app_bundle_path = settings
4349 . 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> {
199199 }
200200 } ;
201201
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( ) ,
205206 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+ )
207215}
208216
209217/// Extracts the zips from Wix and VC_REDIST into a useable path.
@@ -407,7 +415,10 @@ pub fn build_wix_app_installer(
407415 // target only supports x64.
408416 common:: print_info ( format ! ( "Target: {}" , arch) . as_str ( ) ) ?;
409417
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) ;
411422
412423 let mut data = BTreeMap :: new ( ) ;
413424
You can’t perform that action at this time.
0 commit comments