@@ -45,12 +45,16 @@ use cargo_metadata::MetadataCommand;
45
45
/// which is currently `/usr/lib/moxin-runner`.
46
46
/// * This is the directory in which `dpkg` copies app resource files to
47
47
/// when a user installs the `.deb` package.
48
+ /// * For Windows NSIS packages, this should be set to `.` (the current dir).
49
+ /// * This is because the NSIS installer script copies the resources to the same directory
50
+ /// as the installed binaries, and our `moxin-runner` app changes the current working directory
51
+ /// to that same directory before running the main Moxin binary.
48
52
fn makepad_package_dir_value ( package_format : & str ) -> & ' static str {
49
53
match package_format {
50
54
"app" | "dmg" => "../Resources" ,
51
55
"appimage" => "../../usr/lib/moxin" ,
52
56
"deb" | "pacman" => "/usr/share/moxin" ,
53
- "nsis" => ".\\ " ,
57
+ "nsis" => "." ,
54
58
_other => panic ! ( "Unsupported package format: {}" , _other) ,
55
59
}
56
60
}
@@ -103,9 +107,9 @@ fn before_packaging(host_os: &str) -> std::io::Result<()> {
103
107
let dist_resources_dir = cwd. join ( "dist" ) . join ( "resources" ) ;
104
108
fs:: create_dir_all ( & dist_resources_dir) ?;
105
109
106
- let moxin_resources_dest = dist_resources_dir. join ( "moxin" ) ;
110
+ let moxin_resources_dest = dist_resources_dir. join ( "moxin" ) . join ( "resources" ) ;
107
111
let moxin_resources_src = cwd. join ( "resources" ) ;
108
- let makepad_widgets_resources_dest = dist_resources_dir. join ( "makepad_widgets" ) ;
112
+ let makepad_widgets_resources_dest = dist_resources_dir. join ( "makepad_widgets" ) . join ( "resources" ) ;
109
113
let makepad_widgets_resources_src = {
110
114
let cargo_metadata = MetadataCommand :: new ( )
111
115
. exec ( )
0 commit comments