diff --git a/README.md b/README.md
index 4f1cba9..a94947e 100644
--- a/README.md
+++ b/README.md
@@ -130,6 +130,7 @@ npm start
* Add winetricks auto-downloading when new prefix creates so it is no longer required *(1.6.0)*
* DXVK logs auto-deletion option *(1.6.0)*
* Add default wine version to download (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?)*
diff --git a/src/ts/index.ts b/src/ts/index.ts
index d1eb501..3208308 100644
--- a/src/ts/index.ts
+++ b/src/ts/index.ts
@@ -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