diff --git a/js/app.js b/js/app.js index 73ee1da..70244f8 100644 --- a/js/app.js +++ b/js/app.js @@ -2,7 +2,9 @@ ready(function(){ const settings = require('electron-settings'); const fixPath = require('fix-path'); document.isStarting = true; - addSentry(); + if (isDevMode()) { + addSentry(); + } fixPath(); displayOptions(); preFillSettings(); @@ -13,7 +15,7 @@ ready(function(){ checkForAdminRights(); displayVersion(); reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically')); - if (require('os').platform() === 'win32') { + if (require('os').platform() === 'win32' && isDevMode()) { recreateShortcut(); } handlePlatformSpecificDisplay(); diff --git a/js/methods.js b/js/methods.js index 1de359f..c686026 100644 --- a/js/methods.js +++ b/js/methods.js @@ -656,3 +656,10 @@ function updateScheduledStartOnBoot(toBeEnabled) { } }); } + +/** + * Return true if dev mode. + */ +function isDevMode() { + return require('electron').remote.app.isPackaged; +}