-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement installers via electron-builder #138
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,18 +25,21 @@ | |
"package:osx": "gulp package:osx", | ||
"package:linux": "gulp build && build --platform linux --arch all -d deb", | ||
"package:all": "gulp package:all", | ||
"prettify": "gulp prettify" | ||
"prettify": "gulp prettify", | ||
"installer": "node ./script/installer.js" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.7.5", | ||
"babel-loader": "^6.2.4", | ||
"babel-preset-react": "^6.5.0", | ||
"chromedriver": "^2.20.0", | ||
"del": "^2.2.0", | ||
"electron-builder": "^3.11.0", | ||
"electron-builder": "3.20.0", | ||
"electron-connect": "^0.3.7", | ||
"electron-packager": "^7.0.1", | ||
"electron-prebuilt": "0.37.8", | ||
"electron-squirrel-startup": "^1.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be installed with |
||
"electron-winstaller": "^2.2.0", | ||
"esformatter": "^0.9.3", | ||
"esformatter-jsx": "^5.0.0", | ||
"gulp": "^3.9.0", | ||
|
@@ -47,6 +50,7 @@ | |
"json-loader": "^0.5.4", | ||
"mocha": "^2.3.4", | ||
"mocha-circleci-reporter": "0.0.1", | ||
"rimraf": "^2.5.2", | ||
"should": "^8.0.1", | ||
"style-loader": "^0.13.0", | ||
"through2": "^2.0.1", | ||
|
@@ -56,11 +60,13 @@ | |
"webpack-stream": "^3.1.0" | ||
}, | ||
"build": { | ||
"app-bundle-id": "com.mattermost.desktop", | ||
"app-category-type": "public.app-category.productivity", | ||
"linux": { | ||
"synopsis": "Mattermost Desktop" | ||
} | ||
}, | ||
"directories":{ | ||
"directories": { | ||
"buildResources": "resources", | ||
"app": "dist", | ||
"output": "release" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env node | ||
|
||
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller | ||
const path = require('path') | ||
const rimraf = require('rimraf') | ||
|
||
deleteOutputFolder() | ||
.then(getInstallerConfig) | ||
.then(createWindowsInstaller) | ||
.catch((error) => { | ||
console.error(error.message || error) | ||
process.exit(1) | ||
}) | ||
|
||
function getInstallerConfig() { | ||
const rootPath = path.join(__dirname, '..') | ||
const outPath = path.join(rootPath, 'release') | ||
|
||
return Promise.resolve({ | ||
appDirectory: path.join(outPath, 'Mattermost-win32-x64'), | ||
iconUrl: 'https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico', | ||
//loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice if you could get somebody to provide a now installing splash screen. See https://github.com/electron/electron-api-demos/blob/master/assets/img/loading.gif as an example |
||
noMsi: true, | ||
outputDirectory: path.join(outPath, 'windows-installer'), | ||
setupExe: 'Mattermost.exe', | ||
setupIcon: path.join(rootPath, 'resources', 'icon.ico'), | ||
skipUpdateIcon: true, | ||
exe: 'Mattermost.exe' | ||
}) | ||
} | ||
|
||
function deleteOutputFolder() { | ||
return new Promise((resolve, reject) => { | ||
rimraf(path.join(__dirname, '..', 'out', 'windows-installer'), (error) => { | ||
error ? reject(error) : resolve() | ||
}) | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed version due to electron-userland/electron-builder#402