Skip to content

Commit fce0c61

Browse files
committed
Add a "Generate Icons" build phase
1 parent 3d6168c commit fce0c61

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Authenticator.xcodeproj/project.pbxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@
341341
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Authenticator" */;
342342
buildPhases = (
343343
7D745802100A4933AC7F63D5 /* Check Pods Manifest.lock */,
344+
C959A63F190A6CB10042DEC0 /* Generate Icons */,
344345
1D60588D0D05DD3D006BFB54 /* Resources */,
345346
1D60588E0D05DD3D006BFB54 /* Sources */,
346347
1D60588F0D05DD3D006BFB54 /* Frameworks */,
@@ -457,6 +458,21 @@
457458
shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";
458459
showEnvVarsInLog = 0;
459460
};
461+
C959A63F190A6CB10042DEC0 /* Generate Icons */ = {
462+
isa = PBXShellScriptBuildPhase;
463+
buildActionMask = 2147483647;
464+
files = (
465+
);
466+
inputPaths = (
467+
);
468+
name = "Generate Icons";
469+
outputPaths = (
470+
);
471+
runOnlyForDeploymentPostprocessing = 0;
472+
shellPath = /bin/bash;
473+
shellScript = "PATH=${PATH}:/usr/local/bin\ncd \"${SRCROOT}/Authenticator/Resources/\"\n./GenerateIcons.sh";
474+
showEnvVarsInLog = 0;
475+
};
460476
/* End PBXShellScriptBuildPhase section */
461477

462478
/* Begin PBXSourcesBuildPhase section */

Authenticator/Resources/GenerateIcons.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
hash inkscape 2>/dev/null || { echo >&2 "Icon generation requires inkscape. Using existing icons instead."; exit 0; }
4+
hash pngcrush 2>/dev/null || { echo >&2 "Icon generation requires pngcrush. Using existing icons instead."; exit 0; }
5+
36
# Generate App Icons
47
inkscape -z -e "Icon-29@2x.png" -w 58 "Icon.svg";
58
inkscape -z -e "Icon-40@2x.png" -w 80 "Icon.svg";

0 commit comments

Comments
 (0)