@@ -11,13 +11,17 @@ const i18n = require('./i18next.config');
11
11
const { getLogger } = require ( './wktLogging' ) ;
12
12
const errorUtils = require ( './errorUtils' ) ;
13
13
const { sendToWindow } = require ( './windowUtils' ) ;
14
+ const osUtils = require ( './osUtils' ) ;
14
15
15
16
let _isDevMode ;
17
+ let _supportsAutoUpdate ;
16
18
let _downloadWindow ;
17
19
let _installType ;
18
20
21
+ /* global process */
19
22
function initializeAutoUpdater ( logger , isDevMode ) {
20
23
_isDevMode = isDevMode ;
24
+ _supportsAutoUpdate = ! ( osUtils . isLinux ( ) && ! process . env . APPIMAGE ) ;
21
25
autoUpdater . logger = logger ;
22
26
autoUpdater . autoDownload = false ;
23
27
autoUpdater . autoInstallOnAppQuit = true ;
@@ -44,7 +48,7 @@ function registerAutoUpdateListeners() {
44
48
// if the application is current with the latest version, or an error occurs, the Promise resolves to null.
45
49
// if notifyOnFailures is true, dialogs are displayed when no result is provided.
46
50
async function getUpdateInformation ( notifyOnFailures ) {
47
- if ( ! _isDevMode ) {
51
+ if ( ! _isDevMode && _supportsAutoUpdate ) {
48
52
try {
49
53
const checkResult = await autoUpdater . checkForUpdates ( ) ;
50
54
const releaseName = checkResult . updateInfo . releaseName ;
@@ -79,8 +83,13 @@ async function getUpdateInformation(notifyOnFailures) {
79
83
// Only show the prompt if the user used the menu to trigger checkForUpdates()
80
84
// If triggered on startup, no need to display...
81
85
//
82
- dialog . showErrorBox ( i18n . t ( 'auto-updater-disabled-dev-mode-title' ) ,
83
- i18n . t ( 'auto-updater-disabled-dev-mode-message' ) ) ;
86
+ if ( _isDevMode ) {
87
+ dialog . showErrorBox ( i18n . t ( 'auto-updater-disabled-dev-mode-title' ) ,
88
+ i18n . t ( 'auto-updater-disabled-dev-mode-message' ) ) ;
89
+ } else {
90
+ dialog . showErrorBox ( i18n . t ( 'auto-updater-disabled-unsupported-title' ) ,
91
+ i18n . t ( 'auto-updater-disabled-unsupported-message' ) ) ;
92
+ }
84
93
}
85
94
86
95
return null ;
0 commit comments