Navigation

    RetroPie forum home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Error compiling EmulationStation with custom icons

    Help and Support
    compile custom emulationstatio icons
    2
    7
    1253
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • madmodder123
      madmodder123 last edited by madmodder123

      So I was reading this page and trying to compile the icons into emulationstation but I am having some trouble.

      -Link to icon SVGs-

      I tried to use res2h as per:

      @jacobfk20 said in How to change button icons? [DONE]:

      @masteryoer Use the Beta release 0.3.2. It outputs the headers and source identical to the original ES resources. This is the exact command I used as well.
      res2h resources converted -h Resources.h -u ResourceUtil.cpp -s
      *This was done in windows.

      It matched ES's original resource.h and resourceUtil.cpp exactly, though some files were in different orders.

      I used the oldest version, the newest version, and the reccommended 0.3.2 version but none of them worked.
      Here is a link to a .cpp file that was generated (help__button_a_svg.cpp)
      Here is ResourceUtil.cpp
      Here is Resrouces.h
      I am able to compile it no problem without making any changes.
      I get this error when i attempt to "make" emulationstation after copying everything in the data folder to the Pi:

      pi@retropie:~/Emulationstation $ make
      [  1%] Built target nanosvg
      [  3%] Built target pugixml
      [ 72%] Built target es-core
      [ 73%] Linking CXX executable ../emulationstation
      ../libes-core.a(ResourceUtil.cpp.o): In function `__static_initialization_and_destruction_0(int, int) [clone .constprop.24]':
      ResourceUtil.cpp:(.text.startup+0x11a0): undefined reference to `help_analog_down_svg_size'
      ResourceUtil.cpp:(.text.startup+0x11a4): undefined reference to `help_analog_down_svg_data'
      ResourceUtil.cpp:(.text.startup+0x11b0): undefined reference to `help_analog_left_svg_size'
      ResourceUtil.cpp:(.text.startup+0x11b4): undefined reference to `help_analog_left_svg_data'
      ResourceUtil.cpp:(.text.startup+0x11c0): undefined reference to `help_analog_right_svg_size'
      ResourceUtil.cpp:(.text.startup+0x11c4): undefined reference to `help_analog_right_svg_data'
      ResourceUtil.cpp:(.text.startup+0x11d0): undefined reference to `help_analog_thumb_svg_size'
      ResourceUtil.cpp:(.text.startup+0x11d4): undefined reference to `help_analog_thumb_svg_data'
      ResourceUtil.cpp:(.text.startup+0x11e0): undefined reference to `help_analog_up_svg_size'
      ResourceUtil.cpp:(.text.startup+0x11e4): undefined reference to `help_analog_up_svg_data'
      ResourceUtil.cpp:(.text.startup+0x11f0): undefined reference to `help_button_a_svg_size'
      ResourceUtil.cpp:(.text.startup+0x11f4): undefined reference to `help_button_a_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1200): undefined reference to `help_button_b_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1204): undefined reference to `help_button_b_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1210): undefined reference to `help_button_hotkey_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1214): undefined reference to `help_button_hotkey_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1220): undefined reference to `help_button_l_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1224): undefined reference to `help_button_l_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1230): undefined reference to `help_button_r_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1234): undefined reference to `help_button_r_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1240): undefined reference to `help_button_select_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1244): undefined reference to `help_button_select_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1250): undefined reference to `help_button_start_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1254): undefined reference to `help_button_start_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1258): undefined reference to `help_button_x_svg_size'
      ResourceUtil.cpp:(.text.startup+0x125c): undefined reference to `help_button_x_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1260): undefined reference to `help_button_y_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1264): undefined reference to `help_button_y_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1268): undefined reference to `help_dpad_all_svg_size'
      ResourceUtil.cpp:(.text.startup+0x126c): undefined reference to `help_dpad_all_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1270): undefined reference to `help_dpad_down_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1274): undefined reference to `help_dpad_down_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1278): undefined reference to `help_dpad_left_svg_size'
      ResourceUtil.cpp:(.text.startup+0x127c): undefined reference to `help_dpad_left_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1280): undefined reference to `help_dpad_leftright_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1284): undefined reference to `help_dpad_leftright_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1288): undefined reference to `help_dpad_right_svg_size'
      ResourceUtil.cpp:(.text.startup+0x128c): undefined reference to `help_dpad_right_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1290): undefined reference to `help_dpad_up_svg_size'
      ResourceUtil.cpp:(.text.startup+0x1294): undefined reference to `help_dpad_up_svg_data'
      ResourceUtil.cpp:(.text.startup+0x1298): undefined reference to `help_dpad_updown_svg_size'
      ResourceUtil.cpp:(.text.startup+0x129c): undefined reference to `help_dpad_updown_svg_data'
      collect2: error: ld returned 1 exit status
      es-app/CMakeFiles/emulationstation.dir/build.make:1167: recipe for target 'emulationstation' failed
      make[2]: *** [emulationstation] Error 1
      CMakeFiles/Makefile2:274: recipe for target 'es-app/CMakeFiles/emulationstation.dir/all' failed
      make[1]: *** [es-app/CMakeFiles/emulationstation.dir/all] Error 2
      Makefile:149: recipe for target 'all' failed
      make: *** [all] Error 2
      

      Hoping that @masteryoer @frgn @jacobfk20 or @herb_fargus can chime in :)

      madmodder123 1 Reply Last reply Reply Quote 0
      • madmodder123
        madmodder123 @madmodder123 last edited by

        @madmodder123 Yay!, I was finally able to figure it out.
        I had to make it so the Resources.h and ResourceUtil.cpp and the /converted/*.cpp files so they match the same format as the original files

        changing

          size_t
        

        to

        uint16_t
        

        &

        unsigned char
        

        to

        uint8_t
        

        With an exception or two!

        Then changing the "help_button_a_svg" files/references to the files (in the files listed above) to "help__button_a_svg"

        Hope someone finds this helpful!

        frgn 1 Reply Last reply Reply Quote 2
        • frgn
          frgn @madmodder123 last edited by

          @madmodder123
          Hey. Will it be possible to change the font and PNG resources in this way? I have long wanted to modify the ES by changing the built-in font to a pixel one, and some graphics elements (background, switches, selector, etc.)

          If you understand and you can compile this, please try to change these resources. Thank you for your work.

          madmodder123 1 Reply Last reply Reply Quote 0
          • madmodder123
            madmodder123 @frgn last edited by madmodder123

            @frgn So I just replaced opensans_hebrew_condensed_light.ttf and opensans_hebrew_condensed_regular.ttf with some font i downloaded from the interne (i renamed them to the same names) and then used res2h to convert them, after editing the converted files with the method listed above I was able to compile ES and it worked fine.

            I recommend trying this out for yourself so you can compile future versions of ES :)

            Also I am having trouble editing the .SVG files, when I make my own they are completely translucent, ill update if I find out how to fix them. Editing PNGs should work just fine

            frgn 1 Reply Last reply Reply Quote 1
            • frgn
              frgn @madmodder123 last edited by

              @madmodder123 many thanks! I will try.

              madmodder123 1 Reply Last reply Reply Quote 0
              • madmodder123
                madmodder123 @frgn last edited by madmodder123

                @frgn http://www.1001fonts.com/search.html?search=pixel&x=0&y=0 this is a good site for free fonts
                also .SVG files made with Photoshop CC 2017 did not work correctly for me so I used Inkscape 0.91 to edit .SVG files. I'm not sure if newer versions of Inkscape work but 0.91 does for sure.

                frgn 1 Reply Last reply Reply Quote 0
                • frgn
                  frgn @madmodder123 last edited by

                  @madmodder123 I changed the vector images of buttons to symbolic (playstation). I converted them from a raster to a vector in an inscape.
                  In this thread, @jacobfk20 helped me with the compilation, and everything worked.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.