added support for customizing Mac icons

This commit is contained in:
Paul Liverman 2015-02-09 11:17:25 -08:00
parent 2370c406eb
commit a54dd3fc58
3 changed files with 21 additions and 15 deletions

3
build
View File

@ -136,6 +136,9 @@ cd "$osx10Dir"
cp -r ./love.app "./$packageName.app"
# Copy in our .love file
cp "$outputDir/$packageName-$version.love" "$osx10Dir/$packageName.app/Contents/Resources/$packageName.love"
# Copy in our icons
cp "$osxIconsDirectory/$osxFileIcon" "$osx10Dir/$packageName.app/Contents/Resources/$osxFileIcon"
cp "$osxIconsDirectory/$osxBundleIcon" "$osx10Dir/$packageName.app/Contents/Resources/$osxBundleIcon"
# Create an Info.plist and copy it in
cd "$originalDir"
source "$originalDir/scripts/Info.plist-maker.sh"

View File

@ -31,6 +31,13 @@ osx10Dir="$outputDir/osx10src"
win32exe="$win32Dir/love-0.9.1-win32/love.exe"
win64exe="$win64Dir/love-0.9.1-win64/love.exe"
# Mac icns files for package icon
# (It's best to just specify the same file for both.
# I don't think both are needed, but I am not very familiar with the Mac system.)
osxIconsDirectory="$osx10Dir/love.app/Contents/Resources"
osxFileIcon="LoveDocument.icns"
osxBundleIcon="Love.icns"
# Remove old packages?
removeOld=false

View File

@ -14,7 +14,7 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>LoveDocument.icns</string>
<string>$osxFileIcon</string>
<key>CFBundleTypeName</key>
<string>LÖVE Project</string>
<key>CFBundleTypeRole</key>
@ -42,20 +42,17 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<key>CFBundleExecutable</key>
<string>love</string>
<key>CFBundleIconFile</key>
<string>Love.icns</string>
<key>CFBundleIdentifier</key>" > ./tmp/Info.plist
echo " <string>$identifier</string>
<string>$osxBundleIcon</string>
<key>CFBundleIdentifier</key>
<string>$identifier</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>" >> ./tmp/Info.plist
echo " <string>$friendlyPackageName</string>
<key>CFBundleName</key>
<string>$friendlyPackageName</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>" >> ./tmp/Info.plist
echo " <string>$version</string>
<key>CFBundleShortVersionString</key>
<string>$version</string>
<key>CFBundleSignature</key>
<string>LoVe</string>
<key>DTCompiler</key>
@ -74,12 +71,11 @@ echo " <string>$version</string>
<string>5B1008</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>NSHumanReadableCopyright</key>" >> ./tmp/Info.plist
echo " <string>© $copyrightYear $author</string>
<key>NSHumanReadableCopyright</key>
<string>© $copyrightYear $author</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>" >> ./tmp/Info.plist
</plist>" > ./tmp/Info.plist
echo " Info.plist generated."