2
0

Put Mac icon into AppIconSet

This commit is contained in:
Maarten Billemont 2014-10-26 13:26:41 -04:00
parent c781bcf10a
commit 0d5b51ed8d
15 changed files with 71 additions and 9 deletions

@ -1 +1 @@
Subproject commit 834069955051f2f822832771bd4572577b2ec3f6
Subproject commit a8811be0bd4d2b510ea7d4d42e8057dd6b5c639f

View File

@ -39,8 +39,6 @@
</array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>MasterPassword</string>
<key>CFBundleIdentifier</key>
<string>com.lyndir.lhunath.MasterPassword.Mac</string>
<key>CFBundleInfoDictionaryVersion</key>

View File

@ -806,6 +806,17 @@
DACA29721705E1A8002C6C22 /* dictionary.lst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dictionary.lst; sourceTree = "<group>"; };
DACA29771705E2BD002C6C22 /* JRSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JRSwizzle.h; sourceTree = "<group>"; };
DACA298C1705E2BD002C6C22 /* JRSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JRSwizzle.m; sourceTree = "<group>"; };
DAD0C5F619FD6034009CB08D /* icon_128x128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_128x128.png; sourceTree = "<group>"; };
DAD0C5F719FD6034009CB08D /* icon_128x128@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_128x128@2x.png"; sourceTree = "<group>"; };
DAD0C5F819FD6034009CB08D /* icon_16x16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_16x16.png; sourceTree = "<group>"; };
DAD0C5F919FD6034009CB08D /* icon_16x16@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_16x16@2x.png"; sourceTree = "<group>"; };
DAD0C5FA19FD6034009CB08D /* icon_256x256.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_256x256.png; sourceTree = "<group>"; };
DAD0C5FB19FD6034009CB08D /* icon_256x256@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_256x256@2x.png"; sourceTree = "<group>"; };
DAD0C5FC19FD6034009CB08D /* icon_32x32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_32x32.png; sourceTree = "<group>"; };
DAD0C5FD19FD6034009CB08D /* icon_32x32@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_32x32@2x.png"; sourceTree = "<group>"; };
DAD0C5FE19FD6034009CB08D /* icon_512x512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_512x512.png; sourceTree = "<group>"; };
DAD0C5FF19FD6034009CB08D /* icon_512x512@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_512x512@2x.png"; sourceTree = "<group>"; };
DAD0C60019FD6034009CB08D /* icon.sketch */ = {isa = PBXFileReference; lastKnownFileType = file; path = icon.sketch; sourceTree = "<group>"; };
DAD312C01552A20800A3F9ED /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
DAD9B5E1176299B9001835F9 /* MasterPassword-Mac-LoginHelper.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "MasterPassword-Mac-LoginHelper.xcodeproj"; path = "MasterPassword-Mac-LoginHelper/MasterPassword-Mac-LoginHelper.xcodeproj"; sourceTree = "<group>"; };
DAD9B5EF1762CAA4001835F9 /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; };
@ -1546,6 +1557,7 @@
DACA23B51705DF7D002C6C22 /* Media */ = {
isa = PBXGroup;
children = (
DAD0C5F419FD6034009CB08D /* mac */,
DA6558A319A99609009A0BEB /* Images.xcassets */,
DA606FE9195D03E200CA98B5 /* Insignia */,
DAAA81AF195A8D1300FA30D9 /* gradient.png */,
@ -1646,6 +1658,32 @@
path = jrswizzle;
sourceTree = "<group>";
};
DAD0C5F419FD6034009CB08D /* mac */ = {
isa = PBXGroup;
children = (
DAD0C5F519FD6034009CB08D /* icon */,
DAD0C60019FD6034009CB08D /* icon.sketch */,
);
path = mac;
sourceTree = "<group>";
};
DAD0C5F519FD6034009CB08D /* icon */ = {
isa = PBXGroup;
children = (
DAD0C5F619FD6034009CB08D /* icon_128x128.png */,
DAD0C5F719FD6034009CB08D /* icon_128x128@2x.png */,
DAD0C5F819FD6034009CB08D /* icon_16x16.png */,
DAD0C5F919FD6034009CB08D /* icon_16x16@2x.png */,
DAD0C5FA19FD6034009CB08D /* icon_256x256.png */,
DAD0C5FB19FD6034009CB08D /* icon_256x256@2x.png */,
DAD0C5FC19FD6034009CB08D /* icon_32x32.png */,
DAD0C5FD19FD6034009CB08D /* icon_32x32@2x.png */,
DAD0C5FE19FD6034009CB08D /* icon_512x512.png */,
DAD0C5FF19FD6034009CB08D /* icon_512x512@2x.png */,
);
path = icon;
sourceTree = "<group>";
};
DAD9B5E2176299B9001835F9 /* Products */ = {
isa = PBXGroup;
children = (
@ -2450,7 +2488,7 @@
DA5BFA6E147E415C00F98B1E /* Debug-Mac */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = MasterPassword.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
@ -2474,7 +2512,7 @@
DA5BFA6F147E415C00F98B1E /* AdHoc-Mac */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = MasterPassword.entitlements;
CODE_SIGN_IDENTITY = "Developer ID Application";
@ -2574,7 +2612,7 @@
DA95D60A14DF3F3B008D1B94 /* AppStore-Mac */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon";
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = MasterPassword.entitlements;
CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 KiB

View File

@ -8,6 +8,18 @@ export PATH+=/usr/local/bin
# icons format: [pixel size]@[scale]@[idiom]@[os]:[filename] -- if os is "anything lower", omit it
icons=(
# Mac
16@1@mac@:
32@2@mac@:
32@1@mac@:
64@2@mac@:
128@1@mac@:
256@2@mac@:
256@1@mac@:
512@2@mac@:
512@1@mac@:
1024@2@mac@:
# iPhone
180@3@iphone@8.0:Icon-60@3x.png
120@3@iphone@8.0:Icon-Small-40@3x.png
120@2@iphone@7.0:Icon-60@2x.png
@ -17,7 +29,7 @@ icons=(
58@2@iphone@:Icon-Small@2x.png
# 57@1@iphone@:Icon.png
# 29@1@iphone@:Icon-Small.png
#
# iPad
76@1@ipad@7.0:Icon-76.png
152@2@ipad@7.0:Icon-76@2x.png
40@1@ipad@7.0:Icon-Small-40.png
@ -66,8 +78,10 @@ appiconset="$xcassets/AppIcon.appiconset"
launchimage="$xcassets/LaunchImage.launchimage"
ios_icon=MasterPassword/Resources/Media/ios/icon
ios_launch=MasterPassword/Resources/Media/ios/launch
mac_icon=MasterPassword/Resources/Media/mac/icon
if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]]; then
if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]] ||
[[ "$(latest "$mac_icon"/*)" -nt "$appiconset/Contents.json" ]]; then
rm -rf "$appiconset"; mkdir -p "$appiconset"
{
comma=
@ -77,7 +91,19 @@ if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]]; then
IFS=@ read px scale idiom os <<< "$icon"
pt=$(( px / scale ))
if imageProps=$(copyImage "$ios_icon/$filename" "$appiconset/$filename"); then
suffix=
[[ $scale != 1 ]] && suffix=@${scale}x
[[ $filename ]] || filename="icon_${pt}x${pt}${suffix}.png"
source=$ios_icon/$filename
if [[ ! -e $source ]]; then
source=$mac_icon/$filename
if [[ ! -e $source ]]; then
err 'No icon for: %s' "$filename"
exit 1
fi
fi
if imageProps=$(copyImage "$source" "$appiconset/$filename"); then
printf '%s{"size":"%dx%d","filename":"%s","scale":"%sx"' \
"$comma" "$pt" "$pt" "$filename" "$scale"
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"