Mhurd has submitted this change and it was merged.

Change subject: Fixing icons… again
......................................................................


Fixing icons… again

A few problems to overcome this time:
Archives use symlinks for the app bundle, which can throw monkey wrenches in 
the process.
Looks like permissions have changed on build folders - can't reliably save to 
the app bundle during the process. So sidestepping.

New solution:
No longer manipulating the build folder, doing everything in the source 
directory.
Created a new icon set - source - which will always contain the unmolested 
icons.
The other icon set will be overwritten at build time with the overlaid icons.
If release build or if imagemagick is not installed, then the icons are just 
copied
Also removed generated icons from source control

Note: only one icons is copied to the app, the other is in the project only.

Change-Id: I39285429803b72d5caeda738fb82bc3d23406317
---
M .gitignore
M Wikipedia.xcodeproj/project.pbxproj
M Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json
A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Contents.json
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@3x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-72.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-76.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small-50.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-small...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-sm...@3x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Spotlight-40.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x-1.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@3x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/i...@2x.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_app_icon_iphone.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_icon.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_i...@2x.png
M scripts/process-icons.sh
24 files changed, 263 insertions(+), 70 deletions(-)

Approvals:
  Mhurd: Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index 2d2952e..6dbb5fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,9 @@
 *.ipa
 *.xcuserstate
 
+# Icons
+Wikipedia/Images.xcassets/AppIcon.appiconset/*.png
+
 # Fastlane
 fastlane/report.xml
 fastlane/Error*.png
diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index feb2cbd..f302ee2 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -187,6 +187,7 @@
                04F27B7818FE0F2E00EDD838 /* PageHistoryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04F27B7418FE0F2E00EDD838 /* 
PageHistoryViewController.m */; };
                04F39590186CF80100B0D6FC /* TOCViewController.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04F3958F186CF80100B0D6FC /* TOCViewController.m 
*/; };
                08D631F71A69B1AB00D87AD0 /* WMFImageGalleryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 08D631F61A69B1AB00D87AD0 /* 
WMFImageGalleryViewController.m */; };
+               0E36C2271AE0B59D00C58CFF /* Images.xcassets in Resources */ = 
{isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; 
};
                0EA4402E1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0EA4402D1AA6281200B09DBA /* 
NSDateFormatter+WMFExtensions.m */; };
                0EBC56681AD3656900E82CDD /* WMFAsyncTestCase.m in Sources */ = 
{isa = PBXBuildFile; fileRef = BC7ACB631AB34C9C00791497 /* WMFAsyncTestCase.m 
*/; };
                0EBC567F1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0EBC567E1AD442CC00E82CDD /* 
BITHockeyManager+WMFExtensions.m */; };
@@ -325,7 +326,6 @@
                D4991445181D51DE00E6073C /* main.m in Sources */ = {isa = 
PBXBuildFile; fileRef = D4991444181D51DE00E6073C /* main.m */; };
                D4991449181D51DE00E6073C /* AppDelegate.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4991448181D51DE00E6073C /* AppDelegate.m */; };
                D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources 
*/ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* 
Main_iPhone.storyboard */; };
-               D4991454181D51DE00E6073C /* Images.xcassets in Resources */ = 
{isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; 
};
                D49B2ED2196C687C002F035D /* PullToRefreshViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = D49B2ED1196C687C002F035D /* 
PullToRefreshViewController.m */; };
                D4B0AE0219365F7C00F0AC90 /* EventLoggingFunnel.m in Sources */ 
