@@ -19,7 +19,7 @@ const {
1919 REDUX_DEVTOOLS ,
2020} = require ( "electron-devtools-installer" ) ;
2121// Import Auto-Updater- Swell will update itself
22- const { autoUpdater } = require ( "electron-updater" ) ;
22+ // const { autoUpdater } = require("electron-updater");
2323// TouchBarButtons are our nav buttons(ex: Select All, Deselect All, Open Selected, Close Selected, Clear All)
2424const { TouchBarButton, TouchBarSpacer } = TouchBar ;
2525
@@ -44,9 +44,9 @@ const { ApolloLink } = require("apollo-link");
4444require ( "./menu/mainMenu" ) ;
4545
4646// configure logging
47- autoUpdater . logger = log ;
48- autoUpdater . logger . transports . file . level = "info" ;
49- log . info ( "App starting..." ) ;
47+ // autoUpdater.logger = log;
48+ // autoUpdater.logger.transports.file.level = "info";
49+ // log.info("App starting...");
5050
5151console . log ( "app.name is ->" , app . name )
5252
@@ -136,9 +136,11 @@ const touchBar = new TouchBar([
136136// -----------------------------------------------
137137
138138let isDev ;
139- process . argv . includes ( "--noDevServer" ) ? ( isDev = false ) : ( isDev = true ) ;
140-
141- console . log ( "isDev->" , isDev ) ;
139+ // if using Spectron, run it in production
140+ process . argv . includes ( "--noDevServer" ) || process . argv . includes ( "TEST_MODE" )
141+ ? ( isDev = false )
142+ : ( isDev = true ) ;
143+ console . log ( "is this in dev mode? " , isDev ) ;
142144// let isDev = false;
143145// console.log("process.defaultApp ->", process.defaultApp);
144146// console.log("process.execPath -> ", process.execPath);
@@ -264,9 +266,9 @@ function createWindow() {
264266app . on ( "ready" , ( ) => {
265267 // createLoadingScreen();
266268 createWindow ( ) ;
267- if ( ! isDev ) {
268- autoUpdater . checkForUpdates ( ) ;
269- }
269+ // if (!isDev) {
270+ // autoUpdater.checkForUpdates();
271+ // }
270272} ) ;
271273
272274// Quit when all windows are closed.
@@ -287,10 +289,10 @@ const sendStatusToWindow = (text) => {
287289 }
288290} ;
289291
290- ipcMain . on ( "check-for-update" , ( ) => {
291- //listens to ipcRenderer in UpdatePopUpContainer.jsx
292- if ( ! isDev ) autoUpdater . checkForUpdates ( ) ;
293- } ) ;
292+ // ipcMain.on("check-for-update", () => {
293+ // //listens to ipcRenderer in UpdatePopUpContainer.jsx
294+ // if (!isDev) autoUpdater.checkForUpdates();
295+ // });
294296// autoUpdater.on('checking-for-update', () => {
295297// sendStatusToWindow('Checking for update...');
296298// // });
@@ -300,28 +302,28 @@ ipcMain.on("check-for-update", () => {
300302// autoUpdater.on('update-not-available', info => {
301303// sendStatusToWindow('Update not available.');
302304// });
303- autoUpdater . on ( "error" , ( err ) => {
304- console . error ( "autoUpdater error -> " , err ) ;
305- sendStatusToWindow ( `Error in auto-updater` ) ;
306- } ) ;
307- autoUpdater . on ( "download-progress" , ( progressObj ) => {
308- sendStatusToWindow (
309- `Download speed: ${ progressObj . bytesPerSecond } - Downloaded ${ progressObj . percent } % (${ progressObj . transferred } + '/' + ${ progressObj . total } + )`
310- ) ;
311- } ) ;
312- autoUpdater . on ( "update-downloaded" , ( info ) => {
313- sendStatusToWindow ( "Update downloaded." ) ;
314- } ) ;
305+ // autoUpdater.on("error", (err) => {
306+ // console.error("autoUpdater error -> ", err);
307+ // sendStatusToWindow(`Error in auto-updater`);
308+ // });
309+ // autoUpdater.on("download-progress", (progressObj) => {
310+ // sendStatusToWindow(
311+ // `Download speed: ${progressObj.bytesPerSecond} - Downloaded ${progressObj.percent}% (${progressObj.transferred} + '/' + ${progressObj.total} + )`
312+ // );
313+ // });
314+ // autoUpdater.on("update-downloaded", (info) => {
315+ // sendStatusToWindow("Update downloaded.");
316+ // });
315317
316318// autoUpdater.on('update-downloaded', info => {
317319// // Wait 5 seconds, then quit and install
318320// // In your application, you don't need to wait 500 ms.
319321// // You could call autoUpdater.quitAndInstall(); immediately
320322// autoUpdater.quitAndInstall();
321323// });
322- ipcMain . on ( "quit-and-install" , ( ) => {
323- autoUpdater . quitAndInstall ( ) ;
324- } ) ;
324+ // ipcMain.on("quit-and-install", () => {
325+ // autoUpdater.quitAndInstall();
326+ // });
325327// App page reloads when user selects "Refresh" from pop-up dialog
326328ipcMain . on ( "fatalError" , ( ) => {
327329 console . log ( "received fatal error" ) ;
0 commit comments