Skip to content

Commit 0ce99f6

Browse files
committed
1.0.6
1 parent 7c68ade commit 0ce99f6

4 files changed

Lines changed: 19 additions & 9 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_modules
33
electron
44
build
55
release
6+
algorithm.pfx
7+
app/birdex/

Gruntfile.coffee

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ grunt.initConfig
3737
dest: 'build/Birdex.exe'
3838
app:
3939
expand: true
40-
src: 'app/**'
41-
dest: 'build/resources/'
40+
cwd: 'app/'
41+
src: ['*', 'node_modules/**']
42+
dest: 'build/resources/app/'
4243

4344
rcedit:
4445
exes:
@@ -52,8 +53,8 @@ grunt.initConfig
5253
'version-string':
5354
'ProductName': 'Birdex'
5455
'FileDescription': 'Secure messenger'
55-
'CompanyName': 'Algorithm LLC'
56-
'LegalCopyright': 'Copyright © 2016 Algorithm LLC. All rights reserved.'
56+
'CompanyName': 'Algorithm Corporation L.P.'
57+
'LegalCopyright': 'Copyright © 2016 Algorithm Corporation L.P. All rights reserved.'
5758

5859
'create-windows-installer':
5960
ia32:
@@ -65,7 +66,12 @@ grunt.initConfig
6566
noMsi: true
6667
setupIcon: 'app/birdex.ico'
6768
iconUrl: 'https://cdn.rawgit.com/AlgorithmLLC/chat-client-electron/master/app/birdex.ico'
69+
owners: 'Algorithm Corporation L.P.'
70+
authors: 'Algorithm Corporation L.P.'
6871
remoteReleases: 'https://github.com/AlgorithmLLC/chat-client-electron'
72+
certificateFile: 'algorithm.pfx'
73+
certificatePassword: ''
6974

7075
grunt.registerTask 'build', ['shell:kill', 'clean', 'download-electron', 'copy', 'rcedit', 'shell:run', 'shell:kill']
71-
grunt.registerTask 'default', ['shell:kill', 'clean', 'download-electron', 'copy', 'rcedit', 'create-windows-installer', 'clean:build']
76+
grunt.registerTask 'release', ['shell:kill', 'clean', 'download-electron', 'copy', 'rcedit', 'create-windows-installer', 'clean:build']
77+
# grunt.registerTask 'default', []

app/main.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const electron = require('electron');
33
const app = electron.app;
44
const BrowserWindow = electron.BrowserWindow;
55

6-
const APP_URL = 'app://birdex/index.html'; // birdex.asar
6+
const APP_URL = 'app://birdex/index.html'; // birdex.asar or birdex/web folder
77
// const APP_URL = 'http://new.001.birdex.org/';
88
// const APP_URL = 'http://oleg.dev:8000/index-dev.html';
99
// const APP_URL = 'http://oleg.dev:8000/index.html';
@@ -107,9 +107,11 @@ let mainWindow;
107107
// initialization and is ready to create browser windows.
108108
app.on('ready', function() {
109109
const protocol = electron.protocol;
110+
const birdexFolderExists = require('fs').existsSync(__dirname + '/birdex/web/');
111+
110112
protocol.registerFileProtocol('app', function(request, callback) {
111113
let url = request.url.substr(12);
112-
callback({path: require('path').normalize(__dirname + '/birdex.asar/' + url)});
114+
callback({path: require('path').normalize(__dirname + '/birdex' + (birdexFolderExists ? '' : '.asar') + '/' + url)});
113115
}, function (error) {
114116
if (error) {
115117
console.error('Failed to register protocol');
@@ -119,7 +121,7 @@ app.on('ready', function() {
119121
// bugfix for <img ng-src> requesting unsafe:app://birdex/path
120122
protocol.registerFileProtocol('unsafe', function(request, callback) {
121123
let url = request.url.substr(19);
122-
callback({path: require('path').normalize(__dirname + '/birdex.asar/' + url)});
124+
callback({path: require('path').normalize(__dirname + '/birdex' + (birdexFolderExists ? '' : '.asar') + '/' + url)});
123125
}, function (error) {
124126
if (error) {
125127
console.error('Failed to register protocol');

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.5",
2+
"version": "1.0.6",
33
"dependencies": {
44
"grunt": "^0.4.5",
55
"grunt-contrib-clean": "^0.7.0",

0 commit comments

Comments
 (0)