2023-01-06 02:29:02 +01:00
|
|
|
#!/bin/bash
|
2021-09-15 18:22:36 +02:00
|
|
|
|
2023-01-11 02:51:14 +01:00
|
|
|
# Clear out any files remaining from old builds and recreate folder
|
2022-01-23 19:24:14 +01:00
|
|
|
rm -rf .package
|
2023-01-11 02:51:14 +01:00
|
|
|
mkdir .package
|
2023-03-01 06:50:53 +01:00
|
|
|
rm -rf .build
|
|
|
|
mkdir .build
|
2022-01-23 19:24:14 +01:00
|
|
|
|
2023-05-24 18:10:29 +02:00
|
|
|
# Install electron sub-dependencies
|
|
|
|
cd electron
|
|
|
|
npm install
|
|
|
|
cd ..
|
|
|
|
|
2023-01-11 02:51:14 +01:00
|
|
|
# .app should have the fully built game already after npm run build
|
|
|
|
cp -r .app/* .package
|
2021-12-20 12:33:46 +01:00
|
|
|
cp -r electron/* .package
|
2023-01-11 02:51:14 +01:00
|
|
|
|
2023-01-08 08:36:55 +01:00
|
|
|
# steam_appid.txt would end up in the resource dir
|
|
|
|
rm .package/steam_appid.txt
|
2022-01-04 14:26:10 +01:00
|
|
|
|
2022-01-23 18:56:32 +01:00
|
|
|
BUILD_PLATFORM="${1:-"all"}"
|
2021-12-31 03:45:57 +01:00
|
|
|
# And finally build the app.
|
2022-03-21 13:04:59 +01:00
|
|
|
npm run electron:packager-$BUILD_PLATFORM
|
2023-01-08 08:36:55 +01:00
|
|
|
|
|
|
|
echo .build/* | xargs -n 1 cp electron/steam_appid.txt
|