= {isa = PBXBuildFile; fileRef = D4B0AE0119365F7C00F0AC90 /* 
EventLoggingFunnel.m */; };
                D4B0AE051936604700F0AC90 /* EditFunnel.m in Sources */ = {isa = 
PBXBuildFile; fileRef = D4B0AE041936604700F0AC90 /* EditFunnel.m */; };
@@ -720,6 +720,7 @@
                08D631F81A69B8CD00D87AD0 /* WMFImageGalleryCollectionViewCell.h 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; name = WMFImageGalleryCollectionViewCell.h; path = "Image 
Gallery/WMFImageGalleryCollectionViewCell.h"; sourceTree = "<group>"; };
                08D631F91A69B8CD00D87AD0 /* WMFImageGalleryCollectionViewCell.m 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; name = WMFImageGalleryCollectionViewCell.m; path = "Image 
Gallery/WMFImageGalleryCollectionViewCell.m"; sourceTree = "<group>"; };
                08F646F7D0488CE3C6D6A763 /* Pods.beta.xcconfig */ = {isa = 
PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = 
Pods.beta.xcconfig; path = "Pods/Target Support Files/Pods/Pods.beta.xcconfig"; 
sourceTree = "<group>"; };
+               0E36C2281AE0B5BD00C58CFF /* SourceIcons.xcassets */ = {isa = 
PBXFileReference; lastKnownFileType = folder.assetcatalog; name = 
SourceIcons.xcassets; path = Wikipedia/SourceIcons.xcassets; sourceTree = 
"<group>"; };
                0EA4402C1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; name = "NSDateFormatter+WMFExtensions.h"; path = 
"Wikipedia/Categories/NSDateFormatter+WMFExtensions.h"; sourceTree = 
SOURCE_ROOT; };
                0EA4402D1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; name = "NSDateFormatter+WMFExtensions.m"; path = 
"Wikipedia/Categories/NSDateFormatter+WMFExtensions.m"; sourceTree = 
SOURCE_ROOT; };
                0EBC567D1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; name = "BITHockeyManager+WMFExtensions.h"; path = 
"Wikipedia/Categories/BITHockeyManager+WMFExtensions.h"; sourceTree = 
SOURCE_ROOT; };
@@ -2346,6 +2347,7 @@
                                BCB669A31A83F6C300C7B1FE /* MediaWikiKit */,
                                04E9A78218F73C7200F7ECF7 /* www */,
                                D4991453181D51DE00E6073C /* Images.xcassets */,
+                               0E36C2281AE0B5BD00C58CFF /* 
SourceIcons.xcassets */,
                                BC8309941A7BF935003FC5C7 /* WikipediaUnitTests 
*/,
                                D4991437181D51DE00E6073C /* Frameworks */,
                                D4991436181D51DE00E6073C /* Products */,
@@ -2530,8 +2532,8 @@
                                D4991432181D51DE00E6073C /* Frameworks */,
                                D4C16A621970946900CD91AD /* 
update-storyboard-strings */,
                                D4C16A631970949A00CD91AD /* update-qqq */,
-                               D4991433181D51DE00E6073C /* Resources */,
                                0EB312441ACB96C300C7F7A6 /* Process Icons */,
+                               D4991433181D51DE00E6073C /* Resources */,
                                04E0C2771A7750AB00FE22DA /* 
copy-wmflogo-to-assets */,
                                45FA417DEEAE18B42A662320 /* Copy Pods Resources 
*/,
                        );
@@ -2706,7 +2708,6 @@
                        files = (
                                BCE912D31ACCAF6900B74B42 /* 
OldDataSchemaBundle.bundle in Resources */,
                                D46CD8C418A1AC4F0042959E /* InfoPlist.strings 
in Resources */,
-                               D4991454181D51DE00E6073C /* Images.xcassets in 
Resources */,
                                D499144C181D51DE00E6073C /* 
Main_iPhone.storyboard in Resources */,
                                D46CD8C518A1AC4F0042959E /* Localizable.strings 
in Resources */,
                                0480AE981AA4E65D00A9950C /* 
WMFWebViewFooterViewController.xib in Resources */,
@@ -2731,6 +2732,7 @@
                                BCB58F591A89747400465627 /* 
WMFImageGalleryDetailOverlayView.xib in Resources */,
                                0480AE891AA4E61000A9950C /* 
WMFLegalFooterViewController.xib in Resources */,
                                0484411E19FF15AF00FD26C5 /* 
AboutViewController.plist in Resources */,
+                               0E36C2271AE0B59D00C58CFF /* Images.xcassets in 
Resources */,
                                0480AE8D1AA4E61000A9950C /* 
WMFOptionsFooterViewController.xib in Resources */,
                                04224502197F5E09005DD0BF /* BulletedLabel.xib 
in Resources */,
                        );
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json 
b/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json
index ab3b114..bdf34f6 100644
--- a/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json
+++ b/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -172,8 +172,5 @@
   "info" : {
     "version" : 1,
     "author" : "xcode"
-  },
-  "properties" : {
-    "pre-rendered" : true
   }
 }
