From becb7db1248c80f7eb7b681ee0d4ec9ccf529086 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sun, 2 Jan 2022 02:38:42 +0200 Subject: [PATCH] Fixed AppImage compatibility --- src/ts/Configs.ts | 4 +++- src/ts/Launcher.ts | 2 +- src/ts/neutralino/Process.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ts/Configs.ts b/src/ts/Configs.ts index 3f8d41a..40d79e8 100644 --- a/src/ts/Configs.ts +++ b/src/ts/Configs.ts @@ -31,7 +31,9 @@ export default class Configs } resolve(config); - }).catch(() => resolve(undefined)); + }).catch(() => { + setTimeout(() => resolve(this.get(name)), 100); + }); }); } diff --git a/src/ts/Launcher.ts b/src/ts/Launcher.ts index 42a1d8e..aa8a0d7 100644 --- a/src/ts/Launcher.ts +++ b/src/ts/Launcher.ts @@ -40,7 +40,7 @@ export default class Launcher title: 'Settings', width: 900, height: 600, - enableInspector: true, + // enableInspector: true, exitProcessOnClose: false }); diff --git a/src/ts/neutralino/Process.ts b/src/ts/neutralino/Process.ts index bdb032c..3971307 100644 --- a/src/ts/neutralino/Process.ts +++ b/src/ts/neutralino/Process.ts @@ -1,3 +1,4 @@ +import constants from '../Constants'; import Debug, { DebugThread } from "../core/Debug"; declare const Neutralino; @@ -178,7 +179,7 @@ class Process public static run(command: string, options: ProcessOptions = {}): Promise { return new Promise(async (resolve) => { - const tmpFile = `${NL_CWD}/${10000 + Math.round(Math.random() * 89999)}.tmp`; + const tmpFile = `${await constants.paths.launcherDir}/${10000 + Math.round(Math.random() * 89999)}.tmp`; // Set env variables if (options.env)