Custom deployment
-
I am working on QTCreator targeting an embedded linux device. Everything is fine except the fact that I am not able to add some custom file to deploy step...
In .pro file I set:
@
target.path = /home/root
INSTALLS += target
@and I am able to deploy my executable to the remote device...
Now what if I would like to add some custom files to the deployment process?
I'd tried to add the following lines to my .pro file:
@
mypackage.files = /path/to/my/files/on/my/pc/*
mypackage.path = /home/root
INSTALLS += mypackage
@but it doesn't work...
How can I do that?
-
Shouldn't that be INSTALLS += mypackage ?
-
Yes, sure... I've made a typo while posting to the forum... obviously I've tried "INSTALLS += mypackage" (now I've edited my original post) but it does not work...
-
Ok, I found two distinct solutions...
FIRST SOLUTION:
@
mypackage.files = /path/to/my/files/on/my/pc
mypackage.path = /home/root
@
In this case the folder "pc" (together with its content) is copied to the target device.SECOND SOLUTION:
It is also possible to exploit some undocumented QMAKE functions (as explained "here":http://www.qtcentre.org/wiki/index.php?title=Undocumented_qmake#Replace_functions):@
mypackage.files = $$files(/path/to/my/files/on/my/pc/*)
mypackage.path = /home/root
@In this case only the files contained in "pc" are copied to the target device (as requested by me).