@@ -138,7 +138,7 @@ export class App {
138138 if ( this . opts . prebuiltAsar ) {
139139 await this . copyPrebuiltAsar ( ) ;
140140 this . asarIntegrity = {
141- [ this . appRelativePath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
141+ [ this . appRelativePlatformPath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
142142 } ;
143143 } else {
144144 await this . buildApp ( ) ;
@@ -232,8 +232,12 @@ export class App {
232232 await fs . copy ( src , this . appAsarPath , { overwrite : false , errorOnExist : true } ) ;
233233 }
234234
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 ) ;
237241 }
238242
239243 async asarApp ( ) {
@@ -247,7 +251,7 @@ export class App {
247251
248252 await asar . createPackageWithOptions ( this . originalResourcesAppDir , this . appAsarPath , this . asarOptions ) ;
249253 this . asarIntegrity = {
250- [ this . appRelativePath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
254+ [ this . appRelativePlatformPath ( this . appAsarPath ) ] : this . getAsarIntegrity ( this . appAsarPath ) ,
251255 } ;
252256 await fs . remove ( this . originalResourcesAppDir ) ;
253257
0 commit comments