[PyQt] Porting PyQt GUI between platforms.

Algis Kabaila akabaila at pcug.org.au
Thu Aug 5 01:30:23 BST 2010


On Thursday 05 August 2010 03:19:09 Henning Schröder wrote:
> On Tue, Aug 3, 2010 at 12:39 PM, Algis Kabaila <akabaila at pcug.org.au> wrote:
> > On Tuesday 03 August 2010 17:53:29 Raoul Snyman wrote:
> >> On Tue, 3 Aug 2010 17:21:48 +1000, Algis Kabaila <akabaila at pcug.org.au>
> >> 
> >> wrote:
> >> > On Tuesday 03 August 2010 15:07:28 Raoul Snyman wrote:
> >> > Actually, I was asking if Pyinstaller should preferably be run whilst
> >> > on
> >> 
> >> a
> >> 
> >> > Linux Box or is it better on a Windows box?
> >> 
> >> PyInstaller cannot "cross-compile". If you want to build a Windows
> >> package, you have to do it on Windows.
> >> 
> >> I haven't used PyInstaller on Linux, so I cannot say.
> > 
> > Raoul,
> > 
> > Thank you for the answer. I only have a need to port open source software
> > from Linux to Windows, so your answer saves me from false starts.
> 
> I used PyInstaller to create Windows-EXE files under Linux without a
> real Windows.
> It can be done with Wine (http://www.winehq.org).
> First you have to download the Python for Windows installer (If you
> have downloaded the .MSI-file you can start the installer with
> msiexec). Then you install all the other stuff (PyQt for Windows,
> etc.). After that you can call Configure.py and Bulid.py with you
> Python for Windows under Linux, e.g.
> # ~/.wine/drive_c/Python26/python.exe ~/MyProject/PyInstaller/Configure.py
> 
> The only problem I had was related to some MSVCRT-DLLs. I can't
> remember the details right now but I think you have to install the
> native runtime or something like that.
> 
> Good luck!
> 
> Henning

Henning,

Haerzlichen Dank! Many thanks for writing!

I am somewhat confused and I think it is because of my poor communication 
skills (sad to admit, as my life had been dedicated to communicating...).  
Perhaps the problem of porting OSS Python program from Linux to windows 
platform should be re-stated in two parts:

1. [Prepare the program for win platform] Run the OSS Python program on MS 
Windows platform.

2. [Package the program]. Package the OSS Python program and its dependencies 
in a package that can easily be given to a windows user for installation in 
his/her computer.

As Juan Manuel Santos so rightly suggested, part (1) of the porting often 
means simply running the Python program on windows!  (Spectacular, when it 
works!). If modifications of the program are necessary (to enable the program 
to run under windows), that can be done by several methods: a) On a "box" with 
a windows Platform b) Virtual Machine with a windows platform installed 
c)Wine.  

For my current small script, (1) turns out to be very simple and easy.

Part 2 is not so obvious.  PyInstaller documentation suggests (to me, at 
least) that it is convenient to compile the PyInstaller under Linux. This 
further suggests that the packaging should probably be done whilst on a Linux 
platform. 

Am I sadly mistaken?  Should the packaging be done on the windows (viz Win XP) 
platform, and thus PyInstaller compiled whilst on a windows platform?

It probably is clear to all how one should go about this process and it may be 
better not to clutter this busy list any more, so off list email would be much 
appreciated.  OTH, I do not mind to publicly admit that I am confused, as long 
as it is not too boring to all and might be useful to some.

Thank you all for responding,
OldAl.


More information about the PyQt mailing list