electron / electron/packager

[macOS 26 | Icon Composer] Allow providing an Icon using a `.car`-file

Open
#1,831 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
302
Forks
42
Avg merge
5h 40m
Merged PRs (30d)
7

Description

### Preflight Checklist

* [x] I have read the [contribution documentation](https://github.com/electron/packager/blob/main/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
* [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

### Problem Description

It is nice to see that Electron packager now supports Liquid Glass icons. However, the dependency on having XCode installed is a bit iffy. Especially for developing Electron applications, most of us don't really need those 12 GB, especially not if all we need is a small icon. Furthermore, the current setup prevents anyone from compiling the app for macOS 26 if we are using, say, GitHub Actions, or essentially any CI image that doesn't ship with XCode.

I took a look at the code, and found that what the new code essentially does is check for the presence of an `.icon`-folder in the `icon` property, and proceed to compile the icon down into an Asset catalog using `actool` which is where the dependency for XCode comes from.

However, usually, icons don't change. And if they do, I don't think its too much to ask users to re-compile the Icon composer file once more into such an asset catalog. But as long as the icon doesn't change, it should be usable within CIs, automated build pipelines, or without having XCode installed.

### Proposed Solution

I propose to allow to provide a compiled asset catalog directly as an alternative to the `.icon` source.

This would slightly increase complexity (as we then have the alternatives `.icns`, `.icon`, and `.car`), but I believe that this would make the new design language more accessible to many more people.

Essentially, Electron packager should simply skip the `actool` compilation if there is a `.car`-file in the icon string array. If there is an `.icon`-file, it should compile that to `.car` using `actool` and use that one.

### Alternatives Considered

I looked up the installed software on GitHub's runners, which I use, and they only ship with the command line tools, so there's actually no way of adding a Liquid Glass icon and continuing to use the CI for mac exports.

### Additional Information

I'll be seeing to downloading XCode later today to get this compiled `.car`-catalog, and see if there's any downsides to that approach, although I can't see any right now.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.