Skip to content

Commit 9cf8dad

Browse files
committed
Merge pull request electron#215 from electron/windows-store
Add Windows Store build script
2 parents cb45dd9 + deb30ee commit 9cf8dad

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"pack-linux": "electron-packager . --asar --overwrite --platform=linux --arch=x64 --icon=assets/app-icon/png/64.png --prune=true --out=out",
1818
"package": "npm run pack-mac && npm run pack-win && npm run pack-linux",
1919
"installer": "node ./script/installer.js",
20+
"windows-store": "node ./script/windows-store.js",
2021
"prepare-release": "npm run package && npm run sign-exe && npm run installer && npm run sign-installer",
2122
"release": "node ./script/release.js"
2223
},
@@ -41,6 +42,7 @@
4142
"devtron": "^1.0.0",
4243
"electron-packager": "^7.0.1",
4344
"electron-prebuilt": "~1.0.2",
45+
"electron-windows-store": "^0.3.0",
4446
"electron-winstaller": "^2.2.0",
4547
"mocha": "^2.3.4",
4648
"request": "^2.70.0",

script/windows-store.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const ChildProcess = require('child_process')
2+
const path = require('path')
3+
4+
const metadata = require('../package')
5+
6+
const command = path.join(__dirname, '..', 'node_modules', '.bin', 'electron-windows-store.cmd')
7+
const args = [
8+
'--input-directory',
9+
path.join(__dirname, '..', 'out', 'ElectronAPIDemos-win32-ia32'),
10+
'--output-directory',
11+
path.join(__dirname, '..', 'out', 'windows-store'),
12+
'--flatten',
13+
true,
14+
'--package-version',
15+
metadata.version + '.0',
16+
'--package-name',
17+
metadata.name
18+
]
19+
20+
const windowsStore = ChildProcess.spawn(command, args, {stdio: 'inherit'})
21+
windowsStore.on('close', (code) => {
22+
process.exit(code)
23+
})

0 commit comments

Comments
 (0)