mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Merge pull request #2245 from MartinFournier/doc/electron
Add documentation for electron app build
This commit is contained in:
commit
b80cc31cb0
@ -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.
|
After that you can open any browser and navigate to `localhost:8000` and play the game.
|
||||||
Saving a file will reload the game automatically.
|
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
|
When submitting a pull request with your code contributions, please abide by
|
||||||
the following rules:
|
the following rules:
|
||||||
|
@ -16,4 +16,10 @@ cp main.css .package/main.css
|
|||||||
cp dist/vendor.bundle.js .package/dist/vendor.bundle.js
|
cp dist/vendor.bundle.js .package/dist/vendor.bundle.js
|
||||||
cp main.bundle.js .package/main.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
|
npm run electron:packager
|
||||||
|
Loading…
Reference in New Issue
Block a user