mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
Merge pull request #2778 from MartinFournier/feat/electron-build-script
Modify electron build script to allow platform selection
This commit is contained in:
commit
2c9302ee53
@ -16,6 +16,8 @@
|
|||||||
"./dist/**/*",
|
"./dist/**/*",
|
||||||
"./node_modules/**/*",
|
"./node_modules/**/*",
|
||||||
"./public/**/*",
|
"./public/**/*",
|
||||||
|
"./src/**",
|
||||||
|
"./lib/**,",
|
||||||
"*.js"
|
"*.js"
|
||||||
],
|
],
|
||||||
"directories": {
|
"directories": {
|
||||||
|
@ -119,6 +119,10 @@
|
|||||||
"watch:dev": "webpack --watch --mode development",
|
"watch:dev": "webpack --watch --mode development",
|
||||||
"electron": "sh ./package.sh",
|
"electron": "sh ./package.sh",
|
||||||
"electron:packager": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png --no-prune",
|
"electron:packager": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png --no-prune",
|
||||||
|
"electron:packager-all": "electron-packager .package bitburner --all --out .build --overwrite --icon .package/icon.png",
|
||||||
|
"electron:packager-win": "electron-packager .package bitburner --platform win32 --arch x64 --out .build --overwrite --icon .package/icon.png",
|
||||||
|
"electron:packager-mac": "electron-packager .package bitburner --platform darwin --arch x64 --out .build --overwrite --icon .package/icon.png",
|
||||||
|
"electron:packager-linux": "electron-packager .package bitburner --platform linux --arch x64 --out .build --overwrite --icon .package/icon.png",
|
||||||
"allbuild": "npm run build && npm run electron && git add --all && git commit --amend --no-edit && git push -f -u origin dev"
|
"allbuild": "npm run build && npm run electron && git add --all && git commit --amend --no-edit && git push -f -u origin dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Clear out any files remaining from old builds
|
||||||
|
rm -rf .package
|
||||||
|
|
||||||
mkdir -p .package/dist/src/ThirdParty || true
|
mkdir -p .package/dist/src/ThirdParty || true
|
||||||
mkdir -p .package/src/ThirdParty || true
|
mkdir -p .package/src/ThirdParty || true
|
||||||
mkdir -p .package/node_modules || true
|
mkdir -p .package/node_modules || true
|
||||||
@ -26,5 +29,6 @@ cd electron
|
|||||||
npm install
|
npm install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
BUILD_PLATFORM="${1:-"all"}"
|
||||||
# And finally build the app.
|
# And finally build the app.
|
||||||
npm run electron:packager
|
npm run electron:packager-$BUILD_PLATFORM
|
||||||
|
Loading…
Reference in New Issue
Block a user