Thiago Macieira wrote:

> For macOS, there may be something equivalent in the Info.plist file for your
> bundle. Please consult Apple documentation.

No, not that I know of.

The automatic way of launching a console application via Terminal is to build 
as a traditional (POSIX-style) executable: CONFIG-=app_bundle (if that's not 
done automatically by CONFIG+=console). Double-clicking one of those in the 
Finder will use Terminal to run the application.

It will be a bit tricky to put an icon on the executable that's visible in the 
Finder and shows up when the app is running (if you want that, of course).

Alternatively, you can set up an app bundle that does the hand-off for you. 
is done most easily on the finished app bundle: 

%> mv build/ build/
%> cp -p build/
%> chmod 755 build/ will contain something like

open -W -n -a foo.bin

you can also use or any other terminal emulator you prefer.

Note though that applications launched like this will most likely not be able 
receive any arguments, notably files to be opened. If you drop files on a 
app in MS Windows the filenames are (or used to be) passed as standard 
arguments. On OS X this is not the case. If you need that you'll need to 
investigate utilities like DropScript, use AppleScript, or write your own 

Here's a little script to execute any commandline in a window:



CleanUp() {
        rm -f "${SCRIPT}"

trap CleanUp 0
trap CleanUp 1
trap CleanUp 2
trap CleanUp 15

if [ $# != 0 ] ;then
        echo "$@" > "${SCRIPT}"
        cat - > "${SCRIPT}"
chmod 700 "${SCRIPT}"

echo "Running the requested command(s) in a new Terminal instance"
echo "Remember to quit the Terminal application!"

open -W -n -F -a "${SCRIPT}"

Interest mailing list

Reply via email to