Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-17 Thread V. Armando Solé

 On 16/09/2010 15:57, Von wrote:

Hi,Armando thanks for your advice,it seems more complicated.
I wonder is there a simple way to resolve it?



The simple way is to do it as you did it previously and then manually 
adding the folder plugins/imageformats and the qtconffile to the root 
folder of the generated package but renamed as qt.conf


My setup deals with files and optional modules needed by my application 
and that make it more complex than strictly needed.


Best regards,

Armando
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Von
Hi,
Here is my command:
cxfreeze --target-dir=AutoOrder gui.py
--base-name=D:\Python31\Lib\site-packages\cx_Freeze\bases\Win32GUI.exe
--include-path=. -z icon.jpg

Both app icon and tray icon used icon.jpg

Regards,
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Hans-Peter Jansen
On Thursday 16 September 2010, 08:38:00 Von wrote:
 Hi,
 Here is my command:
 cxfreeze --target-dir=AutoOrder gui.py
 --base-name=D:\Python31\Lib\site-packages\cx_Freeze\bases\Win32GUI.exe
 --include-path=. -z icon.jpg

I haven't used cx_freeze, but why don't you wrap them into a python module 
with pyrcc4. The deleayedencoding example, I've send to the list lately, 
includes an Makefile for that task. BTW, pyrcc4 is able to wrap any data 
files, translation files, etc..

 Both app icon and tray icon used icon.jpg

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Von
Hi,Hans I join this group today,could you send your example mail to me?

On Thu, Sep 16, 2010 at 6:23 PM, Hans-Peter Jansen h...@urpla.net wrote:

 On Thursday 16 September 2010, 08:38:00 Von wrote:
  Hi,
  Here is my command:
  cxfreeze --target-dir=AutoOrder gui.py
  --base-name=D:\Python31\Lib\site-packages\cx_Freeze\bases\Win32GUI.exe
  --include-path=. -z icon.jpg

 I haven't used cx_freeze, but why don't you wrap them into a python module
 with pyrcc4. The deleayedencoding example, I've send to the list lately,
 includes an Makefile for that task. BTW, pyrcc4 is able to wrap any data
 files, translation files, etc..

  Both app icon and tray icon used icon.jpg

 Pete
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Hans-Peter Jansen
On Thursday 16 September 2010, 13:30:28 Von wrote:
 Hi Hans,strange thing happens
 I put my icon.jpg file into the qrc file and compile it to py file.when I
 run my Main.py directly I can see the icon show up correctly,but while I
 use cxfreeze to package it,then it can't find the resource at all.Here is
 my simple code:
 pixmap = QtGui.QPixmap(:/icon.jpg) #:/icon.jpg is my resource name.
 assert(pixmap.isNull() == False)  -- #this line raise AssertionError

You need to include the module, you created beforehand.

It might be, that cx_freeze misses other modules/libs as well. Did something 
appear on the DOS shell, if running from there?

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread V. Armando Solé

 Hi Von,

On 16/09/2010 08:38, Von wrote:

Hi,
Here is my command:
cxfreeze --target-dir=AutoOrder gui.py 
--base-name=D:\Python31\Lib\site-packages\cx_Freeze\bases\Win32GUI.exe 
--include-path=. -z icon.jpg


Both app icon and tray icon used icon.jpg

Regards,



I had similar problems in the past and they were due to the generated 
binary not finding the qt libraries. I do not know if those issues are 
automatically handled by cx_freeze now.


I solved them adding a qtconffile saying where to find them in the 
frozen binary.


You can take a look at the cx_setup.py and the qtconffile files found in 
the pymca svn repository (http://pymca.svn.sourceforge.net/viewvc/pymca/ )


Best regards,

Armando

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Von
Hi,Armando thanks for your advice,it seems more complicated.
I wonder is there a simple way to resolve it?

On Thu, Sep 16, 2010 at 9:16 PM, V. Armando Solé s...@esrf.fr wrote:

  Hi Von,


 On 16/09/2010 08:38, Von wrote:

 Hi,
 Here is my command:
 cxfreeze --target-dir=AutoOrder gui.py
 --base-name=D:\Python31\Lib\site-packages\cx_Freeze\bases\Win32GUI.exe
 --include-path=. -z icon.jpg

 Both app icon and tray icon used icon.jpg

 Regards,


 I had similar problems in the past and they were due to the generated
 binary not finding the qt libraries. I do not know if those issues are
 automatically handled by cx_freeze now.

 I solved them adding a qtconffile saying where to find them in the frozen
 binary.

 You can take a look at the cx_setup.py and the qtconffile files found in
 the pymca svn repository (http://pymca.svn.sourceforge.net/viewvc/pymca/ )

 Best regards,

 Armando


 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Hans-Peter Jansen
On Thursday 16 September 2010, 15:57:07 Von wrote:
 Hi,Armando thanks for your advice,it seems more complicated.
 I wonder is there a simple way to resolve it?

You might want to try PyInstaller, that has a better dependency resolution.

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] python cxfreeze package pyqt app lost icon and tray icon

2010-09-16 Thread Von
WOW,I resolved it finally.
I create a setup.py file scratch from cx_setup.py which from Armando.
The main purpose of the setup.py is to include plugins of PyQt4.Then build
with command:python setup.py build
That's all I have done,the icon shows.
Thank you Armando and Hans.

Bests,

On Thu, Sep 16, 2010 at 9:16 PM, V. Armando Solé s...@esrf.fr wrote:

  Hi Von,


 On 16/09/2010 08:38, Von wrote:

 Hi,
 Here is my command:
 cxfreeze --target-dir=AutoOrder gui.py
 --base-name=D:\Python31\Lib\site-packages\cx_Freeze\bases\Win32GUI.exe
 --include-path=. -z icon.jpg

 Both app icon and tray icon used icon.jpg

 Regards,


 I had similar problems in the past and they were due to the generated
 binary not finding the qt libraries. I do not know if those issues are
 automatically handled by cx_freeze now.

 I solved them adding a qtconffile saying where to find them in the frozen
 binary.

 You can take a look at the cx_setup.py and the qtconffile files found in
 the pymca svn repository (http://pymca.svn.sourceforge.net/viewvc/pymca/ )

 Best regards,

 Armando


 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt