Skip to content

Commit

Permalink
Bold Behnken 0.6.5 Release Ready
Browse files Browse the repository at this point in the history
  • Loading branch information
zCoCo committed Oct 2, 2020
1 parent 14e4fad commit 54785fd
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified Apps/.DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion Apps/FrontendSoftware/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "irisrover-ground-terminal-bold-behnken",
"productName": "Iris Terminal",
"version": "0.6.3",
"version": "0.6.5",
"description": "Terminal Software for the Iris Rover (L2021)",
"author": {
"name": "Iris Rover Project & CMU",
Expand Down Expand Up @@ -30,6 +30,7 @@
"d3": "^5.16.0",
"d3-sankey": "^0.12.3",
"electron": "^3.1.13",
"electron-log": "^4.2.4",
"electron-splashscreen": "^1.0.0",
"electron-unhandled": "^3.0.2",
"electron-updater": "^4.3.4",
Expand Down
48 changes: 44 additions & 4 deletions Apps/FrontendSoftware/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,27 @@
*
* Author: Connor W. Colombo
* Created: 1/2019
* Last Updated: 08/17/2020
* Last Updated: 10/01/2020
*/

/* global __static */
import path from 'path'

// Electron Dependencies:
import { app, protocol, BrowserWindow } from 'electron'
import { autoUpdater } from 'electron-updater'
import { initSplashScreen, OfficeTemplate } from 'electron-splashscreen';
import log from 'electron-log';
// autoUpdater.logger = log;
// autoUpdater.transports.file.level = 'info';

// Vue Dependencies:
import {
createProtocol,
installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib'
const isDevelopment = process.env.NODE_ENV !== 'production'

/* global __static */
import path from 'path'

// Handle all unhandled exceptions for diagnostics (and reporting):
const unhandled = require('electron-unhandled');
unhandled();
Expand Down Expand Up @@ -157,3 +163,37 @@ if (isDevelopment) {
})
}
}

// #### AUTO-UPDATE MESSAGES #### //

function sendUpdateMessage(msg){
if(win){
win.webContents.send('message', msg);
}
}

autoUpdater.on('checking-for-update', () => {
sendUpdateMessage('Checking for update...');
});

autoUpdater.on('update-available', () => {
sendUpdateMessage('Update available!');
});

autoUpdater.on('update-not-available', () => {
sendUpdateMessage('No updates available.');
});

autoUpdater.on('download-progress', (progress) => {
sendUpdateMessage(`Download Speed: ${progress.bytesPerSecond}bps — ${progress.percent}% Complete — ${progress.transferred} / ${progress.total}`);
});

autoUpdater.on('update-downloaded', () => {
sendUpdateMessage(`Update download complete. Installing now. App will close in 10s.`);
setTimeout( () => {autoUpdater.quitAndInstall();}, 10000 );

});

autoUpdater.on('error', (err) => {
sendUpdateMessage(`Error during auto-update. Info: ${err.toString()}`);
});

0 comments on commit 54785fd

Please sign in to comment.