-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from bni/master
Script to generate macOS app bundle
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash -e | ||
CONTENTS=../dist/DuneDynasty.app/Contents | ||
|
||
# Clean | ||
rm -rf ../dist/Dune*.app | ||
|
||
# Build file structure | ||
mkdir -p $CONTENTS/MacOS $CONTENTS/Resources $CONTENTS/libs | ||
|
||
# Executable | ||
cp ../dist/dunedynasty $CONTENTS/MacOS/ | ||
|
||
# Resources | ||
cp -r ../dist/campaign ../dist/data ../dist/music $CONTENTS/Resources/ | ||
|
||
# Icon | ||
cp ../src/icon/dune2_icon.icns $CONTENTS/Resources/ | ||
|
||
# Info.plist | ||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | ||
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> | ||
<plist version=\"1.0\"> | ||
<dict> | ||
<key>CFBundleExecutable</key> | ||
<string>dunedynasty</string> | ||
<key>CFBundleIconFile</key> | ||
<string>dune2_icon.icns</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>dunedynasty.dunedynasty</string> | ||
<key>NSHighResolutionCapable</key> | ||
<false/> | ||
</dict> | ||
</plist>" > $CONTENTS/Info.plist | ||
|
||
# Bundle dylibs | ||
dylibbundler -of -b -x $CONTENTS/MacOS/dunedynasty -d $CONTENTS/libs/ | ||
otool -L $CONTENTS/MacOS/dunedynasty | ||
|
||
# Rename bundle with space in the name, as a final step. | ||
# dylibbundler has problems with paths containing spaces | ||
mv ../dist/DuneDynasty.app "../dist/Dune Dynasty.app" |
Binary file not shown.