diff options
author | Alphrag <34252790+Alphrag@users.noreply.github.com> | 2022-12-18 00:58:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-17 23:58:50 +0000 |
commit | 3e0e263b99e2d35459cb3b1b5d9e27d882850a2b (patch) | |
tree | 7a7d114bb281d4d02bb6258eafd70158b47063c3 /src/stores | |
parent | Upgrade 'pnpm' to '7.18.2' and npm modules (diff) | |
download | ferdium-app-3e0e263b99e2d35459cb3b1b5d9e27d882850a2b.tar.gz ferdium-app-3e0e263b99e2d35459cb3b1b5d9e27d882850a2b.tar.zst ferdium-app-3e0e263b99e2d35459cb3b1b5d9e27d882850a2b.zip |
Fix issues with executable when using portable on windows (#850)
* Fix startup executable for windows portable
* Set folder name of unpacking for windows portable exe
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.ts | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts index 2db90bfa0..02d616241 100644 --- a/src/stores/AppStore.ts +++ b/src/stores/AppStore.ts | |||
@@ -21,7 +21,12 @@ import TypedStore from './lib/TypedStore'; | |||
21 | import Request from './lib/Request'; | 21 | import Request from './lib/Request'; |
22 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 22 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
23 | import { cleanseJSObject } from '../jsUtils'; | 23 | import { cleanseJSObject } from '../jsUtils'; |
24 | import { isMac, electronVersion, osRelease } from '../environment'; | 24 | import { |
25 | isMac, | ||
26 | isWinPortable, | ||
27 | electronVersion, | ||
28 | osRelease, | ||
29 | } from '../environment'; | ||
25 | import { | 30 | import { |
26 | ferdiumVersion, | 31 | ferdiumVersion, |
27 | userDataPath, | 32 | userDataPath, |
@@ -41,7 +46,11 @@ const debug = require('../preload-safe-debug')('Ferdium:AppStore'); | |||
41 | 46 | ||
42 | const mainWindow = getCurrentWindow(); | 47 | const mainWindow = getCurrentWindow(); |
43 | 48 | ||
44 | const executablePath = isMac ? remoteProcess.execPath : process.execPath; | 49 | const executablePath = isMac |
50 | ? remoteProcess.execPath | ||
51 | : isWinPortable | ||
52 | ? process.env.PORTABLE_EXECUTABLE_FILE | ||
53 | : process.execPath; | ||
45 | const autoLauncher = new AutoLaunch({ | 54 | const autoLauncher = new AutoLaunch({ |
46 | name: 'Ferdium', | 55 | name: 'Ferdium', |
47 | path: executablePath, | 56 | path: executablePath, |
@@ -279,7 +288,7 @@ export default class AppStore extends TypedStore { | |||
279 | if (isMac && !localStorage.getItem(CATALINA_NOTIFICATION_HACK_KEY)) { | 288 | if (isMac && !localStorage.getItem(CATALINA_NOTIFICATION_HACK_KEY)) { |
280 | debug('Triggering macOS Catalina notification permission trigger'); | 289 | debug('Triggering macOS Catalina notification permission trigger'); |
281 | // eslint-disable-next-line no-new | 290 | // eslint-disable-next-line no-new |
282 | new window.Notification('Welcome to Ferdium 5', { | 291 | new window.Notification('Welcome to Ferdium 6', { |
283 | body: 'Have a wonderful day & happy messaging.', | 292 | body: 'Have a wonderful day & happy messaging.', |
284 | }); | 293 | }); |
285 | 294 | ||