Fixed prefix creation

- `Prefix.getWinetricks()` now makes `winetricks.sh` executable
- added test patch hint
- fixed `Install` script error with game updating
- fixed `InstallWine` and `InstallDXVK` scripts work
  now they select installed things in config file
This commit is contained in:
Observer KRypt0n_ 2021-12-30 15:04:09 +02:00
parent aa4539cec3
commit 7088842f53
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
6 changed files with 22 additions and 5 deletions

View file

@ -92,5 +92,5 @@
<img src={Download} alt="Download" />
</button>
<button class="button" id="launch">Launch</button>
<button class="button hint--top hint--large" aria-label="" id="launch">Launch</button>
</main>

View file

@ -51,7 +51,11 @@ export default class Prefix
.then(() => resolve(winetricksPath))
.catch(() => {
Downloader.download(constants.uri.winetricks, winetricksPath).then((stream) => {
stream.finish(() => resolve(winetricksPath));
stream.finish(async () => {
await Neutralino.os.execCommand(`chmod +x '${Process.addSlashes(winetricksPath)}'`);
resolve(winetricksPath);
});
});
});
});

View file

@ -145,9 +145,10 @@ export default class State
break;
case 'test-patch-available':
// todo some warning message
this.launchButton.textContent = 'Apply test patch';
this.launchButton.setAttribute('aria-label', 'This game version has an anti-cheat patch, but it is in the testing phase. You can wait a few days until it is stable or apply it at your own risk');
break;
case 'patch-unavailable':

View file

@ -2,16 +2,21 @@ import type Launcher from '../../Launcher';
import Game from '../../Game';
import Prefix from '../../core/Prefix';
import constants from '../../Constants';
export default (launcher: Launcher): Promise<void> => {
return new Promise(async (resolve) => {
Prefix.exists().then((exists) => {
const prefixDir = await constants.paths.prefix.current;
Prefix.exists(prefixDir).then((exists) => {
if (!exists)
{
import('./CreatePrefix').then((module) => {
module.default(launcher).then(() => updateGame());
});
}
else updateGame();
});
const updateGame = async () => {

View file

@ -43,6 +43,10 @@ export default (launcher: Launcher): Promise<void> => {
stream?.unpackFinish(async () => {
unpacking = true;
// Select this DXVK
await DXVK.current('1.9.2');
// And apply it
DXVK.apply(await constants.paths.prefix.current, '1.9.2').then(() => {
launcher.progressBar?.hide();

View file

@ -34,7 +34,10 @@ export default (launcher: Launcher): Promise<void> => {
launcher.progressBar?.update(current, total, difference);
});
stream?.unpackFinish(() => {
stream?.unpackFinish(async () => {
// Select this runner
await Runners.current('lutris-ge-6.21-1-x86_64');
// Create prefix if it is not created
import('./CreatePrefix').then((module) => {
module.default(launcher).then(() => {