@@ -138,7 +138,7 @@ export class App {
138
138
if ( this . opts . prebuiltAsar ) {
139
139
await this . copyPrebuiltAsar ( ) ;
140
140
this . asarIntegrity = {
141
- [ this . appRelativePath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
141
+ [ this . appRelativePlatformPath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
142
142
} ;
143
143
} else {
144
144
await this . buildApp ( ) ;
@@ -232,8 +232,12 @@ export class App {
232
232
await fs . copy ( src , this . appAsarPath , { overwrite : false , errorOnExist : true } ) ;
233
233
}
234
234
235
- appRelativePath ( p : string ) {
236
- return path . relative ( this . stagingPath , p ) ;
235
+ appRelativePlatformPath ( p : string ) {
236
+ if ( this . opts . platform === 'win32' ) {
237
+ return path . win32 . relative ( this . stagingPath , p ) ;
238
+ }
239
+
240
+ return path . posix . relative ( this . stagingPath , p ) ;
237
241
}
238
242
239
243
async asarApp ( ) {
@@ -247,7 +251,7 @@ export class App {
247
251
248
252
await asar . createPackageWithOptions ( this . originalResourcesAppDir , this . appAsarPath , this . asarOptions ) ;
249
253
this . asarIntegrity = {
250
- [ this . appRelativePath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
254
+ [ this . appRelativePlatformPath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
251
255
} ;
252
256
await fs . remove ( this . originalResourcesAppDir ) ;
253
257
0 commit comments