make winetricks install dxvk191 and use custom wine binary

This commit is contained in:
Maroxy 2021-10-23 12:34:51 +02:00
parent aa597e90a4
commit acef1070d6
2 changed files with 50 additions and 20 deletions

View file

@ -3,11 +3,11 @@
"title": "Proton-GE",
"runners": [
{
"name": "Proton-5.21-GE-1",
"version": "5.21-GE-1",
"uri": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/5.21-GE-1/Proton-5.21-GE-1.tar.gz",
"name": "Proton-6.19-GE-2",
"version": "6.19-GE-2",
"uri": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/6.19-GE-2/Proton-6.19-GE-2.tar.gz",
"archive": "tar",
"folder": "Proton-5.21-GE-1",
"folder": "Proton-6.19-GE-2",
"makeFolder": false,
"executable": "files/bin/wine64"
},
@ -82,6 +82,15 @@
"folder": "Proton-6.14-GE-1",
"makeFolder": false,
"executable": "files/bin/wine64"
},
{
"name": "Proton-5.21-GE-1",
"version": "5.21-GE-1",
"uri": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/5.21-GE-1/Proton-5.21-GE-1.tar.gz",
"archive": "tar",
"folder": "Proton-5.21-GE-1",
"makeFolder": false,
"executable": "files/bin/wine64"
}
]
},
@ -89,11 +98,11 @@
"title": "Lutris",
"runners": [
{
"name": "Lutris 6.10-2",
"version": "6.10-2",
"uri": "https://github.com/lutris/wine/releases/download/lutris-6.10-2/wine-lutris-6.10-2-x86_64.tar.xz",
"name": "Lutris 6.14-4",
"version": "6.14-4",
"uri": "https://github.com/lutris/wine/releases/download/lutris-6.14-4/wine-lutris-6.14-4-x86_64.tar.xz",
"archive": "tar",
"folder": "lutris-6.10-2-x86_64",
"folder": "lutris-6.14-4-x86_64",
"makeFolder": false,
"executable": "bin/wine64"
},
@ -123,6 +132,15 @@
"folder": "lutris-6.14-x86_64",
"makeFolder": false,
"executable": "bin/wine64"
},
{
"name": "Lutris 6.10-2",
"version": "6.10-2",
"uri": "https://github.com/lutris/wine/releases/download/lutris-6.10-2/wine-lutris-6.10-2-x86_64.tar.xz",
"archive": "tar",
"folder": "lutris-6.10-2-x86_64",
"makeFolder": false,
"executable": "bin/wine64"
}
]
},

View file

@ -302,7 +302,7 @@ export class Genshinlib
}
// WINEPREFIX='/home/observer/genshin-impact-launcher/wineprefix' winetricks corefonts usetakefocus=n
public static async installPrefix (path: string, progress: (output: string, current: number, total: number) => void): Promise<void>
public static async installPrefix (prefixpath: string, progress: (output: string, current: number, total: number) => void): Promise<void>
{
let installationSteps = [
'Executing w_do_call corefonts',
@ -317,18 +317,32 @@ export class Genshinlib
'Executing load_trebuchet',
'Executing load_verdana',
'Executing load_webdings',
'Executing load_usetakefocus n'
'Executing load_usetakefocus n',
'Executing load_dxvk'
];
return new Promise((resolve) => {
let installationProgress = 0;
let installerProcess;
let installerProcess = spawn('winetricks', ['corefonts', 'usetakefocus=n'], {
env: {
...process.env,
WINEPREFIX: path
}
});
if (this.getConfig().runner)
{
installerProcess = spawn('winetricks', ['corefonts', 'usetakefocus=n', 'dxvk191'], {
env: {
...process.env,
WINEPREFIX: prefixpath,
WINE: path.join(this.runnersDir, this.getConfig().runner?.folder, this.getConfig().runner?.executable)
}
});
}
else {
installerProcess = spawn('winetricks', ['corefonts', 'usetakefocus=n'], {
env: {
...process.env,
WINEPREFIX: prefixpath
}
});
}
installerProcess.stdout.on('data', (data: string) => {
let str = data.toString();
@ -372,8 +386,7 @@ export class Genshinlib
let patcherProcess = exec(`yes yes | ${path.join(patchDir, 'patch.sh')}`, {
cwd: this.gameDir,
env: {
...process.env,
WINEPREFIX: this.prefixDir
...process.env
}
});
@ -384,8 +397,7 @@ export class Genshinlib
let patcherAntiCrashProcess = exec(`yes | ${path.join(patchDir, 'patch_anti_logincrash.sh')}`, {
cwd: this.gameDir,
env: {
...process.env,
WINEPREFIX: this.prefixDir
...process.env
}
});