Menu

#33 Please provide make target for icons in src/components/icons

open
nobody
None
2015-07-12
2015-07-11
Paul Gevers
No

In Debian, we like to make sure that files are build from source (because that is the only way we can guarantee that our binaries can be created with packages in Debian), where we define source as "the prefered form for modification". The png files in src/components/icons appear to be created by GIMP and the source seems to be available in the xcf files.

Could you please create a Makefile target to actually build the png files from source?

Discussion

  • Michalis Kamburelis

    For tcastle2dcontrol.xcf, it can be converted to tcastle2dcontrol.png in a straightforward manner. I added this, using xcftools (available in Debian since ~forever, https://packages.debian.org/search?keywords=xcftools ), see https://sourceforge.net/p/castle-engine/code/14586/ .

    For CastleIcons.xcf, which was used to export the rest of the icons --- this is not so easy unfortunately.

    Reason: Inside CastleIcons.xcf, some XCF layers are shared across all icons, and some are not. PNG files are produced by a human, by exporting appropriate subset of the XCF layers for each PNG file. The export process may be a daunting task, but the original contributor didn't find the task daunting enough to automate it... And in practice it's not a problem, these icons do not (and will not) change often. Automating the export would require using GIMP's "batch mode", where even the simplest conversion XCF->PNG is non-trivial, see e.g. http://stackoverflow.com/questions/5794640/how-to-convert-xcf-to-png-using-gimp-from-the-command-line or http://www.gimptalk.com/index.php?/topic/46715-batch-convert-xcf-to-png/ .

    Contributions are welcome of course! I'm just saying that writing an automated script to convert CastleIcons.xcf->xxx.png is non-trivial, and (at least so far!) it's not necessary for a normal development. So I don't know when someone (or me) will find a time to write a script to automate it, sorry...

     
  • Paul Gevers

    Paul Gevers - 2015-07-12

    I figured so much.

    My proposal for now is to document briefly how to do it by hand than. If I really can't stand this anymore, I will dive into this more.

    Thanks for the other target though.

     
  • Michalis Kamburelis

    I added the README.txt to src/component/icons/ , see https://sourceforge.net/p/castle-engine/code/14587/ .

    I'll leave this ticket open, since the CastleIcons.xcf case is not automated. But I may close it if it will not be resolved by anyone for a looong time:)

     

Log in to post a comment.