bitburner-src/package.sh

35 lines
835 B
Bash
Raw Normal View History

#!/bin/sh
2021-09-15 18:22:36 +02:00
# Clear out any files remaining from old builds
rm -rf .package
2022-01-28 02:44:50 +01:00
mkdir -p .package/dist/src/ThirdParty || true
mkdir -p .package/src/ThirdParty || true
mkdir -p .package/node_modules || true
cp index.html .package
cp -r electron/* .package
2022-01-28 02:44:50 +01:00
cp -r dist/ext .package/dist
cp -r dist/icons .package/dist
cp -r dist/images .package/dist
# The css files
cp dist/vendor.css .package/dist
cp main.css .package/main.css
# The js files.
cp dist/vendor.bundle.js .package/dist/vendor.bundle.js
cp main.bundle.js .package/main.bundle.js
# Source maps
cp dist/vendor.bundle.js.map .package/dist/vendor.bundle.js.map
cp main.bundle.js.map .package/main.bundle.js.map
# Install electron sub-dependencies
cd electron
npm install
cd ..
BUILD_PLATFORM="${1:-"all"}"
# And finally build the app.
2022-01-28 02:44:50 +01:00
npm run electron:packager-$BUILD_PLATFORM