Incorporating a form file into a release .exe

Started by lurquer, 13 February 2020, 00:49:17

lurquer

Great library, Tex. Can't say enough about it.

Question: I have a big ol' project with a gui created using the form builder. I want to package it all up into an .exe I can share. Will I always need the form file to go along with it? Or, is there some way (short of doing it manually in my code) to get the form into my .exe.
I'm using C++ with Visual Studio 2019.
Thanks.

texus

If the form is stored as a resource in the exe (which is Windows-specific) then you need to load it, get its contents in a string, put this string into an std::stringstream and pass this stringstream to gui.loadWidgetsFromFile.
You can't store your themes in resources without writing your own theme loader though, so you won't be able to easily put everything inside your exe.