Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, June 2007
qmake_image_collection.cpp issue (qt3)


Message 1 in thread


 	Hi guys,


 	I am having troubles when i use PNG files, and 
qmake_image_collection.cpp is generated by uic, when i am doing 
crosscompile. The UIC doesn't use the target endianess, and generates the
qmake_image_collection.cpp using the host endianess.
         This makes all the application icons, look weird ( a yellow 
efect ) when i run it.

   Does anyone knows for to fix that ?


Thanks,
Marian

--
 [ signature omitted ] 

Message 2 in thread

Marian Popeanga schrieb:
> 
> ...
>   Does anyone knows for to fix that ?

We have seen a similar behaviour (also with Qt 3). Embedded images 
(created by the uic) on one Unix platform worked on almost all other 
Unix platforms AIX, IRIX, Solaris (with the same endianess, off course) 
- but not on DEC (Tru64).

And the compressed data really looked different in that generated file 
so first I thought this is due to a different zlib version (?).

And with "work" I really mean "You can see something at all". Image 
collections created on DEC did not show at all on other platforms and 
vice versa. But maybe this is also due to the fact that those 
Alpha-processors maybe have something else than big/little endian (any 
hardware expert around :)? I've heard of something like "mixed 
endianess", which is completely weird and rare...

Anyway, the quick workaround was to make sure that these files are 
generated on each target platform separately. Since we compile on the 
target platforms directly this is no issue for us. And to really make 
sure that the proper generated file was used on the corresponding 
platform we had our build system append the target name into the file 
name, something like:

   image_collection_linux_debug.cpp

You can define the generated name in your *.pro file with

   QMAKE_IMAGE_COLLECTION = image_collection_$${SPEC}_$${BUILD}.cpp

where SPEC and BUILD are our variables (platform and debug|release).

Cheers, Oliver

--
 [ signature omitted ] 

Message 3 in thread


 	Hi,

         I'll need somehow, when i crosscompile, to tell the uic
to not generate the image_collection and use a predefined one
  if the endianes of the target is different than the one of the host.
I think if the file exists, the uic doesn't recreate it.
I am wonder if i add explicitly the image_collection file, to the list of 
source files in the project, will be posible? Based on that i can add
the correct generated image_collection files for each target platform.


Thanks,
Marian

On Wed, 27 Jun 2007, Till Oliver Knoll wrote:

> Marian Popeanga schrieb:
>> 
>> ...
>>   Does anyone knows for to fix that ?
>
> We have seen a similar behaviour (also with Qt 3). Embedded images (created 
> by the uic) on one Unix platform worked on almost all other Unix platforms 
> AIX, IRIX, Solaris (with the same endianess, off course) - but not on DEC 
> (Tru64).
>
> And the compressed data really looked different in that generated file so 
> first I thought this is due to a different zlib version (?).
>
> And with "work" I really mean "You can see something at all". Image 
> collections created on DEC did not show at all on other platforms and vice 
> versa. But maybe this is also due to the fact that those Alpha-processors 
> maybe have something else than big/little endian (any hardware expert around 
> :)? I've heard of something like "mixed endianess", which is completely weird 
> and rare...
>
> Anyway, the quick workaround was to make sure that these files are generated 
> on each target platform separately. Since we compile on the target platforms 
> directly this is no issue for us. And to really make sure that the proper 
> generated file was used on the corresponding platform we had our build system 
> append the target name into the file name, something like:
>
>  image_collection_linux_debug.cpp
>
> You can define the generated name in your *.pro file with
>
>  QMAKE_IMAGE_COLLECTION = image_collection_$${SPEC}_$${BUILD}.cpp
>
> where SPEC and BUILD are our variables (platform and debug|release).
>
> Cheers, Oliver
>
> --
> 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 4 in thread

Marian Popeanga wrote:
> ...
> I am wonder if i add explicitly the image_collection file, to the list 
> of source files in the project, will be posible? Based on that i can add
> the correct generated image_collection files for each target platform.

/Only/ if you remove the IMAGES += ... lines from your *.pro file - else 
you would end up with two image_collection.cpp files being added to your 
sources (and eventually duplicate symbols when linking).

So if you /really/ want to use "precompiled" image_collection.cpp files 
you could define an extra images.pro project file (with all your images 
in IMAGES += ...) and have qmake generate the appropriate 
image_collection.cpp.

Off course this step would /not/ be triggered by the normal build, you 
would explicitly call something like:

   %> qmake -f images.pro
   %> make

(maybe there's some other tweaking necessary to get the 
image_collection.cpp file produced, but you get the idea).

Then you can add this file to your SOURCES in the main *.pro project file.

Is this what you meant with "explicitly adding the image_collection file 
to the list of sources"?

Cheers, Oliver

p.s. I'm on the list, no need to write to me in private please.


--
 [ signature omitted ]