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:
Observer KRypt0n_ 2021-11-26 21:41:56 +02:00
parent f401a52be1
commit 16504a499a
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
2 changed files with 33 additions and 23 deletions

View file

@ -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>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>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)* * <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 * Add dark theme support for settings menu
* Fix button flickering at start when the launcher's state updates * Fix button flickering at start when the launcher's state updates
* Wine prefix folder selection *(symlinks?)* * Wine prefix folder selection *(symlinks?)*

View file

@ -95,34 +95,43 @@ $(() => {
}); });
}); });
/**
* Download wine version
*/
LauncherUI.initProgressBar(); LauncherUI.initProgressBar();
await Tools.downloadFile(defaultRunner.uri, path.join(constants.launcherDir, defaultRunner.name), (current: number, total: number, difference: number) => { 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); 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 // Creating wine prefix