Am Donnerstag, 2. Juli 2009 schrieb Giovanni Bajo:
> On 7/2/2009 11:23 AM, Hans-Peter Jansen wrote:
> > Shouldn't this work out of the box? I would very much like to keep the
> > original Qt build, I'm using here. Needless to say, running it with
> > Qt installed, works fine.
>
> Yes, it should work out of the box, and I have sucessfully managed to
> ship PyQt applications on Mac.
>
> It might be related to the fact that PyInstaller seems not to set
> DYLD_LIBRARY_PATH correctly in one-dir mode.

Hmm, given that the libs are missing, how could setting a environment 
variable fix that problem?

> Does it work in one-file mode? If so, it's should be easy to fix.

No, it doesn't, but since the analyse part is the same, it cannot.

Did you really shipped apps, based on a current Qt framework build, and it 
worked out of the box (without Qt installed on the target systems)?!? 

Here's what I did (hopefully complete):

cd .app/Contents
md Framework
cp -R /Library/Frameworks/Qt{Core,Gui}.framework Framework
find Framework -depth -name Headers -exec rm -r {} \;
find Framework -depth -name \*_debug\* -exec rm -r {} \;

# treat QtCore
install_name_tool -id \ 
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore \ 
QtCore.framework/Versions/4.0/QtCore

install_name_tool -change QtCore.framework/Versions/4/QtCore \ 
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore \ 
QtCore.framework/Versions/4.0/QtCore

# treat QtGui
install_name_tool -id \ 
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui \ 
QtGui.framework/Versions/4.0/QtGui

install_name_tool -change QtCore.framework/Versions/4/QtCore \ 
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore \ 
QtGui.framework/Versions/4.0/QtGui

# treat PyQt4.QtCore
install_name_tool -change QtCore.framework/Versions/4/QtCore \ 
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore 
../MacOS/PyQt4.QtCore.so

# treat PyQt4.QtGui
install_name_tool -change QtCore.framework/Versions/4/QtCore \ 
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore 
../MacOS/PyQt4.QtGui.so

install_name_tool -change QtGui.framework/Versions/4/QtGui \ 
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui 
../MacOS/PyQt4.QtGui.so

# check, if something is still missing
otool -L ../MacOS/PyQt4.Qt*.so QtCore.framework/QtCore QtGui.framework/QtGui


You see, the whole mess is asking for automatic treatment. What I'm thinking 
about, is getting rid of the Framework junk, and simply throw the lib files 
QtCore, QtGui, etc into "the" dir (renaming them to Qt*.so), and do the 
adjustments as outlined above, but I haven't tried this yet.

I think, this deserves a mac related option (one may don't want to ship
Qt), but by default the libs should be included. Using qt4_plugins may 
deserve another option, since they need the same treatment as above, and
on that way pull nearly the full distribution into the bundle. Thus I may
decide to do without them, and spare a lot of space. BTW, do you know, 
what codecs are shipped in libqtwcodecs.dylib? They can't be essential,
since my simple app works without them at least (due to missing "the"
treatment ATM).

Pete

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to