\ No newline at end of file
diff --git 
a/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Contents.json 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Contents.json
new file mode 100644
index 0000000..bdf34f6
--- /dev/null
+++ b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Contents.json
@@ -0,0 +1,176 @@
+{
+  "images" : [
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "ios7_settings_icon.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "ios7_settings_i...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "icon-sm...@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "icon-spotlight...@2x-1.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "icon-spotlight...@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "57x57",
+      "idiom" : "iphone",
+      "filename" : "Icon.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "57x57",
+      "idiom" : "iphone",
+      "filename" : "i...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "icon...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "icon...@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "ios7_app_icon_iphone.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-Spotlight-40.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "icon-spotlight...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "50x50",
+      "idiom" : "ipad",
+      "filename" : "Icon-Small-50.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "50x50",
+      "idiom" : "ipad",
+      "filename" : "icon-small...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "72x72",
+      "idiom" : "ipad",
+      "filename" : "Icon-72.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "72x72",
+      "idiom" : "ipad",
+      "filename" : "icon...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-76.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "icon...@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "24x24",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "notificationCenter",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "27.5x27.5",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "notificationCenter",
+      "subtype" : "42mm"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "watch",
+      "role" : "companionSettings",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "watch",
+      "role" : "companionSettings",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "appLauncher",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "44x44",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "longLook",
+      "subtype" : "42mm"
+    },
+    {
+      "size" : "86x86",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "quickLook",
+      "subtype" : "38mm"
+    },
+    {
+      "size" : "98x98",
+      "idiom" : "watch",
+      "scale" : "2x",
+      "role" : "quickLook",
+      "subtype" : "42mm"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@2x.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@3x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@3x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@3x.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@3x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-72.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-72.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-72.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-72.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@2x.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-76.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-76.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-76.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-76.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/icon...@2x.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small-50.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small-50.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon-small...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-small...@2x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/icon-small...@2x.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-small...@2x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-Small.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-Small.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon-sm...@3x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-sm...@3x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/icon-sm...@3x.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-sm...@3x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Spotlight-40.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Spotlight-40.png
Binary files differ
diff --git 
a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon-spotlight...@2x-1.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x-1.png
similarity index 100%
rename from 
Wikipedia/Images.xcassets/AppIcon.appiconset/icon-spotlight...@2x-1.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x-1.png
Binary files differ
diff --git 
a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon-spotlight...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x.png
similarity index 100%
rename from 
Wikipedia/Images.xcassets/AppIcon.appiconset/icon-spotlight...@2x.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x.png
Binary files differ
diff --git 
a/Wikipedia/Images.xcassets/AppIcon.appiconset/icon-spotlight...@3x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@3x.png
similarity index 100%
rename from 
Wikipedia/Images.xcassets/AppIcon.appiconset/icon-spotlight...@3x.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@3x.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Icon.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/Icon.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon.png
Binary files differ
diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/i...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/i...@2x.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/i...@2x.png
rename to Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/i...@2x.png
Binary files differ
diff --git 
a/Wikipedia/Images.xcassets/AppIcon.appiconset/ios7_app_icon_iphone.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_app_icon_iphone.png
similarity index 100%
rename from 
Wikipedia/Images.xcassets/AppIcon.appiconset/ios7_app_icon_iphone.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_app_icon_iphone.png
Binary files differ
diff --git 
a/Wikipedia/Images.xcassets/AppIcon.appiconset/ios7_settings_icon.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_icon.png
similarity index 100%
rename from Wikipedia/Images.xcassets/AppIcon.appiconset/ios7_settings_icon.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_icon.png
Binary files differ
diff --git 
a/Wikipedia/Images.xcassets/AppIcon.appiconset/ios7_settings_i...@2x.png 
b/Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_i...@2x.png
similarity index 100%
rename from 
Wikipedia/Images.xcassets/AppIcon.appiconset/ios7_settings_i...@2x.png
rename to 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_i...@2x.png
Binary files differ
diff --git a/scripts/process-icons.sh b/scripts/process-icons.sh
index 08efd2d..b5802d3 100755
--- a/scripts/process-icons.sh
+++ b/scripts/process-icons.sh
@@ -1,88 +1,103 @@
-#This script will overlay version, git, and build configuration information 
over the icon for non-app store builds
-#Inspiration: 
http://www.merowing.info/2013/03/overlaying-application-version-on-top-of-your-icon/
+       #This script will overlay information over the app icon
+       #Inspiration: 
http://www.merowing.info/2013/03/overlaying-application-version-on-top-of-your-icon/
 
-export PATH=$PATH:/usr/local/bin
+       export PATH=$PATH:/usr/local/bin
 
-#Don't run if imagemagick is not installed
-if ! convert -version > /dev/null; then
-       exit 0
-fi
+       function processIconSet() {
 
-#Don't do this for App Store Releases
-if [ "$CONFIGURATION" == "Release" ]; then
-       exit 0
-fi
+               #Get build number from info.plist
+               build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" 
"${INFOPLIST_FILE}"`
 
-function processIconSet() {
+               #Find existing icons
+               source_icon_set_prefix=$1
+               source_icon_set_folder_name=$source_icon_set_prefix".appiconset"
+               source_icon_set_directory=`find . -name 
$source_icon_set_folder_name -type d`
+               echo "Source icon directory: "$source_icon_set_directory
 
-       #Get build number from info.plist
-       build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" 
"${INFOPLIST_FILE}"`
+               #Find target icons
+               target_icon_set_prefix=$2
+               target_icon_set_folder_name=$target_icon_set_prefix".appiconset"
+               target_icon_set_directory=`find . -name 
$target_icon_set_folder_name -type d`
+               echo "Target icon directory: "$target_icon_set_directory
 
-       #Get path to icons in app bundle
-       
icon_directory_path="${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
-       echo "icon directory: "$icon_directory_path
+               #Fine the icons in the app bundle
+               source_icons=`find "$source_icon_set_directory" -name "*.png" 
-type f`
+               echo "Source icons: "$source_icons
 
-       #Set the prefix of icon files so that we can find them in the the app 
bundle
-       source_icon_set_prefix=$1
-       echo "Source icon Prefix: "$source_icon_set_prefix
+               #Looping through unescaped paths is fraught with peril
+               #Tip found here: 
http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html
+               SAVEIFS=$IFS
+               IFS=$(echo -en "\n\b")
+               echo "Set IFS for unescaped for loop paths"
 
-       #Fine the icons in the app bundle
-       source_icons=`find "$icon_directory_path" -name 
"$source_icon_set_prefix*.png" -type f`
-       echo "Source icons: "$source_icons
+               #Loop through icons
+               for source_icon_path in ${source_icons}; do
 
-       #Looping through unescaped paths is fraught with peril
-       #Tip found here: 
http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html
-       SAVEIFS=$IFS
-       IFS=$(echo -en "\n\b")
-       echo "Set IFS for unescaped for loop paths"
+                       
target_icon_path="${target_icon_set_directory}/${source_icon_path##*/}"
+                       echo "Source icon path: $source_icon_path"
+                       echo "Target icon path: $target_icon_path"
 
-       #Loop through icons
-       for source_icon_path in ${source_icons}; do
+                       if ! convert -version > /dev/null; then
+                               #Don't run if imagemagick is not installed
+                               cp "${source_icon_path}" "${target_icon_path}"
 
-               echo "Source icon path: $source_icon_path"
+                       elif [ "$CONFIGURATION" == "Release" ]; then
+                               #Don't do this for App Store Releases
+                               cp "${source_icon_path}" "${target_icon_path}"
+                               echo "Not overlaying source Image for Release 
build"
 
-               #Image meta
-               minimum_width=""
-               width=`identify -format %w "$source_icon_path"`
-               height=`identify -format %h "$source_icon_path"`
+                       else
 
-               #Overlay Height
-               overlay_height=""
-               overlay_color="#0008"
+                               #Image meta
+                               width=`identify -format %w "$source_icon_path"`
+                               height=`identify -format %h "$source_icon_path"`
+                               # echo "Width: "$width
+                               # echo "Height: "$height
 
-               #Set minimum width and overlay height based on icon size
-               if [[ $source_icon_path == *"@3x"* ]]; then
-                       minimum_width=171
-                       overlay_height=60
-               elif [[ $source_icon_path == *"@2x"* ]]; then
-                       minimum_width=114
-                       overlay_height=40
-               else
-                       minimum_width=57
-                       overlay_height=20
-               fi
+                               #Overlay Size
+                               overlay_height=$height
+                               overlay_width=$width
+                               let "overlay_height/=4"
+                               let "overlay_width*=3"
 
-               #Only process icons that show on home screens (> minimum_width)
-               if [ $width -ge $minimum_width ]; then
+                               # echo "O Width: "$overlay_width
+                               # echo "O Height: "$overlay_height
 
-                       echo "Overlaying source Image "$source_icon_path
+                               #Overlay Color
+                               overlay_color="#0008"
 
-                       #Overlay Image
-                       convert -background $overlay_color -fill white -gravity 
center -size ${width}x${overlay_height}\
-                       caption:"${CONFIGURATION}\n(${build})"\
-                       "${source_icon_path}" +swap -gravity south -composite 
"${source_icon_path}"
+                               #Only process larger icons
+                               minimum_width=57
 
-               else
+                               if [[ $width -ge $minimum_width ]]; then
 
-                       echo "Not overlaying source Image "$source_icon_path" 
because its width ("$width") is smaller than minimum size ("$minimum_width")"
+                                       echo "Overlaying source image 
"$source_icon_path
 
-               fi
+                                       #Overlay Image
+                                       convert -background $overlay_color 
-fill white -gravity center -size ${overlay_width}x${overlay_height}\
+                                       caption:"${CONFIGURATION}\n(${build})"\
+                                       "${source_icon_path}" +swap -gravity 
south -composite "${target_icon_path}"
 
-       done
+                               else
+                                       #For everything else, just copy it over
+                                       cp "${source_icon_path}" 
"${target_icon_path}"
+                                       echo "Not overlaying source Image 
"$source_icon_path" because its width ("$width") is smaller than minimum size 
("$minimum_width")"
+                               fi
 
-       IFS=$SAVEIFS
-       echo "Reset IFS"
+                       fi
 
-}
+               done
 
-processIconSet "AppIcon"
+       #Copy JSON
+               source_json_path=`find "$source_icon_set_directory" -name 
"*.json" -type f`
+               
target_json_path="${target_icon_set_directory}/${source_json_path##*/}"
+
+               cp "${source_json_path}" "${target_json_path}"
+               echo "Copying JSON from "$source_json_path" to 
"$target_json_path
+
+               IFS=$SAVEIFS
+               echo "Reset IFS"
+
+       }
+
+       processIconSet "AppIconSource" "AppIcon"

-- 
To view, visit https://gerrit.wikimedia.org/r/204703
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I39285429803b72d5caeda738fb82bc3d23406317
Gerrit-PatchSet: 5
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Fjalapeno <cfl...@wikimedia.org>
Gerrit-Reviewer: Bgerstle <bgers...@wikimedia.org>
Gerrit-Reviewer: Dr0ptp4kt <ab...@wikimedia.org>
Gerrit-Reviewer: Mhurd <mh...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to