Pass an argument to a bundle application under MacOSX
Matt Connolly
matt at soundevolution.com.au
Mon Jun 25 05:55:00 PDT 2007
Don,
If you needed to run it as a script, you could create a script
command to launch the application. Save a text file as
"launch.command", with something like this:
---
#!/bin/sh
/path/to/MyApplication.app/Contents/MacOS/MyApplication --command-
line-argument
---
The "launch.command" file needs to executable (as in linux). The draw
back is that it launches the Terminal application and runs from a
window there. Even if you append a "&" at the end of the command
line, closing the Terminal window will terminate the application. Of
course, if it's a console application, this isn't a problem. :)
Otherwise, my best "mac friendly" solution would be to create a
document type in the application's launch bundle, and have the user
launch the application via a "document" for an alternate running mode.
Best,
Matt
On 25/06/2007, at 10:41 PM, Don wrote:
>
> Hi,
>
> I did a wx program which takes 1 argument in order to be launched
> in 2 mode.
> This mechanism works well under MS Windows (by shortcuts) and Linux
> (by
> script)
>
> A problem is encountered under MacosX, due to its bundle system.
> Is there a way to bundle my wx program by passing 1 argument in
> order that
> user can launch it via Finder?
>
> Thank you in advance.
>
> Don
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
More information about the wx-users
mailing list