forked from CyanSalt/todu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile.js
33 lines (31 loc) · 796 Bytes
/
makefile.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
const packager = require('electron-packager')
const path = require('path')
const fs = require('fs')
const options = {
dir: '.',
name: 'todu',
out: 'dist/',
overwrite: true,
icon: path.resolve(__dirname, 'src/resource/img/icon.ico'),
ignore: [
'^/(?!src|package\\.json|window\\.js)',
'^/src/(storage|component|plugin)($|/)',
'^/src/storage/.*_$',
],
win32metadata: {
FileDescription: 'TODU',
OriginalFilename: 'todu.exe',
}
}
packager(options).then(appPaths => {
appPaths.forEach(dir => {
if (dir.includes('win32')) {
const manifest = 'todu.VisualElementsManifest.xml'
fs.createReadStream(manifest)
.pipe(fs.createWriteStream(`${dir}/${manifest}`))
}
})
console.log('Build finished.')
}).catch(e => {
console.error(e)
})