diff options
author | Alberto García Hierro <alberto@garciahierro.com> | 2017-09-04 18:59:13 +0300 |
---|---|---|
committer | Alberto García Hierro <alberto@garciahierro.com> | 2017-09-04 18:59:13 +0300 |
commit | c24c8750395a5d9b1a817fcdabbdef3338b45a83 (patch) | |
tree | 733f72b8632e5da4520bb3a98bed2b3792e21767 /gulpfile.js | |
parent | 4c41ccb71995deeeea590570a0b6075be9c0aa7f (diff) |
Add basic .zip file for distributing Windows app
Package as win32 in a basic .zip file as a portable app
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js index ee27bd4d..ad1e9557 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -229,6 +229,20 @@ function get_release_filename(platform, ext) { return 'INAV-Configurator_' + platform + '_' + pkg.version + '.' + ext; } +gulp.task('release-windows', function() { + var pkg = require('./package.json'); + var src = path.join(appsDir, pkg.name, 'win32'); + var output = fs.createWriteStream(path.join(appsDir, get_release_filename('win32', 'zip'))); + var archive = archiver('zip', { + zlib: { level: 9 } + }); + archive.on('warning', function(err) { throw err; }); + archive.on('error', function(err) { throw err; }); + archive.pipe(output); + archive.directory(src, 'INAV Configurator'); + return archive.finalize(); +}); + gulp.task('release-macos', function() { var pkg = require('./package.json'); var src = path.join(appsDir, pkg.name, 'osx64', pkg.name + '.app'); @@ -250,7 +264,7 @@ gulp.task('release-macos', function() { // Create distributable .zip files in ./apps gulp.task('release', function() { - // TODO: Windows, Linux + // TODO: Linux return runSequence('apps', 'release-macos'); }); |