OS X用パッケージにアイコンを設定する

This commit is contained in:
Yuya Ochiai 2015-11-02 01:02:56 +09:00
parent 1ae8067f82
commit 4f715522e8
4 changed files with 22 additions and 9 deletions

View file

@ -2,12 +2,8 @@ dependencies:
cache_directories:
- ~/.electron
post:
- gulp package
- mv release/electron-mattermost-win32-ia32 release/electron-mattermost-win32
- mv release/electron-mattermost-win32-x64 release/electron-mattermost-win64
- gulp package:osx
- mv release/electron-mattermost-darwin-x64 release/electron-mattermost-osx
- cd release && zip -r /$CIRCLE_ARTIFACTS/electron-mattermost-win32.zip electron-mattermost-win32
- cd release && zip -r /$CIRCLE_ARTIFACTS/electron-mattermost-win64.zip electron-mattermost-win64
- tar zcvf /$CIRCLE_ARTIFACTS/electron-mattermost-osx.tar.gz -C release electron-mattermost-osx
test:

BIN
electron-mattermost.icns Normal file

Binary file not shown.

BIN
electron-mattermost.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -35,18 +35,19 @@ gulp.task('serve', function() {
});
});
gulp.task('package', ['sync-meta'], function() {
function makePackage(platform, arch) {
var packageJson = require('./src/package.json');
packager({
dir: './src',
name: packageJson.name,
platform: ['win32', 'darwin'],
arch: 'all',
platform: platform,
arch: arch,
version: '0.33.6',
out: './release',
prune: true,
overwrite: true,
"app-version": packageJson.version
"app-version": packageJson.version,
icon: 'electron-mattermost'
}, function(err, appPath) {
if (err) {
console.log(err);
@ -55,6 +56,22 @@ gulp.task('package', ['sync-meta'], function() {
console.log('done');
}
});
};
gulp.task('package', ['sync-meta'], function() {
makePackage('all', 'all');
});
gulp.task('package:windows', ['sync-meta'], function() {
makePackage('win32', 'all');
});
gulp.task('package:osx', ['sync-meta'], function() {
makePackage('darwin', 'all');
});
gulp.task('package:linux', ['sync-meta'], function() {
makePackage('linux', 'all');
});
gulp.task('sync-meta', function() {