Closed SuperSandro2000 closed 3 years ago
So, this is Mac-specific, right?
Do you want it to fallback to png2icns
only when iconutil
isn't available, or would it be helpful to have a build option in the context of Nix?
So, this is Mac-specific, right?
Yeah, more like nix for darwin specific than mac.
Do you want it to fallback to
png2icns
only wheniconutil
isn't available, or would it be helpful to have a build option in the context of Nix?
It would be helpful in the context of Nix because we do not have iconutil available.
Does the Makefile change on the png2icns-fallback branch work for you?
@solemnwarning Can you remove the which part and just call the executable directly?
Also it errors because the sizes are double.
mkdir res/REHex.iconset
cp res/icon16.png res/REHex.iconset/icon_16x16.png
cp res/icon32.png res/REHex.iconset/icon_16x16@2x.png
cp res/icon32.png res/REHex.iconset/icon_32x32.png
cp res/icon64.png res/REHex.iconset/icon_32x32@2x.png
cp res/icon128.png res/REHex.iconset/icon_128x128.png
cp res/icon256.png res/REHex.iconset/icon_128x128@2x.png
cp res/icon256.png res/REHex.iconset/icon_256x256.png
cp res/icon512.png res/REHex.iconset/icon_256x256@2x.png
cp res/icon512.png res/REHex.iconset/icon_512x512.png
cp res/icon1024.png res/REHex.iconset/icon_512x512@2x.png
png2icns res/REHex.icns res/REHex.iconset/*
Using icns type 'it32', mask 't8mk' for 'res/REHex.iconset/icon_128x128.png'
Using icns type 'ic08' (ARGB) for 'res/REHex.iconset/icon_128x128@2x.png'
Using icns type 'is32', mask 's8mk' for 'res/REHex.iconset/icon_16x16.png'
Using icns type 'il32', mask 'l8mk' for 'res/REHex.iconset/icon_16x16@2x.png'
Duplicate icon element of type 'ic08' detected (res/REHex.iconset/icon_256x256.png)
make: *** [Makefile.osx:59: res/REHex.icns] Error 1`
The which command is for checking if png2icns is actually installed, does Nix not have which?
So the @2x
icons aren't used on Nix?
The which command is for checking if png2icns is actually installed, does Nix not have which?
All bash commands are available by default but I can specify which to make it available. A little nitpick which is not that important.
So the
@2x
icons aren't used on Nix?
I think the png2icns
used in Nix does not use it. The tool is part of libicns https://icns.sourceforge.io/.
Okay, pushed another commit to stop the @2x
icons being used.
Thanks! I think this is fine now and can be merged.
Merged to master in f19287fad329b54566b18a47a3ea8379adaa8d1a.
I am currently helping packaging rehex for Nix which does not contain iconutil because there is no source for it and can't fallback to the system one because this would be impure. Would it be possible to fallback (https://github.com/solemnwarning/rehex/blob/master/Makefile.osx#L55) to something else when iconutil is not available on macos?
Edit: I will try to compose a patch based on https://github.com/NixOS/nixpkgs/blob/66172a2ea4fa28e9a8692a6ad2adad7b65d0fe16/pkgs/applications/misc/kitty/png2icns.patch.
This command worked for me:
I am not sure how to integrate this into the Makefile as an fallback. Help would be appreciated.