aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Alphrag <34252790+Alphrag@users.noreply.github.com>2022-12-18 00:58:50 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-17 23:58:50 +0000
commit3e0e263b99e2d35459cb3b1b5d9e27d882850a2b (patch)
tree7a7d114bb281d4d02bb6258eafd70158b47063c3 /src/stores
parentUpgrade 'pnpm' to '7.18.2' and npm modules (diff)
downloadferdium-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.ts15
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';
21import Request from './lib/Request'; 21import Request from './lib/Request';
22import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; 22import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config';
23import { cleanseJSObject } from '../jsUtils'; 23import { cleanseJSObject } from '../jsUtils';
24import { isMac, electronVersion, osRelease } from '../environment'; 24import {
25 isMac,
26 isWinPortable,
27 electronVersion,
28 osRelease,
29} from '../environment';
25import { 30import {
26 ferdiumVersion, 31 ferdiumVersion,
27 userDataPath, 32 userDataPath,
@@ -41,7 +46,11 @@ const debug = require('../preload-safe-debug')('Ferdium:AppStore');
41 46
42const mainWindow = getCurrentWindow(); 47const mainWindow = getCurrentWindow();
43 48
44const executablePath = isMac ? remoteProcess.execPath : process.execPath; 49const executablePath = isMac
50 ? remoteProcess.execPath
51 : isWinPortable
52 ? process.env.PORTABLE_EXECUTABLE_FILE
53 : process.execPath;
45const autoLauncher = new AutoLaunch({ 54const 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