[haiku] Re: SVG Icon (linking or bind)

Hi,

christian Albrecht <Lelldorin@xxxxxx> wrote:
> i want to make my little application yabBuilder available for Haiku. I 
> want to add all features of the little app, so i need to know how can i 
> bind or link a SVG icon or Haiku icon on a binary?

You will need to open your SVG icon in Icon-O-Matic. It's possible that you 
need to tweak it somewhat in Icon-O-Matic to make it look perfect. Then 
you'd use "File->Export As" and pick the "HVIF RDef" export format. This 
will generate a text file, which you can then copy'n'paste into an .rdef 
resource definition text file. Those are generally used on Haiku for 
linking resources into applications. Haiku has a command line tool "rc". 
This tool can convert text file resources (.rdef) into binary resources 
".rsrc" and the other way around (rc --help). You can use this if you need 
an .rsrc instead of an .rdef. If ZETA is still your main platform, you can 
use this to load up .rsrc files into QuickRes. QuickRes also lets you merge 
resources. You are looking for the "VICN" type resource, that's the HVIF 
icon. It's only displayed as binary data in QuickRes, but you can 
copy'n'paste and change other aspects of it nevertheless. Before compiling 
a .rsrc from your .rdef with rc, make sure you have filled in the necessary 
details which the Icon-O-Matic export left out. Usually, you can change the 
definition to just "vector_icon". See some .rdef files in the Haiku source 
code for how it should look.

HTH & Best regards,
-Stephan




Other related posts: