tags:

views:

224

answers:

1

Hi,

I've been coding with Python and C++ and now need to work on building a gui for data visualization purposes. I work on Mac Snow Leopard (intel), python 3.1 using gcc 4.2.1 (from Xcode 3.1)

I wanted to first install Qt and then PyQt. And my goals are to be able to: - quickly prototype GUI and the accompanied logic that drives the GUI using PyQt and python - if I decided I need the speed, or if it's fairly easy to translate my GUI into C++ using the Qt tools, I have the options to translate my app into C++ - Be able to deploy my application onto Windows (both the python and c++ version of my app)

Give the goals above, what are the correct steps I should take and what issues i should be aware of when setting up Qt and PyQt. Which other deployment tools do I need?

From my readings so far, here's what I have:

  1. download the Qt source for mac and configure it with -platform macx-g++42 -arch x86_64 -no-framework

    (i've read somewhere that building as framework causes some trouble in deployment and/or debugging, can't find the article anymore)

  2. download latest SIP source and build
  3. download latest PyQt and build from source (any special options I should pay attention to?)

For deployment, I've read that I would need to use py2exe/cx_freeze for windows, p2app for mac: http://arstechnica.com/open-source/guides/2009/03/how-to-deploying-pyqt-applications-on-windows-and-mac-os-x.ars

but seems like what the article describe is deploying an app you build on windows on the windows platform and vice versa. How do you deploy to windows (is it even possible?) if you are writing your Qt app on a mac ?

Really appreciate the help

+1  A: 

I'm guessing by deploying, you mean a compiled version to users that have no Python or Qt or anything.

I'm been trying py2app for a while now and never really worked out for me. You can try PyInstaller. It worked out pretty well for me since it's made to work with plugins like PyQt and PIL etc. I put up some instructions here

http://tech.xster.net/tips/deploy-pyqt-applications-on-mac-os-x-with-pyinstaller/

They don't really support cross-compilation though. Just recently, they made cross-compilation for windows binaries on linux possible. If you want to spend some time hacking it, it's probably possible. But probably easier just to get a windows machine and building a binary with it.

Xster

related questions