@@ -764,6 +764,8 @@ export async function cancelExtraction(appName: string) {
764
764
)
765
765
766
766
try {
767
+ process . noAsar = false
768
+
767
769
const extractZipService = inProgressExtractionsMap . get ( appName )
768
770
if ( extractZipService ) {
769
771
extractZipService . cancel ( )
@@ -961,6 +963,8 @@ export async function install(
961
963
}
962
964
return { status : 'done' }
963
965
} catch ( error ) {
966
+ process . noAsar = false
967
+
964
968
logInfo (
965
969
`Error while downloading and extracting game: ${ error } ` ,
966
970
LogPrefix . HyperPlay
@@ -1048,6 +1052,10 @@ export async function extract(
1048
1052
const zipFile = path . join ( directory , fileName )
1049
1053
logInfo ( `Extracting ${ zipFile } to ${ destinationPath } ` , LogPrefix . HyperPlay )
1050
1054
1055
+ // disables electron's fs wrapper called when extracting .asar files
1056
+ // which is necessary to extract electron app/game zip files
1057
+ process . noAsar = true
1058
+
1051
1059
sendFrontendMessage ( 'gameStatusUpdate' , {
1052
1060
appName,
1053
1061
status : 'extracting' ,
@@ -1146,6 +1154,8 @@ export async function extract(
1146
1154
status : 'extracting'
1147
1155
} )
1148
1156
1157
+ process . noAsar = false
1158
+
1149
1159
if ( isMac && executable . endsWith ( '.app' ) ) {
1150
1160
const macAppExecutable = readdirSync (
1151
1161
join ( executable , 'Contents' , 'MacOS' )
@@ -1200,6 +1210,8 @@ export async function extract(
1200
1210
LogPrefix . HyperPlay
1201
1211
)
1202
1212
1213
+ process . noAsar = false
1214
+
1203
1215
cancelQueueExtraction ( )
1204
1216
callAbortController ( appName )
1205
1217
@@ -1242,6 +1254,8 @@ export async function extract(
1242
1254
extractService . extract ( ) . then ( )
1243
1255
} )
1244
1256
} catch ( error : unknown ) {
1257
+ process . noAsar = false
1258
+
1245
1259
logInfo ( `Error while extracting game ${ error } ` , LogPrefix . HyperPlay )
1246
1260
1247
1261
window . webContents . send ( 'gameStatusUpdate' , {
0 commit comments