PDA

View Full Version : Including required file when building/deploy (not as resource)



ce_nort
5th October 2017, 20:12
I'm using a .ini file as a config file to load into QSettings for initializing some things in my program, and I'm wondering how to make sure the file is included and in the right place when building/deploying (i.e., a specific place that the program knows to look for it). I don't want to add it to a resource file because those get compiled and the point of this is to allow the file to be edited without re-compiling the program. I've found information about including libraries in the .pro file, but this is just a single .ini file so I'm not sure that would work the same. Is there anything I can do besides copy and paste the file into the folder with the executable after building/deploying? It seems like there should be a better way, I'm just having a hard time finding it. Any pointers would be helpful!

ado130
5th October 2017, 22:32
I don't know how do you build your app, but e.g. in InnoSetup you can add a file to your executable file. So the .ini file can be in the same directory as .exe file.

ce_nort
5th October 2017, 22:56
I use Qt's deploy tools (windeployqt and macdeployqt), so unfortunately that won't work. But good to know if I do start using that at some point.