Skip to content

osxbundle: add new macOS 26 compatible App icon - #17131

Merged
Akemi merged 1 commit into
mpv-player:masterfrom
Akemi:mac_icon2
Dec 21, 2025
Merged

osxbundle: add new macOS 26 compatible App icon#17131
Akemi merged 1 commit into
mpv-player:masterfrom
Akemi:mac_icon2

Conversation

@Akemi

@Akemi Akemi commented Dec 14, 2025

Copy link
Copy Markdown
Member

alternative to #16926. generated with mpv-player/random-stuff#6

this is a lazy macOS 26 compatible icon. it just uses our current icon at 1024x1024px for an Icon Composer project. it tries to preserve the current colour scheme, see remark on the PR mentioned above. it also deactivates all the liquid glass effects, because they don't work well with raster images. for a proper macOS 26 icon we need a properly layered (layered in Icon Composer) vector image(s).

the macOS theming only works with the bundle but not from the CLI. see remarks on the first commit.

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.

just some generation infos:

// convert Icon Composer file to Assets.car file
// https://www.hendrik-erz.de/post/supporting-liquid-glass-icons-in-apps-without-xcode
// man actool 
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
  
// extract old icns file from Assets.car file, only default appearance
// https://www.alansiu.net/2023/04/24/extracting-icons-from-assets-car-on-macos/
iconutil -c icns Assets.car icon -o test.icns
  
// extract specific variation out of a Icon Composer file
// rendition: Default, Light, Dark, TintedLight, TintedDark, ClearLight, ClearDark
// ictool (System, Xcode) not the same as ictool (Icon Composer)
// does only extract images without padding (padding is needed for new macOS 26 look)
// https://mjtsai.com/blog/2025/10/02/how-to-export-a-mac-icon-file-with-the-proper-margins/
// https://www.macscripter.net/t/a-script-to-create-tahoe-looking-icons-from-existing-png-or-icns-files/77424/2
/Applications/Xcode.app/Contents/Applications/Icon\ Composer.app/Contents/Executables/ictool icon.icon --export-image --output-file output.png --platform macOS --rendition Default --width 1024 --height 1024 --scale 2

// convert iconset folder to old icns file
iconutil -c icns icon/default.iconset

default, dark, clear light, clear dark, tinted light, tinted dark:

dafault dark clear light clear dark tinted light tinted dark quicklook

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.
@Akemi

Akemi commented Dec 14, 2025

Copy link
Copy Markdown
Member Author

added the Icon Composer file to mpv-player/random-stuff#6 so we don't lose the actual source.

@github-actions

Copy link
Copy Markdown

@Akemi
Akemi merged commit f93df58 into mpv-player:master Dec 21, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant