@@ -685,6 +685,7 @@ impl Build {
685
685
. and_then ( |target| target. metadata . as_ref ( ) )
686
686
. and_then ( |metadata| metadata. name . clone ( ) )
687
687
. unwrap_or ( to_title_case ( & target_name) ) ;
688
+ let package_name = target_name. replace ( '-' , "_" ) ;
688
689
let source_path = self . make_source_dir ( & overall_target_dir, & game_title) ?;
689
690
let dest_path = overall_target_dir. join ( format ! ( "{}.pdx" , & game_title) ) ;
690
691
if dest_path. exists ( ) {
@@ -694,10 +695,10 @@ impl Build {
694
695
let dir_name = if self . release { "release" } else { "debug" } ;
695
696
if self . device {
696
697
target_dir = target_dir. join ( "thumbv7em-none-eabihf" ) . join ( dir_name) ;
697
- let lib_file = target_dir. join ( format ! ( "{}lib{}.a" , target_path, target_name ) ) ;
698
+ let lib_file = target_dir. join ( format ! ( "{}lib{}.a" , target_path, package_name ) ) ;
698
699
self . compile_setup ( & target_dir) ?;
699
- self . link_binary ( & target_dir, & target_name , & lib_file) ?;
700
- self . make_binary ( & target_dir, & target_name , & source_path) ?;
700
+ self . link_binary ( & target_dir, & package_name , & lib_file) ?;
701
+ self . make_binary ( & target_dir, & package_name , & source_path) ?;
701
702
self . copy_assets ( & target_name, & project_path, & crank_manifest, & source_path) ?;
702
703
self . make_manifest ( & crank_manifest, & target_name, & source_path) ?;
703
704
self . run_pdc ( & source_path, & dest_path) ?;
@@ -706,7 +707,7 @@ impl Build {
706
707
}
707
708
} else {
708
709
target_dir = target_dir. join ( dir_name) . join ( target_path) ;
709
- self . link_dylib ( & target_dir, & target_name , & source_path) ?;
710
+ self . link_dylib ( & target_dir, & package_name , & source_path) ?;
710
711
self . copy_assets ( & target_name, & project_path, & crank_manifest, & source_path) ?;
711
712
self . make_manifest ( & crank_manifest, & target_name, & source_path) ?;
712
713
self . run_pdc ( & source_path, & dest_path) ?;
0 commit comments