I am continuing my rEFind theme, and for that I want to start packaging the icons in apple ICNS files since this is the only rEFInd supported format that allows severall icon sizes (and it want this for bugger than full-hd screens)
To achieve this I have written a Jamfile!
Trouble is, it does not work(just “jam” only finds targets, and adding rules to call them didn’t work eirher), and I don’t know why. It also felt quite cumbersome in some places because actions can only take two arguments. Am I missing something? and what am i doing wrong?
actions MakePNGOS
{
hvif2png -s 128 -i Sources/$(1) -o $(2)-128.png
hvif2png -s 256 -i Sources/$(1) -o $(2)-256.png
echo "doing something..."
}
actions MakeICNSOS
{
png2icns $(iconname) $(iconname)-128.png $(iconname)-256.png
}
actions DeletePNGOS
{
rm $(1)-128.png
rm $(1)-256.png
}
rule MakeOSIcon iconsource : iconname
{
MakePNGOS $(iconsource) $(iconname) ;
MakeICNSOS $(iconname) ;
DeletePNGOS $(iconname) ;
}
actions MakePNGTool
{
hvif2png -s 48 -i $(1) -o $(2)-48.png
hvif2png -s 96 -i $(1) -o $(2)-96.png
}
actions MakeICNSTool
{
png2icns $(iconname) $(iconname)-48.png $(iconname)-96.png
}
actions DeletePNGTool
{
rm $(1)-48.png
rm $(1)-96.png
}
rule MakeToolIcon iconsource : iconname
{
MakePNGTool $(iconsource) $(iconname) ;
MakeICNSTool $(iconname) ;
DeletePNGTool $(iconname) ;
}
actions MakePNGOverlay
{
hvif2png -s 32 -i $(1) -o $(2)-32.png
hvif2png -s 64 -i $(1) -o $(2)-64.png
}
actions MakeICNSOverlay
{
png2icns $(iconname) $(iconname)-32.png $(iconname)-64.png
}
actions DeletePNGOverlay
{
rm $(1)-32.png
rm $(1)-64.png
}
rule MakeDriveOverlayIcon iconsource : iconname
{
MakePNGOverlay $(iconsource) $(iconname) ;
MakeICNSOverlay $(iconname) ;
DeletePNGOverlay $(iconname) ;
}
MakeToolIcon Action_GoBack1.IOM : arrow_left.icns ;
MakeToolIcon Action_GoForward1.IOM : arrow_right.icns ;
MakeToolIcon Alert_Info.IOM : func_about.png ;
MakeToolIcon File_Patch.IOM : func_bootorder.png ;
MakeToolIcon Action_Stop.IOM : func_exit.png ;
MakeToolIcon Device_Ramdisk.IOM : func_firmware.png ;
MakeToolIcon App_Installer.IOM : func_install.png ;
MakeOSIcon Misc_FreeBSD.IOM : os_freebsd.png ;
MakeOSIcon App_Old.IOM : os_legacy.png ;
MakeOSIcon App_Generic_4.IOM : os_unknown.png ;
MakeDriveOverlayIcon Misc_UEFI.IOM : vol_efi.png ;
MakeDriveOverlayIcon Device_Pendrive.IOM : vol_external.png ;
MakeDriveOverlayIcon Device_Harddisk.IOM :