fix(developers): Avoid recreate shortcut and enabling Sentry in development mode.

This commit is contained in:
Quentin Decaunes 2019-08-16 12:37:57 +02:00
parent 22554b41dc
commit 32e94d7fc2
2 changed files with 11 additions and 2 deletions

View File

@ -2,7 +2,9 @@ ready(function(){
const settings = require('electron-settings');
const fixPath = require('fix-path');
document.isStarting = true;
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();

View File

@ -656,3 +656,10 @@ function updateScheduledStartOnBoot(toBeEnabled) {
}
});
}
/**
* Return true if dev mode.
*/
function isDevMode() {
return require('electron').remote.app.isPackaged;
}