Add macOS Application Icon

This commit is contained in:
ltsAdair
2018-04-08 12:27:34 -04:00
parent 84a98c69fc
commit d8accbd5bc
4 changed files with 38 additions and 6 deletions
+6 -2
View File
@@ -13,8 +13,6 @@ Release/
.deps
.libs
# except icons files
!resources/images/*
# Big files
.*.swp
@@ -90,3 +88,9 @@ trash
# Windows
*.Debug
*.Release
# except icons files
!resources/images/*
!resources/macOS/Info.plist
!resources/macOS/MapMap.icns
+24
View File
@@ -0,0 +1,24 @@
<?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>CFBundleExecutable</key>
<string>MapMap</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIconFile</key>
<string>MapMap.icns</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.MapMap</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
Binary file not shown.
+8 -4
View File
@@ -72,17 +72,22 @@ if [[ $unamestr == "Darwin" ]]; then
echo "Building program ..."
qmake -config release
make -j4
# Bundle Qt frameworks in app using macdeployqt
echo "Bundling Qt ..."
macdeployqt $app
# Set application icon macOS
echo "Applying Application Icon, restarting Finder ..."
cp -f resources/macOS/info.plist ${app}/Contents/Resources
cp -f resources/macOS/mapmap.icns ${app}/Contents/Resources
# Bundle GStreamer framework in app
#echo "Bundling GStreamer ..."
#cp -R /Library/Frameworks/GStreamer.framework ${app}/Contents/Frameworks/
#install_name_tool -id @executable_path/../Frameworks/${gstreamer} ${app}/Contents/Frameworks/${gstreamer}
#install_name_tool -change /Library/Frameworks/${gstreamer} @executable_path/../Frameworks/${gstreamer} ${app}/Contents/MacOs/MapMap
# do_fix_qt_plugins_in_app
echo "Creating DMG ..."
do_create_dmg
@@ -90,4 +95,3 @@ elif [[ $unamestr == "Linux" ]]; then
qmake
make -j4
fi