Skip to content

Commit d68a8e6

Browse files
committed
1.0.1
1 parent cfbf063 commit d68a8e6

File tree

167 files changed

+15221
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+15221
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
2+
!app/node_modules
23
build
34
release

Gruntfile.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ grunt.initConfig
2121
src: 'electron/electron.exe'
2222
dest: 'build/Birdex.exe'
2323
app:
24-
src: 'app/*'
24+
expand: true
25+
src: 'app/**'
2526
dest: 'build/resources/'
2627

2728
rcedit:
@@ -48,7 +49,7 @@ grunt.initConfig
4849
exe: 'Birdex.exe'
4950
noMsi: true
5051
setupIcon: 'app/birdex.ico'
51-
iconUrl: 'https://raw.githubusercontent.com/AlgorithmLLC/chat-client-electron/app/birdex.ico'
52+
iconUrl: 'https://cdn.rawgit.com/AlgorithmLLC/chat-client-electron/master/app/birdex.ico'
5253
remoteReleases: 'https://github.com/AlgorithmLLC/chat-client-electron'
5354

5455
grunt.registerTask 'default', ['clean', 'copy', 'rcedit', 'create-windows-installer', 'clean:build']

app/main.js

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,48 @@ const handleSetupEvent = function() {
5959
// we update to the new version - it's the opposite of
6060
// --squirrel-updated
6161

62-
setTimeout(app.quit, 1000);
62+
app.quit();
6363
return true;
6464
}
6565
};
6666
if (handleSetupEvent()) {
6767
return;
6868
}
6969

70+
let downloadedUpdate = false;
71+
72+
const GhReleases = require('electron-gh-releases')
73+
let options = {
74+
repo: 'AlgorithmLLC/chat-client-electron',
75+
currentVersion: app.getVersion()
76+
};
77+
const updater = new GhReleases(options);
78+
// Check for updates
79+
// `status` returns true if there is a new update available
80+
updater.check((err, status) => {
81+
if (!err && status) {
82+
// Download the update
83+
updater.download();
84+
}
85+
});
86+
// When an update has been downloaded
87+
updater.on('update-downloaded', (info) => {
88+
// Restart the app and install the update
89+
downloadedUpdate = true;
90+
});
91+
92+
7093
// Quit when all windows are closed.
7194
app.on('window-all-closed', function() {
72-
app.quit();
95+
if (downloadedUpdate) {
96+
updater.install();
97+
} else {
98+
app.quit();
99+
}
73100
});
74101

75-
let mainWindow;
76102

103+
let mainWindow;
77104
// This method will be called when Electron has finished
78105
// initialization and is ready to create browser windows.
79106
app.on('ready', function() {

app/node_modules/.bin/semver

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/node_modules/.bin/semver.cmd

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/node_modules/capture-stack-trace/index.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/node_modules/capture-stack-trace/package.json

Lines changed: 83 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/node_modules/capture-stack-trace/readme.md

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/node_modules/core-util-is/LICENSE

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/node_modules/core-util-is/README.md

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)