@@ -387,14 +387,14 @@ export async function getEpicListingUrl(projectId: string): Promise<string> {
387
387
}
388
388
389
389
export const runModPatcher = async ( appName : string ) => {
390
- // game_folder/client-patcher patch.exe -m patch/manifest.json
391
390
const installPath = getGameInfo ( appName ) ?. install . install_path
392
391
if ( ! installPath ) {
393
392
logError ( `Cannot find install path for ${ appName } ` , LogPrefix . HyperPlay )
394
393
return
395
394
}
396
395
397
- const patcher = join ( installPath , 'client-patcher.exe' )
396
+ const patcherBinary = isWindows ? 'client-patcher.exe' : 'client-patcher'
397
+ const patcher = join ( installPath , patcherBinary )
398
398
const manifest = join ( installPath , 'patch' , 'manifest.json' )
399
399
400
400
logInfo (
@@ -407,15 +407,14 @@ export const runModPatcher = async (appName: string) => {
407
407
}
408
408
409
409
try {
410
- if ( ! isWindows ) {
411
- const gameSettings = await getSettings ( appName )
412
- runWineCommand ( {
413
- gameSettings,
414
- commandParts : [ patcher , 'patch' , '-m' , manifest ] ,
415
- wait : true
416
- } )
417
- } else {
418
- await spawnAsync ( patcher , [ 'patch' , '-m' , manifest ] )
410
+ const { stderr, stdout } = await spawnAsync (
411
+ patcherBinary ,
412
+ [ 'patch' , '-m' , 'patch/manifest.json' ] ,
413
+ { cwd : installPath }
414
+ )
415
+ logInfo ( [ 'Patch Applied' , stdout ] , LogPrefix . HyperPlay )
416
+ if ( stderr ) {
417
+ logError ( stderr , LogPrefix . HyperPlay )
419
418
}
420
419
} catch ( error ) {
421
420
throw new Error ( `Error running patcher: ${ error } ` )
0 commit comments