Replace autogenerate app bundle strings with real ones and relocate the icon for Mac

This commit is contained in:
Cameron Gutman 2018-07-29 13:05:18 -07:00
parent 277594139b
commit 87db4e88a5
5 changed files with 40 additions and 10 deletions

View File

@ -5,22 +5,26 @@
<key>CFBundleExecutable</key>
<string>Moonlight</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<string>Stream games from your NVIDIA GameStream-enabled PC</string>
<key>CFBundleIconFile</key>
<string>macos</string>
<string>moonlight</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.moonlight-qt</string>
<string>com.moonlight-stream.Moonlight</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>CFBundleVersion</key>
<string>0.0.3</string>
<key>CFBundleDisplayName</key>
<string>Moonlight</string>
</dict>
</plist>

View File

@ -185,16 +185,15 @@ unix:!macx: {
INSTALLS += target desktop icons appdata
}
win32 {
RC_ICONS = moonlight.ico
}
macx {
QMAKE_INFO_PLIST = $$PWD/Info.plist
APP_QML_FILES.files = res/macos.icns
APP_QML_FILES.path = Contents/Resources
QMAKE_BUNDLE_DATA += APP_QML_FILES
APP_BUNDLE_RESOURCES.files = moonlight.icns
APP_BUNDLE_RESOURCES.path = Contents/Resources
QMAKE_BUNDLE_DATA += APP_BUNDLE_RESOURCES
}
VERSION = 0.0.3

BIN
app/moonlight.icns Normal file

Binary file not shown.

Binary file not shown.

27
scripts/svg2icns Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# https://gist.github.com/zlbruce/883605a635df8d5964bab11ed75e46ad
echo "*** SVG 2 ICNS ***"
if [ $# -ne 1 ]; then
echo "Usage: svg2icns filename.svg"
exit 100
fi
filename="$1"
name=${filename%.*}
ext=${filename##*.}
echo "processing: $name"
dest="$name".iconset
mkdir "$dest"
convert -background none -resize '!16x16' "$1" "$dest/icon_16x16.png"
convert -background none -resize '!32x32' "$1" "$dest/icon_16x16@2x.png"
cp "$dest/icon_16x16@2x.png" "$dest/icon_32x32.png"
convert -background none -resize '!64x64' "$1" "$dest/icon_32x32@2x.png"
convert -background none -resize '!128x128' "$1" "$dest/icon_128x128.png"
convert -background none -resize '!256x256' "$1" "$dest/icon_128x128@2x.png"
cp "$dest/icon_128x128@2x.png" "$dest/icon_256x256.png"
convert -background none -resize '!512x512' "$1" "$dest/icon_256x256@2x.png"
cp "$dest/icon_256x256@2x.png" "$dest/icon_512x512.png"
convert -background none -resize '!1024x1024' "$1" "$dest/icon_512x512@2x.png"
iconutil -c icns "$dest"
rm -R "$dest"