0

I would like to embed Wren into my application and provide a proper set of pre-packaged modules for the APIs. However, doing so would leave me with a whole lot separate files that would all need to be bundled within.

The whole library would be maintained in a lib/ source folder.

Now, what options do I have to do so? There would be windres on Windows - but I am wanting to work cross-platform. Therefore, that option falls out of the choices.

Ingwie Phoenix
  • 2,703
  • 2
  • 24
  • 33
  • 1
    The cross platform makes this harder, by their very nature platform resources are platform dependent. It may be worth your while to have a custom abstraction across your target platforms. Alternatively, have you considered a custom build step that transforms each script file into a `const std::string` In a cpp file that you build in like any other global string? – Niall Nov 12 '18 at 04:45
  • 1
    A platform agnostic way is, to use a simple helper tool which translates arbitrary files into C or C++ source (in a pre-compile step), and compile these generated sources together with the rest. This works fine with binary files and can even be tuned to make "nicer" looking sources for text files. I've this demonstrated in my answer to [SO: How to include data object files (images, etc.) in program and access the symbols?](https://stackoverflow.com/a/47415163/7478597). – Scheff's Cat Nov 12 '18 at 07:12

0 Answers0