Reputation: 1605
In my projects folder i have a folder with the name translations
where i have the translations files .ts
.
What i want Qt/QMake to do on run is to put on the build folder the translation
with the correspondent .qm
files.
How can this be done?
Upvotes: 0
Views: 232
Reputation: 2886
You can run shell commands with qmake, using a custom target. Have a look at this answer here on SO.
In this case the command to invoke is lurelease, providing the right paths to your ts files and output directory.
Be aware custom commands are evaluated using the shell of the OS running qmake. That is cmd.exe on Windows and (likely) bash in several unix like systems. Therefore, a qmake script with custom commands is not platform agnostic.
Upvotes: 1