From e3290c1117a47dbf7c6cf160c7c75420b9c46147 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 1 Dec 2016 11:35:26 +0000 Subject: [PATCH] Switch to new auto-update & add linux build * Remove squirrel hooks (the installing & uninstalling is now done by the, er, installer) * Switch to electron-auto-update * Shorten initial update delay because we no longer need to wait for squirrel to release a lock file * Change update URLs because windows is now one installer for both 32 & 64 bit. * Update electron-builder to 10 where NSIS is now the default target for Windows. * Add linux to the target list, building a deb. * Remove sqirrel-specific installation spinner * Remove redundant !**/* from files --- electron/build/install-spinner.gif | Bin 23967 -> 0 bytes electron/src/electron-main.js | 41 ++++++++++------------------- electron/src/squirrelhooks.js | 30 --------------------- package.json | 12 +++++---- 4 files changed, 21 insertions(+), 62 deletions(-) delete mode 100644 electron/build/install-spinner.gif delete mode 100644 electron/src/squirrelhooks.js diff --git a/electron/build/install-spinner.gif b/electron/build/install-spinner.gif deleted file mode 100644 index 4a89337be40cf202fe232bca49c1c0c84b278463..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23967 zcmd?Q^bYjBsrB|va@cXu7!6C}911`R<12@o6-PQH8Z z_uc1y?%DSbIJbZ4?$uSb*6OaVu3k?)atg8nf@Um07U10rV5zP>bfRMC>f}1@-Bo<_ zp{053OxVR zq?ew$n>=lnZ=#0)$0R??@U%=Qf{-}#Yg3h_e>ty z+y43e`z9wnf2r%#4R%u+@Vqg3Tv2%*`2KxLTGnFw@AI?3vCC4_#3?mXR-4 zM}K}@hFHem`n<-L1e>-nG;byFRi?N>B2v~b(nkYN_lTQzVIZgS#o zAL^UZ;2QhI)8}VS=JVmfbw={~{Fl0oq57r4yMexHrjJ@Qv(V)bO^Q$vI@1H>? z#o<*~x&HNOE!USf-_p`say!#K^CG6IPHunJuMM3zJH9;J2N}mCn}m0k^qnUst+akj zn}Ciw#JY5kLzJETk)x@6h8=*6rze`P#>a!Q7vj z8MkGy+uV#V?*l(2lvX7)w)&?(Jw9C*<*vr2)c5sW?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1+K=Bx$b2)!yY*l*v*I6$!*9?OvFYPVxvhT9h!Ux{3XN(-sABV76n~Xw= zBy2x25txT@R0C9cmtqdhPBPFb3_6KW@asU4(C;Rn-CDePMv6?CbtpaMYLt zRVN1@98iZQRJRB%HW}Ui;I=&%n7LDFUAx zI@l$x!|N#Gkczb7GzS_PEce`60^h`ovt71)FFND26ia>x-m8*9j=qR+Y4MLn4jUbK zal$MeB)CMq`uc`N0?dNkD4{_Q+^1SZgWqGQFW+I*=EJh^fTvQ!8N$5i2GP`dXb9F8 T>|@V>heO2~5&w^bLiPUwJMS@r diff --git a/electron/src/electron-main.js b/electron/src/electron-main.js index fe083930..044eca56 100644 --- a/electron/src/electron-main.js +++ b/electron/src/electron-main.js @@ -17,13 +17,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Squirrel on windows starts the app with various flags -// as hooks to tell us when we've been installed/uninstalled -// etc. -const check_squirrel_hooks = require('./squirrelhooks'); -if (check_squirrel_hooks()) return; - const electron = require('electron'); + +// Auto updater from the 'electron-auto-updater' package for NSIS +// auto-update support (not the one that comes with electron). +const autoUpdater = require('electron-auto-updater').autoUpdater; const url = require('url'); const VectorMenu = require('./vectormenu'); @@ -45,7 +43,7 @@ const PERMITTED_URL_SCHEMES = [ ]; const UPDATE_POLL_INTERVAL_MS = 60 * 60 * 1000; -const INITIAL_UPDATE_DELAY_MS = 30 * 1000; +const INITIAL_UPDATE_DELAY_MS = 5 * 1000; let mainWindow = null; let appQuitting = false; @@ -90,12 +88,12 @@ function installUpdate() { // for some reason, quitAndInstall does not fire the // before-quit event, so we need to set the flag here. appQuitting = true; - electron.autoUpdater.quitAndInstall(); + autoUpdater.quitAndInstall(); } function pollForUpdates() { try { - electron.autoUpdater.checkForUpdates(); + autoUpdater.checkForUpdates(); } catch (e) { console.log("Couldn't check for update", e); } @@ -106,30 +104,19 @@ function startAutoUpdate(update_url) { update_url = update_url + '/'; } try { - // For reasons best known to Squirrel, the way it checks for updates - // is completely different between macOS and windows. On macOS, it - // hits a URL that either gives it a 200 with some json or - // 204 No Content. On windows it takes a base path and looks for - // files under that path. + // Since writing, the electron auto update process has changed from being + // completely different between platforms to being differently completely + // different. On Mac, we set the feed URL here. On Windows, it uses a + // yaml file bundled at build time from the 'publish' entry in the + // package.json. There is no autoupdate for Linux: it's expected that + // the distro will provide it. if (process.platform == 'darwin') { - // macos only has 64 bit - electron.autoUpdater.setFeedURL(update_url + 'macos/'); - } else if (process.platform == 'win32') { - // We split by 32/64 bit too: the builds are different and entirely separate - electron.autoUpdater.setFeedURL(update_url + 'win32/' + process.arch + '/'); - } else { - // Squirrel / electron only supports auto-update on these two platforms. - // I'm not even going to try to guess which feed style they'd use if they - // implemented it on Linux, or if it would be different again. - console.log("Auto update not supported on this platform"); + autoUpdater.setFeedURL(update_url + 'macos/'); } // We check for updates ourselves rather than using 'updater' because we need to // do it in the main process (and we don't really need to check every 10 minutes: // every hour should be just fine for a desktop app) // However, we still let the main window listen for the update events. - // We also wait a short time before checking for updates the first time because - // of squirrel on windows and it taking a small amount of time to release a - // lock file. setTimeout(pollForUpdates, INITIAL_UPDATE_DELAY_MS); setInterval(pollForUpdates, UPDATE_POLL_INTERVAL_MS); } catch (err) { diff --git a/electron/src/squirrelhooks.js b/electron/src/squirrelhooks.js deleted file mode 100644 index 10fb8d9e..00000000 --- a/electron/src/squirrelhooks.js +++ /dev/null @@ -1,30 +0,0 @@ -const path = require('path'); -const spawn = require('child_process').spawn; -const app = require('electron').app; - -function run_update_exe(args, done) { - const updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe'); - spawn(updateExe, args, { - detached: true - }).on('close', done); -}; - -function check_squirrel_hooks() { - if (process.platform != 'win32') return false; - - const cmd = process.argv[1]; - const target = path.basename(process.execPath); - if (cmd === '--squirrel-install' || cmd === '--squirrel-updated') { - run_update_exe(['--createShortcut=' + target + ''], app.quit); - return true; - } else if (cmd === '--squirrel-uninstall') { - run_update_exe(['--removeShortcut=' + target + ''], app.quit); - return true; - } else if (cmd === '--squirrel-obsolete') { - app.quit(); - return true; - } - return false; -} - -module.exports = check_squirrel_hooks; diff --git a/package.json b/package.json index 54de856b..0f16ce71 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "build:compile": "babel --source-maps -d lib src", "build:bundle": "NODE_ENV=production webpack -p --progress", "build:bundle:dev": "webpack --optimize-occurence-order --progress", - "build:electron": "rimraf electron/dist && npm run clean && npm run build && build -wm --ia32 --x64 && scripts/check-electron.sh", + "build:electron": "rimraf electron/dist && npm run clean && npm run build && build -wml --ia32 --x64 && scripts/check-electron.sh", "build": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle", "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle:dev", "dist": "scripts/package.sh", @@ -58,6 +58,7 @@ "browser-request": "^0.3.3", "classnames": "^2.1.2", "draft-js": "^0.8.1", + "electron-auto-updater": "^0.6.2", "extract-text-webpack-plugin": "^0.9.1", "favico.js": "^0.3.10", "filesize": "^3.1.2", @@ -97,7 +98,7 @@ "catw": "^1.0.1", "cpx": "^1.3.2", "css-raw-loader": "^0.1.1", - "electron-builder": "^7.23.2", + "electron-builder": "^10.4.1", "emojione": "^2.2.3", "expect": "^1.16.0", "fs-extra": "^0.30.0", @@ -134,14 +135,15 @@ "dereference": true, "//files": "We bundle everything, so we only need to include webapp/", "files": [ - "!**/*", "electron/src/**", "electron/img/**", + "node_modules/electron-auto-updater/**", "webapp/**", "package.json" ], - "squirrelWindows": { - "iconUrl": "https://riot.im/favicon.ico" + "linux": { + "target": "deb", + "maintainer": "support@riot.im" } }, "directories": {