desktopToDarwinBundle: Include TOC in generated ICNS file

In order to compose a `.icns` file containing multiple icon sizes I had
to pass `--toc` to `icnsutil`. This did not seem to have a negative
effect on `.icns` containing only a single icon size.
This commit is contained in:
toonn 2022-03-21 12:45:26 +01:00
parent c3d974e441
commit 08a2b83c96
No known key found for this signature in database
GPG Key ID: 44FF902A66DF4576

View File

@ -132,8 +132,8 @@ convertIconTheme() {
}
iconsdir=$(getIcons "$sharePath" "apps/${iconName}" "$theme")
icnsutil compose "$out/${iconName}.icns" "$iconsdir/"*
if [[ -n "$(ls -1 "$iconsdir/"*)" ]]; then
icnsutil compose --toc "$out/${iconName}.icns" "$iconsdir/"*
else
echo "Warning: no icons were found. Creating an empty icon for ${iconName}.icns."
touch "$out/${iconName}.icns"