-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
51 lines (45 loc) · 1.66 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
var NwBuilder = require('nw-builder');
var innoSetup = require("innosetup-compiler")
var gulp = require('gulp');
var fs = require('fs');
gulp.task('package', function () {
var nw = new NwBuilder({
//any folders or subfolders added to the muon app need to be add here aswell
files: [
"package.json",
"main.js",
"index.html",
"./views/*",
"./js/*",
"./libs/*",
"./images/*",
"./audio/*",
"./videos/*",
"./font/**/**",
"./css/*",
"./controllers/*"
], // use the glob format
platforms: ['win','osx','linux'],
version: '0.12.3',
winIco: "./images/muonIcon.ico",
macIcns: "./images/muonicon.icns"
});
//Log stuff you want
nw.on('log', console.log);
// Build returns a promise
nw.build().then(function () {
console.log('copy ffmpegsumo.so for osx') ;
fs.createReadStream('./installer/ffmpegsumo.so').pipe(fs.createWriteStream('./build/Muon/osx64/Muon.app/Contents/Frameworks/nwjs Framework.framework/Libraries/ffmpegsumo.so'));
fs.createReadStream('./installer/ffmpegsumo.so').pipe(fs.createWriteStream('./build/Muon/osx32/Muon.app/Contents/Frameworks/nwjs Framework.framework/Libraries/ffmpegsumo.so'));
console.log('packaging done, creating installer');
var inno = new innoSetup("./installer/setup.iss", {
gui: false,
verbose: true
}, function(error) {
if(error)
console.log(error)
});
}).catch(function (error) {
console.error(error);
});
});