← Back to team overview

kicad-developers team mailing list archive

Re: Generating the _xpm files uside by icons in eeschema.

 

Maciej, Oliver, Fabrizio

Thank you very much for this information! I will fix the icons later when I get home and resubmit the patches I have submitted to the ML. I also updated the compiling documentation after what you said, submitting that patch here :)

- Kristoffer

On 07/25/2017 10:30 AM, Fabrizio Tappero wrote:
that is true.

SVG to PNG to CPP requires a linux software called PNGCRUSH
https://pmt.sourceforge.io/pngcrush/

cheers
Fabrizio



On Tue, Jul 25, 2017 at 9:02 AM, Oliver Walters <oliver.henry.walters@xxxxxxxxx <mailto:oliver.henry.walters@xxxxxxxxx>> wrote:

    Kristoffer,

    I believe you also have to be compiling under Linux, for this to work.

    On Tue, Jul 25, 2017 at 4:35 PM, Maciej Sumiński
    <maciej.suminski@xxxxxxx <mailto:maciej.suminski@xxxxxxx>> wrote:

        Hi Kristoffer,

        You need to add entries to bitmaps_png/CMakeLists.txt and
        include/bitmaps.h. After that you need to build KiCad with a Cmake
        option -DMAINTAIN_PNGS=ON. You will need Inkscape for file format
        conversion.

        Regards,
        Orson

        On 07/24/2017 09:40 PM, Kristoffer Ödmark wrote:
         > Hello!
         >
         > I am working on some patches currently that adds a few menu
        entries in
         > eeschema. Since they seem to require me to add icons to all
        of the
         > entries, I am now stuck on trying to generate the .cpp files.
        Could
         > someone point me in the correct way on how to do this.
         >
         > I currently have added 2 svg files in bitmaps_png/sources/
        after that I
         > am unsure of what to do. Tried running a script i found in
        there, which
         > ran "rm -r *", causing me to have to remake svgs.
         >
         > - Kristoffer
         >
         > _______________________________________________
         > Mailing list: https://launchpad.net/~kicad-developers
        <https://launchpad.net/~kicad-developers>
         > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
        <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
         > Unsubscribe : https://launchpad.net/~kicad-developers
        <https://launchpad.net/~kicad-developers>
         > More help   : https://help.launchpad.net/ListHelp
        <https://help.launchpad.net/ListHelp>



        _______________________________________________
        Mailing list: https://launchpad.net/~kicad-developers
        <https://launchpad.net/~kicad-developers>
        Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
        <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
        Unsubscribe : https://launchpad.net/~kicad-developers
        <https://launchpad.net/~kicad-developers>
        More help   : https://help.launchpad.net/ListHelp
        <https://help.launchpad.net/ListHelp>



    _______________________________________________
    Mailing list: https://launchpad.net/~kicad-developers
    <https://launchpad.net/~kicad-developers>
    Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
    <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
    Unsubscribe : https://launchpad.net/~kicad-developers
    <https://launchpad.net/~kicad-developers>
    More help   : https://help.launchpad.net/ListHelp
    <https://help.launchpad.net/ListHelp>




_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


--
 -Kristoffer
>From 1ba03993f470b4afb335b15620cda09291cae455 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= <kristoffer.odmark90@xxxxxxxxx>
Date: Tue, 25 Jul 2017 10:54:42 +0200
Subject: [PATCH] Added some documentation on compile option -DMAINTAIN_PNGS=ON

---
 Documentation/development/compiling.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/development/compiling.md b/Documentation/development/compiling.md
index 43d388235..5e193e77f 100644
--- a/Documentation/development/compiling.md
+++ b/Documentation/development/compiling.md
@@ -199,6 +199,18 @@ version string information from the [git][] repository information as follows:
      |
      date of commit, or date of build if no .git present
 
+## Generating icons/bitmaps/pngs for use with KiBitmap() ## {#build_png_opt}
+
+Kicad has a builtin way to automatically generate the required bitmaps in .cpp format
+from svg and png. This is enabled by the CMake option -DMAINTAIN_PNGS=ON,
+currently this is only available under linux and requires the
+following softwares to be able to do the svg -> png -> .cpp conversions:
+
+    - pngcrush
+    - InkScape
+
+For adding your own icons the filenames needs to be added inside bitmaps_png/CMakeLists.txt.
+
 # Getting the KiCad Source Code ## {#getting_src}
 
 There are several ways to get the KiCad source.  If you want to build the stable version you
-- 
2.13.3


References