diff options
author | 2017-10-23 16:35:44 +0200 | |
---|---|---|
committer | 2017-10-23 16:35:44 +0200 | |
commit | 05ce37fdf006819835d6751f6c6aedaff3d6beb3 (patch) | |
tree | f086106eebd2e0fd7d77289735d6f3b953e4395f /src/stores | |
parent | reset S3 deploy key for testing builds (diff) | |
download | ferdium-app-05ce37fdf006819835d6751f6c6aedaff3d6beb3.tar.gz ferdium-app-05ce37fdf006819835d6751f6c6aedaff3d6beb3.tar.zst ferdium-app-05ce37fdf006819835d6751f6c6aedaff3d6beb3.zip |
Add missing windows commit
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 28fe14049..357ae7aed 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -16,10 +16,6 @@ import Miner from '../lib/Miner'; | |||
16 | const { app, getCurrentWindow, powerMonitor } = remote; | 16 | const { app, getCurrentWindow, powerMonitor } = remote; |
17 | const defaultLocale = 'en-US'; | 17 | const defaultLocale = 'en-US'; |
18 | 18 | ||
19 | const appFolder = path.dirname(process.execPath); | ||
20 | const updateExe = path.resolve(appFolder, '..', 'Update.exe'); | ||
21 | const exeName = path.basename(process.execPath); | ||
22 | |||
23 | export default class AppStore extends Store { | 19 | export default class AppStore extends Store { |
24 | updateStatusTypes = { | 20 | updateStatusTypes = { |
25 | CHECKING: 'CHECKING', | 21 | CHECKING: 'CHECKING', |
@@ -181,9 +177,9 @@ export default class AppStore extends Store { | |||
181 | if (process.platform === 'win32') { | 177 | if (process.platform === 'win32') { |
182 | settings = Object.assign({ | 178 | settings = Object.assign({ |
183 | openAsHidden: openInBackground, | 179 | openAsHidden: openInBackground, |
184 | path: updateExe, | 180 | path: app.getPath('exe'), |
185 | args: [ | 181 | args: [ |
186 | '--processStart', `"${exeName}"`, | 182 | '--processStart', `"${path.basename(app.getPath('exe'))}"`, |
187 | ], | 183 | ], |
188 | }, settings); | 184 | }, settings); |
189 | 185 | ||
@@ -316,7 +312,7 @@ export default class AppStore extends Store { | |||
316 | 312 | ||
317 | _checkAutoStart() { | 313 | _checkAutoStart() { |
318 | const loginItem = app.getLoginItemSettings({ | 314 | const loginItem = app.getLoginItemSettings({ |
319 | path: updateExe, | 315 | path: app.getPath('exe'), |
320 | }); | 316 | }); |
321 | 317 | ||
322 | this.autoLaunchOnStart = loginItem.openAtLogin; | 318 | this.autoLaunchOnStart = loginItem.openAtLogin; |