Add: create bundles via CPack

CPack works closely together with CMake to do the right thing in
terms of bundling (called 'package'). This generates all the
packaging we need, and some more.
This commit is contained in:
Patric Stout
2019-04-07 12:00:36 +02:00
committed by glx22
parent 56d54cf60e
commit b7643b1d36
39 changed files with 231 additions and 2629 deletions

33
os/macosx/Info.plist.in Normal file
View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>CFBundleDisplayName</key>
<string>${CPACK_BUNDLE_NAME}</string>
<key>CFBundleExecutable</key>
<string>${CPACK_BUNDLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>#CPACK_PACKAGE_VERSION#, Copyright 2004-${CURRENT_YEAR} The OpenTTD team</string>
<key>CFBundleIconFile</key>
<string>${CPACK_BUNDLE_NAME}.icns</string>
<key>CFBundleIdentifier</key>
<string>org.openttd.openttd</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${CPACK_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>#CPACK_PACKAGE_VERSION#</string>
<key>CFBundleVersion</key>
<string>#CPACK_PACKAGE_VERSION#</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2004-${CURRENT_YEAR} The OpenTTD team</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

8
os/macosx/launch.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
ROOT_DIR=$(dirname "$0")/..
export DYLD_LIBRARY_PATH=${ROOT_DIR}/Frameworks
cd ${ROOT_DIR}/Resources
exec ./openttd "$@"

View File

@@ -1,46 +0,0 @@
#!/bin/sh
# sets VERSION to the value if RELEASE if there are any,
# otherwise it sets VERSION to revision number
if [ "$3" ]; then
VERSION="$3"
else
VERSION="$2"
fi
date=`date +%Y`
# Generates Info.plist while applying $VERSION
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"
\"http://www.apple.com/DTDs/Prop$
<plist version=\"1.0\">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>OpenTTD</string>
<key>CFBundleExecutable</key>
<string>openttd</string>
<key>CFBundleGetInfoString</key>
<string>$VERSION, Copyright 2004-$date The OpenTTD team</string>
<key>CFBundleIconFile</key>
<string>openttd.icns</string>
<key>CFBundleIdentifier</key>
<string>org.openttd.openttd</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>OpenTTD</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$VERSION</string>
<key>CFBundleVersion</key>
<string>$VERSION</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2004-$date The OpenTTD team</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>" > "$1"/Contents/Info.plist