hello_imgui icon indicating copy to clipboard operation
hello_imgui copied to clipboard

Feature request: omit unneeded asset files

Open wkjarosz opened this issue 1 year ago • 1 comments

Currently, hello_imgui_add_app copies over the entire assets folder. However, many of the assets are platform specific (e.g. app_settings/apple is only needed on apple system). When distributing the binary for my application, I'd prefer to only include the assets that are needed for that specific platform. Is this currently possible?

As a work-around, I can point hello_imgui_add_app to a custom ASSETS_LOCATION which I selectively copy things into. I set MY_RESOURCE_FILES based on the target platform and then do:

foreach(MY_RESOURCE_FILE ${MY_RESOURCE_FILES})
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/${MY_RESOURCE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${MY_RESOURCE_FILE} COPYONLY
  )
endforeach()

It's a bit clunky, and will require updating if hello imgui expands its set of default assets, but works fine, so it may not be necessary for hello imgui to provide such functionality directly.

However, hello_imgui_add_app still copies DroidSans, and both version 4 and 6 of font awesome into the final assets directory. I'm using my own default font and icons, and would prefer to avoid the additional size and clutter. Is it possible to ask hello_imgui_add_app to omit copying these, and if not, would you consider adding such an option?

wkjarosz avatar Jan 11 '25 05:01 wkjarosz

Hello,

I will leave this open so it is not forgotten. It is not on my urgent task List at the moment , as I do have to work on multiple projects at the same time.

pthom avatar Jan 13 '25 12:01 pthom