switch iOS AppIcons to an xcassets bundle

This commit is contained in:
nymea 2018-07-18 21:24:18 +02:00 committed by Michael Zanetti
parent bc88f38687
commit bcd6179e20
22 changed files with 127 additions and 28 deletions

View File

@ -8,7 +8,6 @@ top_builddir=$$shadowed($$PWD)
VERSION_INFO=$$cat(version.txt)
APP_VERSION=$$member(VERSION_INFO, 0)
APP_REVISION=$$member(VERSION_INFO, 1)
message("APP_VERSION: $${APP_VERSION} ($${APP_REVISION})")
DEFINES+=APP_VERSION=\\\"$${APP_VERSION}\\\"
android:QMAKE_POST_LINK += cp $$top_srcdir/version.txt $$top_builddir/

View File

@ -1,4 +1,5 @@
include(config.pri)
message("APP_VERSION: $${APP_VERSION} ($${APP_REVISION})")
TEMPLATE=subdirs

View File

@ -69,6 +69,7 @@ ios: {
QMAKE_BUNDLE = nymeaApp
# Configure generated xcode project to have our bundle id
xcode_product_bundle_identifier_setting.value = $${QMAKE_TARGET_BUNDLE_PREFIX}.$${QMAKE_BUNDLE}
QMAKE_ASSET_CATALOGS += ../packaging/ios/AppIcons.xcassets
plist.input = ../packaging/ios/Info.plist.in
plist.output = $$OUT_PWD/Info.plist
QMAKE_SUBSTITUTES += plist

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 588 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 880 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,116 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "AppIcon20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "AppIcon20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "AppIcon20x20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "AppIcon20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon29x29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon40x40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon76x76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "AppIcon167x167.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "AppIcon1024x1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -8,30 +8,6 @@
<string>nymea-app</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon1024x1024.png</string>
<string>AppIcon20x20.png</string>
<string>AppIcon20x20@2x.png</string>
<string>AppIcon20x20@3x.png</string>
<string>AppIcon29x29.png</string>
<string>AppIcon29x29@2x.png</string>
<string>AppIcon29x29@3x.png</string>
<string>AppIcon40x40.png</string>
<string>AppIcon40x40@2x.png</string>
<string>AppIcon40x40@3x.png</string>
<string>AppIcon60x60@2x.png</string>
<string>AppIcon60x60@3x.png</string>
<string>AppIcon76x76.png</string>
<string>AppIcon167x167.png</string>
<string>AppIcon76x76@2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>io.guh.nymeaApp</string>
<key>CFBundleName</key>
@ -43,7 +19,7 @@
<key>CFBundleSignature</key>
<string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>

View File

@ -7,9 +7,9 @@ function exportImage() {
if [ ${scaleFactor} -ne 1 ]; then
finalSize=$((size * scaleFactor))
echo final size is ${finalSize}
inkscape AppIcon.svg -e AppIcon${size}x${size}@${scaleFactor}x.png -C -w $finalSize -h $finalSize
inkscape AppIcon.svg -e AppIcons.xcassets/AppIcon.appiconset/AppIcon${size}x${size}@${scaleFactor}x.png -C -w $finalSize -h $finalSize
else
inkscape AppIcon.svg -e AppIcon${size}x${size}.png -C -w ${size} -h ${size}
inkscape AppIcon.svg -e AppIcons.xcassets/AppIcon.appiconset/AppIcon${size}x${size}.png -C -w ${size} -h ${size}
fi
}