I want to copy a data file from a directory to the source tree in the directory of the associated application so that it is available at run time, only on Windows. There seem to be two suggested methods: use a post dependency to issue a DOS copy command ( Including resource files in the Qt Creator build directory ) or use the installation step ( Copy the file to the build directory after compiling the project with Qt ), but I can't get it working as we would like.
The first requires me to use qmake path variables to generate my source and destination paths, but they contain backslash path separators that the DOS copy command cannot handle.
The installation solution forces other users of my project to configure the post-build step in Qt Creator before it works (one for each configuration), and I would like to avoid this, because I want my work on the project to install by default is qt creator.
Is there a way to do this seemingly simple task that can be fully defined in a .pro file for a project? For example, is there a way to extend qmake path variables in a specific way on the platform?
qt qt-creator
pineweasel
source share