Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

silvercircle

macrumors member
Original poster
Nov 18, 2010
61
7
Is it possible to launch this this application by double clicking on it and not open the terminal?
By default if you launch a command line app, the terminal is also launched.
Is there a way to keep the terminal closed?
 

silvercircle

macrumors member
Original poster
Nov 18, 2010
61
7
You want to run Terminal commands without the application? I can't see how.

I compiled that application in Xcode, not via the terminal. I should have said that in my first post. Sorry.
So, I don't use any commands, just launch the application like any other.
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Oh, I gotcha. Did you remove the echo and the compiler stuff at the end when you pasted it into Xcode? Also, make sure you're using the right application template.
 

bumper314

macrumors member
Jun 23, 2009
39
0
In order to run like any other app, the executable must be inside a bundle with an Info.plist file like this:
http://d.pr/f/xtPF/2m408kHa

What exactly are you hoping to achieve with this example? I've done a LOT of research into minimizing application memory usage, and as you're likely to find with this Minimal example, you don't save much memory compared to the normal Cocoa Application template in Xcode. Most of the memory is used to buffer the window. Even a small window will use 5mb RAM and a full-screen window at 1920x1200 will use about 20mb.
 

silvercircle

macrumors member
Original poster
Nov 18, 2010
61
7
In order to run like any other app, the executable must be inside a bundle with an Info.plist file like this:
http://d.pr/f/xtPF/2m408kHa
Ok, so this is the only way? I don't want to use a bundle, just a stand alone command line tool.

What exactly are you hoping to achieve with this example? I've done a LOT of research into minimizing application memory usage, and as you're likely to find with this Minimal example, you don't save much memory compared to the normal Cocoa Application template in Xcode. Most of the memory is used to buffer the window. Even a small window will use 5mb RAM and a full-screen window at 1920x1200 will use about 20mb.
I took this as an example.
I'm writing a command line version of my application. There are a few people who need to run my application from within their application with a few options. I simply wanted to avoid in this case that the terminal shows up.
I don't need the terminal, I have my own windows for text and other output.
If I make a bundle, you have to cd deep to execute it on the terminal (for those who invoke it directly from the terminal).
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Ok, so this is the only way? I don't want to use a bundle, just a stand alone command line tool.


I took this as an example.
I'm writing a command line version of my application. There are a few people who need to run my application from within their application with a few options. I simply wanted to avoid in this case that the terminal shows up.
I don't need the terminal, I have my own windows for text and other output.
If I make a bundle, you have to cd deep to execute it on the terminal (for those who invoke it directly from the terminal).
No, you don't:
Code:
open -a AppName
OR
open /path/to/AppName.app
works just as well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.