Qt-interest Archive, May 2008
How to get qmake to include resource files?
Message 1 in thread
Hi Everyone,
I have a resource file that refers to HTML and images. Currently, when I change the .qrc file, rcc and link are correctly called. If I just change any of the html or images files, then building the project does not run the rcc utility automatically.
How can I tell qmake to include all of the resource files referenced in the qrc file as dependents of the qrc file, so that rcc is called whenever any of the resource files change.
I am happy to do this explicitly in the .pro, though it would be really nice if qmake would do it implicitly - similar to what it does for .cpp references to .h files.
Many thanks in advance,
Tony Rietwyk
--
[ signature omitted ]
Message 2 in thread
Run qmake after you change the qrc file to point to a resource...
The issue is, the dependencies are done one time, when qmake is run. So
if you change the qrc afterwards, the dependencies are not updated.
Scott
-----Original Message-----
From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx]
Sent: Sunday, May 18, 2008 11:16 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: How to get qmake to include resource files?
Hi Everyone,
I have a resource file that refers to HTML and images. Currently, when I
change the .qrc file, rcc and link are correctly called. If I just
change any of the html or images files, then building the project does
not run the rcc utility automatically.
How can I tell qmake to include all of the resource files referenced in
the qrc file as dependents of the qrc file, so that rcc is called
whenever any of the resource files change.
I am happy to do this explicitly in the .pro, though it would be really
nice if qmake would do it implicitly - similar to what it does for .cpp
references to .h files.
Many thanks in advance,
Tony Rietwyk
--
[ signature omitted ]
Message 3 in thread
Scott wrote:
> Run qmake after you change the qrc file to point to a resource...
>
> The issue is, the dependencies are done one time, when qmake
> is run. So
> if you change the qrc afterwards, the dependencies are not updated.
>
> Scott
I don't understand. Currently, I don't seem to have any dependencies to the
source resource files (.htm, .png). The rcc utility is NOT called when these
resources are modified - only when the .qrc file itself is modified.
I am running on WinXP SP3 using VS2005 SP1 and VSIntegration 1.4.4.
To elaborate further, in the project pane in VS, the Resource Files branch
only shows the .qrc file. I would like it to show the .qrc AND all of the
resources referenced within the .qrc.
Regards,
Tony.
--
[ signature omitted ]
Message 4 in thread
I get different results... All the source files in my qrc file are
listed in the resources folder.
However, I run qmake after I modify the .qrc file
Scott
> -----Original Message-----
> From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx]
> Sent: Monday, May 19, 2008 12:24 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: RE: How to get qmake to include resource files?
>
> Scott wrote:
>
> > Run qmake after you change the qrc file to point to a resource...
> >
> > The issue is, the dependencies are done one time, when qmake
> > is run. So
> > if you change the qrc afterwards, the dependencies are not updated.
> >
> > Scott
>
> I don't understand. Currently, I don't seem to have any dependencies
to
> the
> source resource files (.htm, .png). The rcc utility is NOT called when
> these
> resources are modified - only when the .qrc file itself is modified.
>
> I am running on WinXP SP3 using VS2005 SP1 and VSIntegration 1.4.4.
>
> To elaborate further, in the project pane in VS, the Resource Files
> branch
> only shows the .qrc file. I would like it to show the .qrc AND all of
> the
> resources referenced within the .qrc.
>
> Regards,
>
> Tony.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 5 in thread
Scott, I think he is changing a file listed in the .qrc file, not the .qrc
file itself. This still should work, however just like changing a .h file
causes a .cpp file to recompile.
It works for me, BTW. The project I use generates a file that is included in
the .qrc file. Every time I generate the file, qmake automatically runs rcc
on the .qrc file. Make sure you run qmake, not just nmake. (I build on the
command line, VS has no easy way of running non-compilation parts of a
build.)
Keith
**Please do not reply to me, reply to the list.**
On 05-19-2008 9:14 AM, "Scott Aron Bloom" wrote:
> I get different results... All the source files in my qrc file are
> listed in the resources folder.
>
> However, I run qmake after I modify the .qrc file
>
> Scott
>> -----Original Message-----
>> From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx]
>> Sent: Monday, May 19, 2008 12:24 AM
>> To: qt-interest@xxxxxxxxxxxxx
>> Subject: RE: How to get qmake to include resource files?
>>
>> Scott wrote:
>>
>>> Run qmake after you change the qrc file to point to a resource...
>>>
>>> The issue is, the dependencies are done one time, when qmake
>>> is run. So
>>> if you change the qrc afterwards, the dependencies are not updated.
>>>
>>> Scott
>>
>> I don't understand. Currently, I don't seem to have any dependencies to the
>> source resource files (.htm, .png). The rcc utility is NOT called when these
>> resources are modified - only when the .qrc file itself is modified.
>>
>> I am running on WinXP SP3 using VS2005 SP1 and VSIntegration 1.4.4.
>>
>> To elaborate further, in the project pane in VS, the Resource Files branch
>> only shows the .qrc file. I would like it to show the .qrc AND all of the
>> resources referenced within the .qrc.
>>
>> Regards,
>>
>> Tony.
--
[ signature omitted ]
Message 6 in thread
The point of emphasis... YOU MUST RE-RUN QMAKE...
Qmake reads in the qrc file, and adds the resources as dependencies of
the output C++ file of the rcc.
Scott
> -----Original Message-----
> From: Keith Esau [mailto:keith.esau@xxxxxxx]
> Sent: Monday, May 19, 2008 7:33 AM
> To: Qt Interest
> Subject: Re: How to get qmake to include resource files?
>
> Scott, I think he is changing a file listed in the .qrc file, not the
> .qrc
> file itself. This still should work, however just like changing a .h
> file
> causes a .cpp file to recompile.
>
> It works for me, BTW. The project I use generates a file that is
> included in
> the .qrc file. Every time I generate the file, qmake automatically
runs
> rcc
> on the .qrc file. Make sure you run qmake, not just nmake. (I build on
> the
> command line, VS has no easy way of running non-compilation parts of a
> build.)
>
> Keith
> **Please do not reply to me, reply to the list.**
>
>
> On 05-19-2008 9:14 AM, "Scott Aron Bloom" wrote:
>
> > I get different results... All the source files in my qrc file are
> > listed in the resources folder.
> >
> > However, I run qmake after I modify the .qrc file
> >
> > Scott
> >> -----Original Message-----
> >> From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx]
> >> Sent: Monday, May 19, 2008 12:24 AM
> >> To: qt-interest@xxxxxxxxxxxxx
> >> Subject: RE: How to get qmake to include resource files?
> >>
> >> Scott wrote:
> >>
> >>> Run qmake after you change the qrc file to point to a resource...
> >>>
> >>> The issue is, the dependencies are done one time, when qmake
> >>> is run. So
> >>> if you change the qrc afterwards, the dependencies are not
updated.
> >>>
> >>> Scott
> >>
> >> I don't understand. Currently, I don't seem to have any
dependencies
> to the
> >> source resource files (.htm, .png). The rcc utility is NOT called
> when these
> >> resources are modified - only when the .qrc file itself is
modified.
> >>
> >> I am running on WinXP SP3 using VS2005 SP1 and VSIntegration 1.4.4.
> >>
> >> To elaborate further, in the project pane in VS, the Resource Files
> branch
> >> only shows the .qrc file. I would like it to show the .qrc AND all
> of the
> >> resources referenced within the .qrc.
> >>
> >> Regards,
> >>
> >> Tony.
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 7 in thread
When _DOES_ the VS2005 integration run qmake? Does it run it every time you
do a build? (It should.) I suspect it only runs it when you "Open Solution
from .pro File."
Keith
**Please do not reply to me, reply to the list.**
On 05-19-2008 9:40 AM, "Scott Aron Bloom" wrote:
> The point of emphasis... YOU MUST RE-RUN QMAKE...
>
> Qmake reads in the qrc file, and adds the resources as dependencies of
> the output C++ file of the rcc.
>
> Scott
>> -----Original Message-----
>> From: Keith Esau [mailto:keith.esau@xxxxxxx]
>> Sent: Monday, May 19, 2008 7:33 AM
>> To: Qt Interest
>> Subject: Re: How to get qmake to include resource files?
>>
>> Scott, I think he is changing a file listed in the .qrc file, not the
>> .qrc
>> file itself. This still should work, however just like changing a .h
>> file
>> causes a .cpp file to recompile.
>>
>> It works for me, BTW. The project I use generates a file that is
>> included in
>> the .qrc file. Every time I generate the file, qmake automatically
> runs
>> rcc
>> on the .qrc file. Make sure you run qmake, not just nmake. (I build on
>> the
>> command line, VS has no easy way of running non-compilation parts of a
>> build.)
>>
>> Keith
>> **Please do not reply to me, reply to the list.**
>>
>>
>> On 05-19-2008 9:14 AM, "Scott Aron Bloom" wrote:
>>
>>> I get different results... All the source files in my qrc file are
>>> listed in the resources folder.
>>>
>>> However, I run qmake after I modify the .qrc file
>>>
>>> Scott
>>>> -----Original Message-----
>>>> From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx]
>>>> Sent: Monday, May 19, 2008 12:24 AM
>>>> To: qt-interest@xxxxxxxxxxxxx
>>>> Subject: RE: How to get qmake to include resource files?
>>>>
>>>> Scott wrote:
>>>>
>>>>> Run qmake after you change the qrc file to point to a resource...
>>>>>
>>>>> The issue is, the dependencies are done one time, when qmake
>>>>> is run. So
>>>>> if you change the qrc afterwards, the dependencies are not
> updated.
>>>>>
>>>>> Scott
>>>>
>>>> I don't understand. Currently, I don't seem to have any
> dependencies
>> to the
>>>> source resource files (.htm, .png). The rcc utility is NOT called
>> when these
>>>> resources are modified - only when the .qrc file itself is
> modified.
>>>>
>>>> I am running on WinXP SP3 using VS2005 SP1 and VSIntegration 1.4.4.
>>>>
>>>> To elaborate further, in the project pane in VS, the Resource Files
>> branch
>>>> only shows the .qrc file. I would like it to show the .qrc AND all
>> of the
>>>> resources referenced within the .qrc.
>>>>
>>>> Regards,
>>>>
>>>> Tony.
--
[ signature omitted ]
Message 8 in thread
I have had problems with the integrations "auto update project"
functionality.. and usually turn it off (its an option)
So I would manually run qmake
Scot
> -----Original Message-----
> From: Keith Esau [mailto:keith.esau@xxxxxxx]
> Sent: Monday, May 19, 2008 8:09 AM
> To: Qt Interest
> Subject: Re: How to get qmake to include resource files?
>
> When _DOES_ the VS2005 integration run qmake? Does it run it every
time
> you
> do a build? (It should.) I suspect it only runs it when you "Open
> Solution
> from .pro File."
>
> Keith
> **Please do not reply to me, reply to the list.**
>
>
> On 05-19-2008 9:40 AM, "Scott Aron Bloom" wrote:
>
> > The point of emphasis... YOU MUST RE-RUN QMAKE...
> >
> > Qmake reads in the qrc file, and adds the resources as dependencies
> of
> > the output C++ file of the rcc.
> >
> > Scott
> >> -----Original Message-----
> >> From: Keith Esau [mailto:keith.esau@xxxxxxx]
> >> Sent: Monday, May 19, 2008 7:33 AM
> >> To: Qt Interest
> >> Subject: Re: How to get qmake to include resource files?
> >>
> >> Scott, I think he is changing a file listed in the .qrc file, not
> the
> >> .qrc
> >> file itself. This still should work, however just like changing a
.h
> >> file
> >> causes a .cpp file to recompile.
> >>
> >> It works for me, BTW. The project I use generates a file that is
> >> included in
> >> the .qrc file. Every time I generate the file, qmake automatically
> > runs
> >> rcc
> >> on the .qrc file. Make sure you run qmake, not just nmake. (I build
> on
> >> the
> >> command line, VS has no easy way of running non-compilation parts
of
> a
> >> build.)
> >>
> >> Keith
> >> **Please do not reply to me, reply to the list.**
> >>
> >>
> >> On 05-19-2008 9:14 AM, "Scott Aron Bloom" wrote:
> >>
> >>> I get different results... All the source files in my qrc file are
> >>> listed in the resources folder.
> >>>
> >>> However, I run qmake after I modify the .qrc file
> >>>
> >>> Scott
> >>>> -----Original Message-----
> >>>> From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx]
> >>>> Sent: Monday, May 19, 2008 12:24 AM
> >>>> To: qt-interest@xxxxxxxxxxxxx
> >>>> Subject: RE: How to get qmake to include resource files?
> >>>>
> >>>> Scott wrote:
> >>>>
> >>>>> Run qmake after you change the qrc file to point to a
resource...
> >>>>>
> >>>>> The issue is, the dependencies are done one time, when qmake
> >>>>> is run. So
> >>>>> if you change the qrc afterwards, the dependencies are not
> > updated.
> >>>>>
> >>>>> Scott
> >>>>
> >>>> I don't understand. Currently, I don't seem to have any
> > dependencies
> >> to the
> >>>> source resource files (.htm, .png). The rcc utility is NOT called
> >> when these
> >>>> resources are modified - only when the .qrc file itself is
> > modified.
> >>>>
> >>>> I am running on WinXP SP3 using VS2005 SP1 and VSIntegration
> 1.4.4.
> >>>>
> >>>> To elaborate further, in the project pane in VS, the Resource
> Files
> >> branch
> >>>> only shows the .qrc file. I would like it to show the .qrc AND
all
> >> of the
> >>>> resources referenced within the .qrc.
> >>>>
> >>>> Regards,
> >>>>
> >>>> Tony.
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 9 in thread
Scott wrote:
> The point of emphasis... YOU MUST RE-RUN QMAKE...
>
> Qmake reads in the qrc file, and adds the resources as dependencies of
> the output C++ file of the rcc.
Thanks very much for your assistance.
Running QMake has worked as expected and added the source resource files, as
well as the qrc.
I've been doing so many qmakes lately to get around a vs integration bug, I
must have somehow overlooked this project.
Regards,
Tony Rietwyk.
--
[ signature omitted ]