osxbundle: add new macOS 26 compatible App icon

generated with the Icon Composer project:

actool ./icon.icon \
  --compile ./ \
  --app-icon icon \
  --enable-on-demand-resources NO \
  --development-region en \
  --target-device mac \
  --platform macosx \
  --include-all-app-icons \
  --minimum-deployment-target 10.15 \
  --output-partial-info-plist /dev/null \
  --standalone-icon-behavior all

actool will generate an Assets.car file which is compatible with all the
new Theme variants of macOS 26 (default, dark, monochrome, tinted, etc).
it also generates an old icns file as a fallback, only default style.

since the new Assets.car file can't be used from cocoa directly, without
using private APIs, we still use the icns file when used from CLI.
this also means that from CLI only the default icon is used and the
macOS theming doesn't have any effect.

the macOS theming mechanism only works with the bundle and a Assets.car
file. all icons are generated on the fly depending on the Theme. this
generation has no public API and the mechanism would need to be
replicated by hand. to replicate this behaviour at least three different
icns would need to be generated, tinting needs to be implemented,
several system events need to be subscribed, and this wouldn't guarantee
the same look as the system mechanism. also none of the tools make it
possible to generate macOS 26 compatible icns file, besides for the
default file, since it at least is missing the necessary padding.
This commit is contained in:
der richter
2025-12-14 14:23:03 +01:00
parent efc44d05ff
commit f93df58a8e
4 changed files with 3 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ trim_trailing_whitespace = true
[.git/COMMIT*]
max_line_length = 72
[{osdep/dirent-win.h,TOOLS/osxbundle/mpv.app/Contents/PkgInfo}]
[{osdep/dirent-win.h,TOOLS/osxbundle/mpv.app/Contents/PkgInfo,TOOLS/osxbundle/mpv.app/Contents/Resources/Assets.car}]
charset = unset
insert_final_newline = unset
indent_style = unset

View File

@@ -120,6 +120,8 @@
<string>mpv</string>
<key>CFBundleIconFile</key>
<string>icon</string>
<key>CFBundleIconName</key>
<string>icon</string>
<key>CFBundleIdentifier</key>
<string>io.mpv</string>
<key>CFBundleInfoDictionaryVersion</key>

View File

Binary file not shown.

View File

Binary file not shown.