Skip to content

Commit bedd98a

Browse files
committed
automate bundling
1 parent eb046d6 commit bedd98a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ user_data_highest_beaten_level
88
bundler/node_modules
99
docs
1010
.vscode
11+
bundler/Gravitron.app
12+
bundler/Gravitron.zip

bundler/bundle.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
rm -rf Gravitron.app
22
./macapp.sh Gravitron icon.png
3-
cp ../lib/bs/native/prod.native Gravitron.app/Contents/MacOS/Gravitron
3+
DEST=Gravitron.app/Contents/MacOS
4+
cp ../lib/bs/native/prod.native $DEST/Gravitron
5+
SDL_PATH=`otool -L $DEST/Gravitron | grep libSDL | sed -e 's/(.*//' | sed -e 's/[[:space:]]//g'`
6+
install_name_tool -change $SDL_PATH @executable_path/libSDL2-2.0.0.dylib $DEST/Gravitron
7+
cp $SDL_PATH $DEST/libSDL2-2.0.0.dylib
48
cp -r ../assets Gravitron.app/Contents/MacOS/
9+
zip -r Gravitron.zip Gravitron.app

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"clean": "bsb -clean-world",
1111
"js": "./node_modules/bs-platform/bin/bsb -backend js -make-world && webpack",
1212
"deploy": "npm run js && cp assets/* docs/assets && cd docs && surge . -d gravitron.surge.sh",
13+
"deploy-native": "npm run build:native && cd bundler && ./bundle.sh",
1314
"byte": "./node_modules/bs-platform/bin/bsb -w -make-world"
1415
},
1516
"keywords": [

0 commit comments

Comments
 (0)