Skip to content

Commit

Permalink
Prevent zipping the app data on windows. (fixes #578, #596, #598, #605)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaygraveyard committed May 1, 2017
1 parent c9d8d45 commit 525038a
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,49 @@ var runSequence = require('run-sequence');
var manifest = require('./src/package.json');
var NwBuilder = require('nw-builder');

// Build for each platform; on OSX/Linux, you need Wine installed to build win32 (or remove winIco below)
['win32', 'osx64', 'linux32', 'linux64'].forEach(function(platform) {
var srcDir = path.resolve('./src');
var nwOptions = {
version: 'latest',
flavor: 'normal',
appName: 'Koala',
appVersion: manifest.version,
};

// Build for osx and linux platforms
['osx64', 'linux32', 'linux64'].forEach(function(platform) {
gulp.task(`build:${platform}`, function(callback) {
var nw = new NwBuilder({
files: path.resolve('./src/**'),
var nw = new NwBuilder(Object.assign(nwOptions, {
files: [`${srcDir}/**`, `!${srcDir}/ruby/**`],
platforms: [platform],
version: '0.21.6',
flavor: 'normal',
appName: 'Koala',
appVersion: manifest.version,
winIco: process.argv.indexOf('--noicon') > 0 ? null : path.resolve('./assets-windows/icon.ico'),
macIcns: path.resolve('./assets-osx/icon.icns'),
macPlist: {
NSHumanReadableCopyright: 'koala-app.com',
CFBundleIdentifier: 'com.koala-app.koala',
},
zip: true,
});
}));

nw.on('log', console.log.bind(console));
nw.build(callback);
});
});

// Build for win32 platform; on OSX/Linux, you need Wine installed to build win32 (or remove winIco below)
gulp.task(`build:win32`, function(callback) {
var nw = new NwBuilder(Object.assign(nwOptions, {
files: [
`${srcDir}/**`,
`!${srcDir}/ruby/{include,share}/**`,
`!${srcDir}/ruby/lib/{pkgconfig,tcltk}/**`,
],
platforms: ['win32'],
winIco: process.argv.indexOf('--noicon') > 0 ? null : path.resolve('./assets-windows/icon.ico'),
zip: false,
}));

nw.on('log', console.log.bind(console));
nw.build(callback);
});

// Only runs on OSX (requires XCode properly configured)
gulp.task('sign:osx64', ['build:osx64'], function() {
// shelljs.exec('codesign -v -f -s "Alexandru Rosianu Apps" ./build/Koala/osx64/Koala.app/Contents/Frameworks/*');
Expand Down

0 comments on commit 525038a

Please sign in to comment.