mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-24 18:48:14 +03:00
Preparations to 1.6.1 release (part 3)
- added roadmap goal (issue #35) - fixed issue with incorrect wine version unpacking
This commit is contained in:
parent
f401a52be1
commit
16504a499a
2 changed files with 33 additions and 23 deletions
|
@ -130,6 +130,7 @@ npm start
|
|||
* <s>Add winetricks auto-downloading when new prefix creates so it is no longer required</s> *(1.6.0)*
|
||||
* <s>DXVK logs auto-deletion option</s> *(1.6.0)*
|
||||
* <s>Add default wine version to download</s> (Proton-6.20-GE-1) *(1.6.0)*
|
||||
* Add winetricks and winecfg buttons to settings
|
||||
* Add dark theme support for settings menu
|
||||
* Fix button flickering at start when the launcher's state updates
|
||||
* Wine prefix folder selection *(symlinks?)*
|
||||
|
|
|
@ -95,34 +95,43 @@ $(() => {
|
|||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Download wine version
|
||||
*/
|
||||
LauncherUI.initProgressBar();
|
||||
|
||||
await Tools.downloadFile(defaultRunner.uri, path.join(constants.launcherDir, defaultRunner.name), (current: number, total: number, difference: number) => {
|
||||
LauncherUI.updateProgressBar(LauncherUI.i18n.translate('Downloading'), current, total, difference);
|
||||
}).then(async () => {
|
||||
const unpacker = defaultRunner.archive === 'tar' ?
|
||||
Tools.untar : Tools.unzip;
|
||||
|
||||
LauncherUI.initProgressBar();
|
||||
|
||||
await unpacker(
|
||||
path.join(constants.launcherDir, defaultRunner.name),
|
||||
defaultRunner.makeFolder ?
|
||||
path.join(constants.runnersDir, defaultRunner.folder) :
|
||||
constants.runnersDir,
|
||||
(current: number, total: number, difference: number) => {
|
||||
LauncherUI.updateProgressBar(LauncherUI.i18n.translate('Unpacking'), current, total, difference);
|
||||
}
|
||||
).then(() => {
|
||||
fs.unlinkSync(path.join(constants.launcherDir, defaultRunner.name));
|
||||
|
||||
LauncherLib.updateConfig('runner.name', defaultRunner.name);
|
||||
LauncherLib.updateConfig('runner.folder', defaultRunner.folder);
|
||||
LauncherLib.updateConfig('runner.executable', defaultRunner.executable);
|
||||
|
||||
LauncherUI.clearProgressBar();
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Unpack it to the runners folder
|
||||
*/
|
||||
const unpacker = defaultRunner.archive === 'tar' ?
|
||||
Tools.untar : Tools.unzip;
|
||||
|
||||
LauncherUI.initProgressBar();
|
||||
|
||||
await unpacker(
|
||||
path.join(constants.launcherDir, defaultRunner.name),
|
||||
defaultRunner.makeFolder ?
|
||||
path.join(constants.runnersDir, defaultRunner.folder) :
|
||||
constants.runnersDir,
|
||||
(current: number, total: number, difference: number) => {
|
||||
LauncherUI.updateProgressBar(LauncherUI.i18n.translate('Unpacking'), current, total, difference);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* And update config file with this runner
|
||||
*/
|
||||
fs.unlinkSync(path.join(constants.launcherDir, defaultRunner.name));
|
||||
|
||||
LauncherLib.updateConfig('runner.name', defaultRunner.name);
|
||||
LauncherLib.updateConfig('runner.folder', defaultRunner.folder);
|
||||
LauncherLib.updateConfig('runner.executable', defaultRunner.executable);
|
||||
|
||||
LauncherUI.clearProgressBar();
|
||||
}
|
||||
|
||||
// Creating wine prefix
|
||||
|
|
Loading…
Reference in a new issue