diff --git a/scripts/generate-macos-app.sh b/scripts/generate-macos-app.sh new file mode 100755 index 000000000..c7fe28385 --- /dev/null +++ b/scripts/generate-macos-app.sh @@ -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 " + + + + CFBundleExecutable + dunedynasty + CFBundleIconFile + dune2_icon.icns + CFBundleIdentifier + dunedynasty.dunedynasty + NSHighResolutionCapable + + +" > $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" diff --git a/src/icon/dune2_icon.icns b/src/icon/dune2_icon.icns new file mode 100644 index 000000000..949810bee Binary files /dev/null and b/src/icon/dune2_icon.icns differ