diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecf90a90c..f0b2e0f8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,7 +121,29 @@ Inside the root of the repo run After that you can open any browser and navigate to `localhost:8000` and play the game. Saving a file will reload the game automatically. -#### Submitting a Pull Request + +### How to build the electron app + +Tested on Node v16.13.1 (LTS) on Windows +These steps only work in a bash-like environment, like MinGW for Windows. + +```sh +# Install the main game dependencies & build the app in debug mode +npm install +npm run build:dev + +# Use electron-packager to build the app to the .build/ folder +npm run electron + +# When launching the .exe directly, you'll need the steam_appid.txt file in the root +# If not using windows, change this line accordingly +cp .build/bitburner-win32-x64/resources/app/steam_appid.txt .build/bitburner-win32-x64/steam_appid.txt + +# And run the game... +.build/bitburner-win32-x64/bitburner.exe +``` + +### Submitting a Pull Request When submitting a pull request with your code contributions, please abide by the following rules: diff --git a/package.sh b/package.sh index 1783f3475..cf8b13847 100755 --- a/package.sh +++ b/package.sh @@ -16,4 +16,10 @@ cp main.css .package/main.css cp dist/vendor.bundle.js .package/dist/vendor.bundle.js cp main.bundle.js .package/main.bundle.js +# Install electron sub-dependencies +cd electron +npm install +cd .. + +# And finally build the app. npm run electron:packager