mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-24 02:28:15 +03:00
Add check to make sure the patch gets applied
This commit is contained in:
parent
ad4027da7c
commit
7bef675ec3
1 changed files with 10 additions and 0 deletions
|
@ -394,6 +394,16 @@ export class Genshinlib
|
|||
patcherProcess.stdout.on('data', (data: string) => onData(data));
|
||||
|
||||
patcherProcess.on('close', () => {
|
||||
// Make sure that launcher.bat exists if not run patch.sh again.
|
||||
if (!path.join(this.gameDir, 'launcher.bat'))
|
||||
exec(`yes yes | ${path.join(patchDir, 'patch.sh')}`, {
|
||||
cwd: this.gameDir,
|
||||
env: {
|
||||
...process.env,
|
||||
WINEPREFIX: this.prefixDir
|
||||
}
|
||||
});
|
||||
|
||||
// Execute the patch file with "yes" in the beginning to agree to the choice.
|
||||
let patcherAntiCrashProcess = exec(`yes | ${path.join(patchDir, 'patch_anti_logincrash.sh')}`, {
|
||||
cwd: this.gameDir,
|
||||
|
|
Loading…
Reference in a new issue