Author Topic: Running console apps on Mac  (Read 3386 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Running console apps on Mac
« on: November 28, 2006, 01:52:41 pm »
I've done a fix for running console apps on Mac OS X (both for wxMac and for wxGTK)
http://developer.berlios.de/patch/?func=detailpatch&patch_id=1667&group_id=5358

This runs the program with Terminal.app in Mac OS X, and it uses DYLD_LIBRARY_PATH.
(closes http://developer.berlios.de/bugs/?func=detailbug&bug_id=8987&group_id=5358)

The quoting needed for the AppleScript required a new $SCRIPT parameter to be added,
but hopefully this shouldn't break anything for other OS ? (tested OK on Linux, anyway)

Code
osascript -e 'tell app "Terminal" to do script "$SCRIPT"'

If you don't use the $SCRIPT variable, it'll append the quote-escaped command like before:

Code
xterm -T $TITLE -e

Terminal.app will ask if you want to close, so we don't need cb_console_runner on wxMac.
(it *can* be used on Mac OS X though, if you are running wxGTK or just tweak the settings)

If there are no objections, I'll commit this patch later.

takeshimiya

  • Guest
Re: Running console apps on Mac
« Reply #1 on: November 28, 2006, 07:46:52 pm »
Great :)