pyinstall + pyqt + svg icons

386 views
Skip to first unread message

Nitish Jha

unread,
Oct 7, 2009, 12:13:11 PM10/7/09
to PyInstaller
hello i m using pyqt 4.4 and the pyinstaller from the svn trunk. I
have encountered a problem when i try to use svg images as icons for
buttons. they are displayed when launched on the development system
but when the program/executable is transferred to the test system the
images are not shown. I have tried both --onedir and --onefile option
and the same result. I have used the archiveviewer.py over my onefile
executable and in there i can see the both qtsvg.dll and qticonsvg.dll
are listed.

(12172503, 14688, 32768, 1, 'x', 'qt4_plugins/imageformats/
qsvg4.dll'),
(12187191, 153748, 735611, 1, 'x', 'qt4_plugins/imageformats/
qsvgd4.dll'),
(12340939, 108309, 326656, 1, 'x', 'qt4_plugins/imageformats/
qtiff4.dll'),
(12449248, 404753, 1628383, 1, 'x', 'qt4_plugins/imageformats/
qtiffd4.dll'),
(12854001, 25256, 61440, 1, 'x', 'qt4_plugins/iconengines/
qsvgicon4.dll'),
(12879257, 234886, 1135741, 1, 'x', 'qt4_plugins/iconengines/
qsvgicond4.dll')

I have also tried manually putting the plugins in qt4_plugins
directory in same dir as the exe but that does not seem to do
anything.
is there anyway to fix this issue ? anyhelp in solving this problem is
grealty appreciated.

Giovanni Bajo

unread,
Oct 8, 2009, 8:10:27 AM10/8/09
to pyins...@googlegroups.com

Use onedir to debug this issue.

Can you please confirm that the script called pyi_rth_qt4plugins is
included in the executable through ArchiveViewer? The script source code
is within PyInstaller itself (directory support\rthooks); it should be
executed before your own application starts.

Can you please put some debug prints in there and verify that it is
executed correctly? Does it add the correct directory to Qt's library path?

Are you using Riverbank's GPL installer?

Can you confirm that the DLL that PyInstaller ships are the one that you
are using in your development environement, and not DLLs from a
different version of Qt/PyQt that you might happen to have installed in
your system? A typical problem is that you have a Qt in your PATH that
overrides the Qt DLLS shipped together with PyQt.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com

Nitish Jha

unread,
Oct 8, 2009, 1:18:59 PM10/8/09
to pyins...@googlegroups.com
Hi
as suggested i tried the --onedir option
1] I used archiveviewer.py and the script is included.
2] i modified the script to print the path of the plugins and it correctly points to the plugin folder located in the executable directory (in --onedir mode)
3]  the dll being shipped with pyinstaller is the same one used by development environment.
4] i m using the pyqt shipped with python(x,y)
5] i did a search on my development computer for qtsvg4.dll and the only one present is being copied over to the test system.
6] i also looked at the PATH to see and i only have the path to python in it.

the svg images still don;t seem to load. you have any more suggestions to test.

thanks,
nitish
Reply all
Reply to author
Forward
0 new messages