PDA

View Full Version : Distribute App with 32 bit mode pre-selected




pauljwells
Nov 8, 2009, 06:03 AM
I'm writing an App using python with a GUI in wxpython (for cross-platform compatibility) and packaging using py2app. It has to have the 'Open in 32-bit mode' checkbox checked (in the 'get info' dialogue) in order to run.

Where is this flag actually stored? I can't find any preference file that registers it.

I want to be able to distribute the app with this option already checked instead of having to instruct the user to do it.

Anybody know? Many thanks in advance!



Eraserhead
Nov 8, 2009, 06:13 AM
I guess you just need to only compile against the 32-bit version of Python.

But to be honest at this point you should be coding 64-bit safe so it shouldn't matter.

robbieduncan
Nov 8, 2009, 06:25 AM
Have a look at the LSArchitecturePriority (http://developer.apple.com/Mac/library/releasenotes/Carbon/RN-LaunchServices/index.html) info.plist key.

pauljwells
Nov 8, 2009, 06:42 AM
I guess you just need to only compile against the 32-bit version of Python.

But to be honest at this point you should be coding 64-bit safe so it shouldn't matter.

Thanks! I just ran the setup.py in python2.5 and this makes the app 32-bit only, so it fixes the problem.

The program is a lot of number crunching in python (because of the availability of lots of libraries that already do most of what I need, and execution time isn't a problem) and the GUI is just a few buttons and text fields, nothing fancy. So using wx lets me distribute on mac, windows or linux. Wx is a carbon library so this is what forces the 32-bitness...

pauljwells
Nov 8, 2009, 06:43 AM
Have a look at the LSArchitecturePriority (http://developer.apple.com/Mac/library/releasenotes/Carbon/RN-LaunchServices/index.html) info.plist key.

Thanks! This is what I was actually looking for, even though the earlier poster's suggestion circumvented the issue more easily.

Thanks everyone!