aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js10
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';
16const { app, getCurrentWindow, powerMonitor } = remote; 16const { app, getCurrentWindow, powerMonitor } = remote;
17const defaultLocale = 'en-US'; 17const defaultLocale = 'en-US';
18 18
19const appFolder = path.dirname(process.execPath);
20const updateExe = path.resolve(appFolder, '..', 'Update.exe');
21const exeName = path.basename(process.execPath);
22
23export default class AppStore extends Store { 19export 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;