Permalink
Browse files

Backend groundwork for autoupdating

  • Loading branch information...
RedDuckss committed Sep 9, 2017
1 parent 2709b8d commit 6dbb0ee8ef8f16f1f71586fdaea14e6c62cd5570
Showing with 29 additions and 0 deletions.
  1. +21 −0 app.js
  2. +3 −0 dev-app-update.yml
  3. +5 −0 package.json
View
21 app.js
@@ -1,4 +1,5 @@
var electron = require('electron'),
updater = require("electron-updater").autoUpdater,
//electron_reload = require('electron-reload')(__dirname), // lmao super broke idek why this is here
exec = require('child_process').exec,
smm = require('smm-api'),
@@ -26,6 +27,25 @@ var electron = require('electron'),
ipcMain = electron.ipcMain,
app = electron.app;
updater.on('checking-for-update', () => {
console.log('Checking for update...');
})
updater.on('update-available', (info) => {
console.log('Update available.');
})
updater.on('update-not-available', (info) => {
console.log('Update not available.');
})
updater.on('error', (err) => {
console.log('Error in auto-updater.');
})
updater.on('download-progress', (progressObj) => {
console.log(log_message);
})
updater.on('update-downloaded', (info) => {
console.log('Update downloaded; will install in 5 seconds');
});
let ApplicationWindow;
const API_ROOT_CHECK = '104.236.44.105';
@@ -61,6 +81,7 @@ function createWindow(file) {
}
app.on('ready', function() {
updater.checkForUpdates()
createWindow('index');
ApplicationWindow.webContents.on('new-window', function(event, url) {
event.preventDefault();
View
@@ -0,0 +1,3 @@
owner: RedDuckss
repo: CemUI
provider: github
View
@@ -33,6 +33,11 @@
"electron-reload": "^1.2.1"
},
"build": {
"publish": [{
"provider": "github",
"owner": "RedDuckss",
"repo": "CemUI"
}],
"appId": "com.cemui.app",
"productName": "CemUI",
"asar": true,

0 comments on commit 6dbb0ee

Please sign in to comment.