@@ -39,7 +39,7 @@ export default class AppImageTarget extends TargetEx {
39
39
"-map" , appOutDir , "/usr/bin" ,
40
40
"-map" , path . join ( __dirname , ".." , ".." , "templates" , "linux" , "AppRun.sh" ) , `/AppRun` ,
41
41
"-map" , await this . desktopEntry , `/${ appInfo . name } .desktop` ,
42
- "-move" , `/usr/bin/${ appInfo . productFilename } ` , " /usr/bin/app" ,
42
+ "-move" , `/usr/bin/${ appInfo . productFilename } ` , ` /usr/bin/${ appInfo . name } ` ,
43
43
]
44
44
for ( let [ from , to ] of ( await this . helper . icons ) ) {
45
45
args . push ( "-map" , from , `/usr/share/icons/default/${ to } ` )
@@ -51,15 +51,16 @@ export default class AppImageTarget extends TargetEx {
51
51
}
52
52
args . push ( "-map" , this . helper . maxIconPath , "/.DirIcon" )
53
53
54
- // args.push("-zisofs", `level=0:block_size=128k:by_magic=off`, "-chown_r", "0")
55
- // args.push("/", "--", "set_filter_r", "--zisofs", "/")
54
+ args . push ( "-chown_r" , "0" , "/" , "--" )
55
+ args . push ( "-zisofs" , `level=0:block_size=128k:by_magic=off` )
56
+ args . push ( "set_filter_r" , "--zisofs" , "/" )
56
57
57
58
await exec ( process . platform === "darwin" ? path . join ( appImagePath , "xorriso" ) : "xorriso" , args )
58
59
59
60
await new BluebirdPromise ( ( resolve , reject ) => {
60
61
const rd = createReadStream ( path . join ( appImagePath , arch === Arch . ia32 ? "32" : "64" , "runtime" ) )
61
62
rd . on ( "error" , reject )
62
- const wr = createWriteStream ( image )
63
+ const wr = createWriteStream ( image , { flags : "r+" } )
63
64
wr . on ( "error" , reject )
64
65
wr . on ( "finish" , resolve )
65
66
rd . pipe ( wr )
@@ -83,6 +84,6 @@ export default class AppImageTarget extends TargetEx {
83
84
stdio : [ "ignore" , debug . enabled ? "inherit" : "ignore" , "inherit" ] ,
84
85
} )
85
86
86
- packager . dispatchArtifactCreated ( image )
87
+ packager . dispatchArtifactCreated ( ` ${ image } .xz` )
87
88
}
88
89
}
0 commit comments