sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

Improve support for switching between precompiled + cmake assets #58

Closed sudara closed 1 year ago

sudara commented 1 year ago

Because of wanting to maintain compatibility with Projuce (and the lack of a convention/mechanism for BinaryData in JUCE modules), updating icons is laborious and requires a number of manual steps, including uncommenting CMake code to run the BinaryData helper.

Ideally we have a CMake way to "recompile InspectorBinaryData assets and place them in the source."

Also, including the output .cpp files manually is sketchy, would be nice to find a projucer-friendly way of including an arbitrary number of cpp files.

This the current comment in the CMake code:

To work with CMake Assets:

  * Uncomment the following lines to generate the assets with cmake
  * Delete everything in "LatestCompliedAssets" folder so there's no conflict
  * Comment out the manual includes in melatonin_inspector.cpp

When ready to commit:

  * Comment out the CMake `InspectorBinaryData` target lines again
  * Move the new binary .cpp from your build folder to LatestCompiledAssets
  * Move the latest InspectorBinaryData.h to the main module folder
    (for me the files are in cmake-build-debug/modules/melatonin_inspector/juce_binarydata_MelatoninInspector
  * Add the .cpp includes manually to melatonin_inspector.cpp