[Interest] How do i copy the QML files to debug folder without adding make install?
Harri Pasanen
harri at mpaja.com
Sat Jun 16 23:39:45 CEST 2012
On 06/16/2012 11:27 PM, Mark wrote:
> On Sat, Jun 16, 2012 at 11:24 PM, Harri Pasanen<harri at mpaja.com> wrote:
>> On 06/16/2012 10:07 PM, Mark wrote:
>>> Hi,
>>>
>>> If one makes a Qt Quick application you get a whole bunch of special
>>> code inside a .pri file that copies the QML files to the debug/release
>>> location _without_ having the need to add a make install. That is
>>> exactly what i want to have, but i don't want to have the massive .pri
>>> file nor is my app a "Qt Quick Application". I just want to copy a QML
>>> file after compilation to the DESTDIR and somehow that seemingly
>>> simple thing is close to impossible QMake.
>>>
>>> Can anyone help me with this? I'm trying this from Qt Creator and
>>> Windows but obviously it needs to work in Linux a well.
>>>
>>> I tried the solution in here:
>>> http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
>>> (the one with the QMake function) but that is also not working.
>> This is how camerademo does it, obviously only meant to be used on Windows:
>>
>> simulator {
>> CONFIG(debug, debug|release) {
>> system(mkdir
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Debug\\qml)
>> system(mkdir
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Debug\\qml\\symbian)
>> system(mkdir
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Debug\\qml\\images)
>> system(copy .\\qml\\symbian\\*
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Debug\\qml\\symbian)
>> system(copy .\\qml\\images\\*
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Debug\\qml\\images)
>> }
>> else {
>> system(mkdir
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Release\\qml)
>> system(mkdir
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Release\\qml\\symbian)
>> system(mkdir
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Release\\qml\\images)
>> system(copy .\\qml\\symbian\\*
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Release\\qml\\symbian)
>> system(copy .\\qml\\images\\*
>> ..\\camerademo-build-simulator-Simulator_Qt_for_MinGW_4_4__Qt_SDK__Release\\qml\\images)
>> }
>> }
>>
>>
>> Hope this helps,
>>
>> Harri
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> Hi Harri,
>
> Thany you for that. Sadly it's windows only thus a bit hard to use for linux ;)
Rest was an exercise for the reader.
So, I think if you replace \\ with / and replace "copy" with "cp" it
will work on linux.
and if you replace copy with a system specific macro, symlink copy to
cp, or something similar, you can make it work on both.
Harri
More information about the Interest
mailing list