Merge branch 'windows-installer' into dev
This commit is contained in:
commit
f98f1fbab2
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
- Added the tooltip text for the tray icon in order to show count of unread channels/mantions.
|
- Added the tooltip text for the tray icon in order to show count of unread channels/mantions.
|
||||||
|
- Added installers (experimemtal)
|
||||||
|
|
||||||
#### OS X
|
#### OS X
|
||||||
- Added colored badges to the menu icon when there are unread channels/mentions.
|
- Added colored badges to the menu icon when there are unread channels/mentions.
|
||||||
|
|
|
@ -28,7 +28,8 @@ dependencies:
|
||||||
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-linux-ia32.tar.gz -C release mattermost-desktop-linux-ia32
|
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-linux-ia32.tar.gz -C release mattermost-desktop-linux-ia32
|
||||||
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-linux-x64.tar.gz -C release mattermost-desktop-linux-x64
|
- tar zcvf $CIRCLE_ARTIFACTS/mattermost-desktop-linux-x64.tar.gz -C release mattermost-desktop-linux-x64
|
||||||
- cp release/*.deb $CIRCLE_ARTIFACTS/
|
- cp release/*.deb $CIRCLE_ARTIFACTS/
|
||||||
- cp release/windows-installer/mattermost-setup.exe $CIRCLE_ARTIFACTS/
|
- cp release/windows-installer-ia32/mattermost-setup-ia32.exe $CIRCLE_ARTIFACTS/
|
||||||
|
- cp release/windows-installer-x64/mattermost-setup-x64.exe $CIRCLE_ARTIFACTS/
|
||||||
|
|
||||||
test:
|
test:
|
||||||
post:
|
post:
|
||||||
|
|
20
gulpfile.js
20
gulpfile.js
|
@ -14,6 +14,9 @@ var electron = require('electron-connect').server.create({
|
||||||
path: './dist'
|
path: './dist'
|
||||||
});
|
});
|
||||||
var packager = require('electron-packager');
|
var packager = require('electron-packager');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const distPackageAuthor = 'Mattermost, Inc.'
|
||||||
|
|
||||||
var sources = ['**/*.js', '**/*.json', '**/*.css', '**/*.html', '!**/node_modules/**', '!dist/**', '!release/**', '!**/test_config.json'];
|
var sources = ['**/*.js', '**/*.json', '**/*.css', '**/*.html', '!**/node_modules/**', '!dist/**', '!release/**', '!**/test_config.json'];
|
||||||
|
|
||||||
|
@ -77,9 +80,15 @@ gulp.task('prettify:jsx:verify', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
gulp.task('build', ['sync-meta', 'webpack', 'copy'], function() {
|
gulp.task('build', ['sync-meta', 'webpack', 'copy'], function(cb) {
|
||||||
return gulp.src('src/package.json')
|
const appPackageJson = require('./src/package.json');
|
||||||
.pipe(gulp.dest('dist'));
|
const distPackageJson = Object.assign({}, appPackageJson, {
|
||||||
|
author: {
|
||||||
|
name: distPackageAuthor,
|
||||||
|
email: 'noreply'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
fs.writeFile('./dist/package.json', JSON.stringify(distPackageJson, null, ' '), cb);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('webpack', ['webpack:main', 'webpack:browser', 'webpack:webview']);
|
gulp.task('webpack', ['webpack:main', 'webpack:browser', 'webpack:webview']);
|
||||||
|
@ -192,8 +201,8 @@ function makePackage(platform, arch, callback) {
|
||||||
"app-version": packageJson.version,
|
"app-version": packageJson.version,
|
||||||
icon: 'resources/icon',
|
icon: 'resources/icon',
|
||||||
"version-string": {
|
"version-string": {
|
||||||
CompanyName: packageJson.author.name,
|
CompanyName: distPackageAuthor,
|
||||||
LegalCopyright: 'Copyright (c) 2015 - 2016' + packageJson.author.name,
|
LegalCopyright: `Copyright (c) 2015 - 2016 ${packageJson.author.name}`,
|
||||||
FileDescription: packageJson.description,
|
FileDescription: packageJson.description,
|
||||||
OriginalFilename: packageJson.productName + '.exe',
|
OriginalFilename: packageJson.productName + '.exe',
|
||||||
ProductVersion: packageJson.version,
|
ProductVersion: packageJson.version,
|
||||||
|
@ -239,6 +248,5 @@ gulp.task('sync-meta', function() {
|
||||||
appPackageJson.description = packageJson.description;
|
appPackageJson.description = packageJson.description;
|
||||||
appPackageJson.author = packageJson.author;
|
appPackageJson.author = packageJson.author;
|
||||||
appPackageJson.license = packageJson.license;
|
appPackageJson.license = packageJson.license;
|
||||||
var fs = require('fs');
|
|
||||||
fs.writeFileSync('./src/package.json', JSON.stringify(appPackageJson, null, ' ') + '\n');
|
fs.writeFileSync('./src/package.json', JSON.stringify(appPackageJson, null, ' ') + '\n');
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,35 +4,40 @@ const createWindowsInstaller = require('electron-winstaller').createWindowsInsta
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const rimraf = require('rimraf')
|
const rimraf = require('rimraf')
|
||||||
|
|
||||||
deleteOutputFolder()
|
const archList = ['ia32', 'x64'];
|
||||||
|
archList.forEach((arch) => {
|
||||||
|
deleteOutputFolder(arch)
|
||||||
.then(getInstallerConfig)
|
.then(getInstallerConfig)
|
||||||
.then(createWindowsInstaller)
|
.then(createWindowsInstaller)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error.message || error)
|
console.error(error.message || error)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
function getInstallerConfig() {
|
function getInstallerConfig(arch) {
|
||||||
const rootPath = path.join(__dirname, '..')
|
const rootPath = path.join(__dirname, '..')
|
||||||
const outPath = path.join(rootPath, 'release')
|
const outPath = path.join(rootPath, 'release')
|
||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
appDirectory: path.join(outPath, 'Mattermost-win32-x64'),
|
appDirectory: path.join(outPath, `Mattermost-win32-${arch}`),
|
||||||
|
authors: 'Mattermost, Inc.',
|
||||||
|
owners: 'Mattermost, Inc.',
|
||||||
iconUrl: 'https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico',
|
iconUrl: 'https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico',
|
||||||
//loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'),
|
//loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'),
|
||||||
noMsi: true,
|
noMsi: true,
|
||||||
outputDirectory: path.join(outPath, 'windows-installer'),
|
outputDirectory: path.join(outPath, `windows-installer-${arch}`),
|
||||||
setupExe: 'mattermost-setup.exe',
|
setupExe: `mattermost-setup-${arch}.exe`,
|
||||||
setupIcon: path.join(rootPath, 'resources', 'icon.ico'),
|
setupIcon: path.join(rootPath, 'resources', 'icon.ico'),
|
||||||
skipUpdateIcon: true,
|
skipUpdateIcon: true,
|
||||||
exe: 'Mattermost.exe'
|
exe: 'Mattermost.exe'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteOutputFolder() {
|
function deleteOutputFolder(arch) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
rimraf(path.join(__dirname, '..', 'out', 'windows-installer'), (error) => {
|
rimraf(path.join(__dirname, '..', 'out', `windows-installer-${arch}`), (error) => {
|
||||||
error ? reject(error) : resolve()
|
error ? reject(error) : resolve(arch)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue