mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2024-11-24 01:40:18 +01:00
Add build script, info plist and big sur style icon
This commit is contained in:
parent
78704ffa53
commit
386deea95e
3 changed files with 96 additions and 0 deletions
62
build.sh
Normal file
62
build.sh
Normal file
|
@ -0,0 +1,62 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
|
||||
mkdir extern
|
||||
|
||||
cd extern
|
||||
|
||||
sdl_version='2.28.1'
|
||||
sdl_filename="SDL2-$sdl_version.dmg"
|
||||
sdl_url="https://github.com/libsdl-org/SDL/releases/download/release-$sdl_version/$sdl_filename"
|
||||
|
||||
sdl_mixer_version='2.7.0'
|
||||
sdl_mixer_filename="SDL2_mixer-$sdl_mixer_version.dmg"
|
||||
sdl_mixer_url="https://www.libsdl.org/tmp/$sdl_mixer_filename"
|
||||
|
||||
mount_point="$(mktemp -d)"
|
||||
|
||||
if [ ! -f "$sdl_filename" ]; then
|
||||
curl -sSf -L -O "$sdl_url"
|
||||
fi
|
||||
|
||||
echo "2f936225c10a402cab07055e6f75de76f991945c37feb0cf6af633a96d2fb28c $sdl_filename" | shasum -a 256 -c
|
||||
hdiutil attach "$sdl_filename" -mountpoint "$mount_point" -quiet
|
||||
cp -a "$mount_point/SDL2.framework" .
|
||||
hdiutil detach "$mount_point"
|
||||
|
||||
if [ ! -f "$sdl_mixer_filename" ]; then
|
||||
curl -sSf -L -O "$sdl_mixer_url"
|
||||
fi
|
||||
|
||||
echo "f394c714c8aefdcae0ff9d6eefeb5d42f28e56ed09fcaebb796cb672ca11279d $sdl_mixer_filename" | shasum -a 256 -c
|
||||
hdiutil attach "$sdl_mixer_filename" -mountpoint "$mount_point" -quiet
|
||||
cp -a "$mount_point/SDL2_mixer.framework" .
|
||||
hdiutil detach "$mount_point"
|
||||
|
||||
cd ..
|
||||
|
||||
cmake .
|
||||
cmake --build .
|
||||
|
||||
cd packaging
|
||||
|
||||
sw_version='2.0.1'
|
||||
|
||||
mkdir -p SpaceCadetPinball.app/Contents/MacOS
|
||||
mkdir -p SpaceCadetPinball.app/Contents/Resources
|
||||
mkdir -p SpaceCadetPinball.app/Contents/Frameworks
|
||||
|
||||
cp -a Info.plist SpaceCadetPinball.app/Contents/
|
||||
cp -a SpaceCadetPinball.icns SpaceCadetPinball.app/Contents/Resources/
|
||||
cp -a ../extern/SDL2.framework SpaceCadetPinball.app/Contents/Frameworks/
|
||||
cp -a ../extern/SDL2_mixer.framework SpaceCadetPinball.app/Contents/Frameworks/
|
||||
cp -a ../bin/SpaceCadetPinball SpaceCadetPinball.app/Contents/MacOS/
|
||||
|
||||
sed -i '' "s/CHANGEME_SW_VERSION/$sw_version/" SpaceCadetPinball.app/Contents/Info.plist
|
||||
|
||||
echo -n "APPL????" > SpaceCadetPinball.app/Contents/PkgInfo
|
||||
|
||||
hdiutil create -fs HFS+ -srcfolder SpaceCadetPinball.app -volname "SpaceCadetPinball $sw_version" "SpaceCadetPinball-$sw_version-mac.dmg"
|
||||
|
||||
rm -r SpaceCadetPinball.app
|
34
packaging/Info.plist
Normal file
34
packaging/Info.plist
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>SpaceCadetPinball</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>SpaceCadetPinball.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.github.k4zmu2a.spacecadetpinball</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleName</key>
|
||||
<string>SpaceCadetPinball</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>CHANGEME_SW_VERSION</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
BIN
packaging/SpaceCadetPinball.icns
Normal file
BIN
packaging/SpaceCadetPinball.icns
Normal file
Binary file not shown.
Loading…
Reference in a new issue