From 64c6f3a37bbeaaf41c6c590b2c7cf01eb56f277e Mon Sep 17 00:00:00 2001
From: Vincent Bénony
Date: Wed, 2 Dec 2015 17:10:37 +0100
Subject: IOS: Fixes the Info.plist file generation
---
dists/iphone/Info.plist | 2 ++
dists/iphone/Info.plist.in | 2 ++
ports.mk | 89 +++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 89 insertions(+), 4 deletions(-)
diff --git a/dists/iphone/Info.plist b/dists/iphone/Info.plist
index a4118e9b7d..3735919321 100644
--- a/dists/iphone/Info.plist
+++ b/dists/iphone/Info.plist
@@ -10,6 +10,8 @@
CFBundleIcons~ipad
+ UILaunchImages
+
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
diff --git a/dists/iphone/Info.plist.in b/dists/iphone/Info.plist.in
index a645bb689f..c179ffed8f 100644
--- a/dists/iphone/Info.plist.in
+++ b/dists/iphone/Info.plist.in
@@ -10,6 +10,8 @@
CFBundleIcons~ipad
+ UILaunchImages
+
CFBundleIdentifier
$(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
diff --git a/ports.mk b/ports.mk
index 0ffc4bf548..143674b8f9 100644
--- a/ports.mk
+++ b/ports.mk
@@ -78,7 +78,74 @@ endif
iphonebundle: iphone
mkdir -p $(bundle_name)
- cp $(srcdir)/dists/iphone/Info.plist $(bundle_name)/
+ awk 'BEGIN {s=0}\
+ /CFBundleIcons<\/key>/ {\
+ print $$0;\
+ print "\t";\
+ print "\t\tCFBundlePrimaryIcon";\
+ print "\t\t";\
+ print "\t\t\tCFBundleIconFiles";\
+ print "\t\t\t";\
+ print "\t\t\t\tAppIcon29x29";\
+ print "\t\t\t\tAppIcon40x40";\
+ print "\t\t\t\tAppIcon60x60";\
+ print "\t\t\t";\
+ print "\t\t";\
+ print "\t";\
+ s=2}\
+ /CFBundleIcons~ipad<\/key>/ {\
+ print $$0;\
+ print "\t";\
+ print "\t\tCFBundlePrimaryIcon";\
+ print "\t\t";\
+ print "\t\t\tCFBundleIconFiles";\
+ print "\t\t\t";\
+ print "\t\t\t\tAppIcon29x29";\
+ print "\t\t\t\tAppIcon40x40";\
+ print "\t\t\t\tAppIcon60x60";\
+ print "\t\t\t\tAppIcon76x76";\
+ print "\t\t\t";\
+ print "\t\t";\
+ print "\t";\
+ s=2}\
+ /UILaunchImages<\/key>/ {\
+ print $$0;\
+ print "\t";\
+ print "\t\t";\
+ print "\t\t\tUILaunchImageMinimumOSVersion";\
+ print "\t\t\t7.0";\
+ print "\t\t\tUILaunchImageName";\
+ print "\t\t\tLaunchImage-700-568h";\
+ print "\t\t\tUILaunchImageOrientation";\
+ print "\t\t\tPortrait";\
+ print "\t\t\tUILaunchImageSize";\
+ print "\t\t\t{320, 568}";\
+ print "\t\t";\
+ print "\t\t";\
+ print "\t\t\tUILaunchImageMinimumOSVersion";\
+ print "\t\t\t7.0";\
+ print "\t\t\tUILaunchImageName";\
+ print "\t\t\tLaunchImage-700-Portrait";\
+ print "\t\t\tUILaunchImageOrientation";\
+ print "\t\t\tPortrait";\
+ print "\t\t\tUILaunchImageSize";\
+ print "\t\t\t{768, 1024}";\
+ print "\t\t";\
+ print "\t\t";\
+ print "\t\t\tUILaunchImageMinimumOSVersion";\
+ print "\t\t\t7.0";\
+ print "\t\t\tUILaunchImageName";\
+ print "\t\t\tLaunchImage-700-Landscape";\
+ print "\t\t\tUILaunchImageOrientation";\
+ print "\t\t\tLandscape";\
+ print "\t\t\tUILaunchImageSize";\
+ print "\t\t\t{768, 1024}";\
+ print "\t\t";\
+ print "\t";\
+ s=2}\
+ s==0 {print $$0}\
+ s > 0 { s-- }' $(srcdir)/dists/iphone/Info.plist >$(bundle_name)/Info.plist
+ sed -i '' -e 's/$$(PRODUCT_BUNDLE_IDENTIFIER)/org.scummvm.scummvm/' $(bundle_name)/Info.plist
cp $(DIST_FILES_DOCS) $(bundle_name)/
cp $(DIST_FILES_THEMES) $(bundle_name)/
ifdef DIST_FILES_ENGINEDATA
@@ -88,9 +155,23 @@ endif
ldid -S scummvm
chmod 755 scummvm
cp scummvm $(bundle_name)/ScummVM
- cp $(srcdir)/dists/iphone/icon.png $(bundle_name)/
- cp $(srcdir)/dists/iphone/icon-72.png $(bundle_name)/
- cp $(srcdir)/dists/iphone/Default.png $(bundle_name)/
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-29@2x.png $(bundle_name)/AppIcon29x29@2x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-29@2x.png $(bundle_name)/AppIcon29x29@2x~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-29@3x.png $(bundle_name)/AppIcon29x29@3x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-29.png $(bundle_name)/AppIcon29x29~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-40@2x.png $(bundle_name)/AppIcon40x40@2x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-40@2x.png $(bundle_name)/AppIcon40x40@2x~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-40@3x.png $(bundle_name)/AppIcon40x40@3x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-40.png $(bundle_name)/AppIcon40x40~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-60@2x.png $(bundle_name)/AppIcon60x60@2x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-60@3x.png $(bundle_name)/AppIcon60x60@3x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-76@2x.png $(bundle_name)/AppIcon76x76@2x~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/AppIcon.appiconset/icon4-76.png $(bundle_name)/AppIcon76x76~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-640x1136-1.png $(bundle_name)/LaunchImage-700-568h@2x.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2048x1536.png $(bundle_name)/LaunchImage-700-Landscape@2x~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1024x768.png $(bundle_name)/LaunchImage-700-Landscape~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png $(bundle_name)/LaunchImage-700-Portrait@2x~ipad.png
+ cp $(srcdir)/dists/iphone/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-768x1024.png $(bundle_name)/LaunchImage-700-Portrait~ipad.png
# Binary patch workaround for Iphone 5/IPad 4 "Illegal instruction: 4" toolchain issue (http://code.google.com/p/iphone-gcc-full/issues/detail?id=6)
cp scummvm scummvm-iph5
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' scummvm-iph5
--
cgit v1.2.3