mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-22 13:40:06 +00:00
Various package.json tweaks
* On `npm run dist`, build both nsis and zip * Delete unnecessary default-app folder after pack * Make sure installers are 32 bit * Amend `repository` field
This commit is contained in:
parent
78b6c86410
commit
5cbe30f39f
10
build/delete-default-app.js
Normal file
10
build/delete-default-app.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const dir = './dist/win-ia32-unpacked/resources/default_app'
|
||||||
|
|
||||||
|
exports.default = async function(context) {
|
||||||
|
fs.rmdir(dir, { recursive: true }, (err) => {
|
||||||
|
if (err) {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
24
package.json
24
package.json
@ -7,8 +7,8 @@
|
|||||||
"postinstall": "npx patch-package && npm explore electron-prebuilt -- npm run postinstall",
|
"postinstall": "npx patch-package && npm explore electron-prebuilt -- npm run postinstall",
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"build": "node build.js",
|
"build": "node build.js",
|
||||||
"pack": "electron-builder --dir",
|
"pack": "electron-builder --win --ia32 --dir",
|
||||||
"dist": "electron-builder"
|
"dist": "electron-builder --win --ia32"
|
||||||
},
|
},
|
||||||
"author": "OpenFusion Contributors",
|
"author": "OpenFusion Contributors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -17,6 +17,10 @@
|
|||||||
"patch-package": "^6.4.7",
|
"patch-package": "^6.4.7",
|
||||||
"electron-builder": "^22.10.5"
|
"electron-builder": "^22.10.5"
|
||||||
},
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/OpenFusionProject/Client.git"
|
||||||
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "xyz.openfusion.client",
|
"appId": "xyz.openfusion.client",
|
||||||
"productName": "OpenFusionClient",
|
"productName": "OpenFusionClient",
|
||||||
@ -28,11 +32,20 @@
|
|||||||
},
|
},
|
||||||
"electronVersion": "0.31.2",
|
"electronVersion": "0.31.2",
|
||||||
"win": {
|
"win": {
|
||||||
"asar": false
|
"asar": false,
|
||||||
|
"target": [
|
||||||
|
{
|
||||||
|
"target": "nsis",
|
||||||
|
"arch": "ia32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target": "zip",
|
||||||
|
"arch": "ia32"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"!patches${/*}",
|
"!patches${/*}",
|
||||||
"!default_app${/*}",
|
|
||||||
"!.npmrc"
|
"!.npmrc"
|
||||||
],
|
],
|
||||||
"extraFiles": [
|
"extraFiles": [
|
||||||
@ -40,7 +53,8 @@
|
|||||||
"from": "build/utils",
|
"from": "build/utils",
|
||||||
"to": "utils"
|
"to": "utils"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"afterPack": "./build/delete-default-app.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^0.30.0"
|
"fs-extra": "^0.30.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user