在Linux上类似于:如何在Mac上从ant启动shell脚本?
<target name="runDo">
<exec executable="gnome-terminal" spawn="true">
<arg line="-t 'Title' --geometry=120x80 -e '/script/path/bin/do.sh'"/>
</exec>
</target>
工作正常。
我已经尝试通过macports安装xterm,gnome-terminal和rxvt并运行它们类似地没有结果以及/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -e,但似乎没有任何效果。我也尝试将脚本作为可执行文件的属性值运行,希望操作系统选择合适的应用程序来启动,但没有喜悦。
我可以在不产生新终端的情况下运行它,但是我正在从IDE运行ant任务,并希望能够保持活动状态,如果我退出IDE或关闭项目以打开另一个。帮帮我?
+1有趣的替代方案;更多在这里:http://developer.apple.com/opensource/tools/runningx11.html – trashgod 2010-05-18 20:13:41