allows also the GTK-based wxWidgets apps to be bundled (even though they still bounce off the Dock) http://trac.wxwidgets.org/changeset/74703 --- src/gtk/app.cpp.orig +++ src/gtk/app.cpp @@ -415,6 +415,21 @@ bool wxApp::Initialize(int& argc, wxChar **argv) { bool init_result; + // Mac OS X passes a process serial number command line argument when + // the application is launched from the Finder. This argument must be + // removed from the command line arguments before being handled by the + // application (otherwise applications would need to handle it) + if ( argc > 1 ) + { + static const wxChar *ARG_PSN = _T("-psn_"); + if ( wxStrncmp(argv[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 ) + { + // remove this argument + --argc; + memmove(argv + 1, argv + 2, argc * sizeof(char *)); + } + } + #if wxUSE_THREADS if (!g_thread_supported()) g_thread_init(NULL);