Skip to content

Commit d662190

Browse files
committed
macOS Adaptive Icons
1 parent 075513b commit d662190

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

ndll/Mac64/lime.ndll

0 Bytes
Binary file not shown.

ndll/Mac64/lime.ndll.hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5b2699f9b0725a89b1cad46ee7c39b49
1+
18cd68866277408bf59ca9c98104dbf5

src/lime/tools/AdaptiveIcon.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import haxe.io.Path;
55

66
/**
77
This file is a wrapper to save to path and some properties about the AdaptiveIcon format from Android
8-
It is also used to store Apple's Icon Composer .icon file for iOS since its also a dynamic icon file
8+
It is also used to store Apple's Icon Composer .icon file for Apple Platforms as it is also a dynamic icon file
99
**/
1010
class AdaptiveIcon
1111
{
@@ -18,7 +18,7 @@ class AdaptiveIcon
1818
this.path = path;
1919
this.hasRoundIcon = hasRoundIcon;
2020

21-
// macOS files are actually folders with a file extension
21+
// Some macOS files are actually folders with a file extension and the icon composer file is one of them
2222
this.iconComposerFile = Path.extension(path) == "icon" && FileSystem.isDirectory(path);
2323
}
2424

templates/mac/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<string>::APP_FILE::</string>
99
<key>CFBundleIconFile</key>
1010
<string>icon.icns</string>
11+
<key>CFBundleIconName</key>
12+
<string>icon</string>
1113
<key>CFBundleIdentifier</key>
1214
<string>::APP_PACKAGE::</string>
1315
<key>CFBundleInfoDictionaryVersion</key>

tools/platforms/MacPlatform.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,11 @@ class MacPlatform extends PlatformTarget
566566

567567
context.HAS_ICON = IconHelper.createMacIcon(icons, Path.combine(contentDirectory, "icon.icns"));
568568

569+
if (project.adaptiveIcon != null && project.adaptiveIcon.iconComposerFile) {
570+
context.MACOS_ADAPTIVE_ICON = project.adaptiveIcon.path;
571+
ProjectHelper.recursiveSmartCopyDirectory(project, project.adaptiveIcon.path, Path.combine(contentDirectory, "icon.icon"), context);
572+
}
573+
569574
for (asset in project.assets)
570575
{
571576
if (asset.embed != true)

tools/tools.n

336 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)