[Pyobjc-dev] Unknown option: -p
Brought to you by:
ronaldoussoren
From: Luc H. <lu...@ho...> - 2010-03-31 16:41:42
|
Greetings, I'm trying to fix a *very* weird bug in the latest version of Miro 3.0 which in certain circumstances prevents it to be launched more than once. So far the problem only seems to occur on Intel machines running OS X 10.5.8, and is the following one: the user can launch the application exactly once and then any attempt to launch the application after this first time fails, with this message being logged to the console: Unknown option: -p usage: /Applications/Miro.app/Contents/MacOS/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try 'python -h' for more information. The unknown -p option is most likely the infamous -psn_X_Y parameter passed by LaunchServices to applications double clicked from the Finder. What doesn't make sense *at all* is that the bundle executable is *not* the python executable which, while being present in the application bundle, is *not* what should be run (and is not what is run at least the first time). The Info.plist explictely specifies Miro to be the CFBundleExecutable. The application bundle looks like this (irrelevant parts omitted): Miro.app Miro.app/Contents Miro.app/Contents/Components Miro.app/Contents/Frameworks Miro.app/Contents/Frameworks/Python.framework (python 2.4) Miro.app/Contents/Info.plist Miro.app/Contents/MacOS/Miro Miro.app/Contents/MacOS/python Miro.app/Contents/Resources As you can see, there are two executable binaries, the correct one (Miro) is launched the first time and the wrong one (python, which is used internally by the app to run other scripts) is launched the next times, for some very weird and unknown reasons. FWIW, architecture infos: % lipo -info Miro.app/Contents/MacOS/Miro Architectures in the fat file: Miro are: i386 ppc % lipo -info Miro.app/Contents/MacOS/python Architectures in the fat file: python are: ppc i386 Architectures aren't in the same order, I have no idea why this would matter but I'm open to any suggestion a this point. Miro is based on PyObjC 1.4 and built on a 10.4.10 machine so it can run on 10.4, 10.5 and 10.6. This latest version of Miro is available here: http://getmiro.com Sources are visible and available for anyone here: https://git.participatoryculture.org/miro/ If anyone has *any* idea or already had this problem, I'd love to hear from you :) Thanks. -- Luc Heinrich - lu...@ho... |