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

NorthDakota91

macrumors member
Original poster
Sep 3, 2011
86
0
Italy
Hey guys, I've got a little question here: is there a way to wrap a shell script into a .app bundle (so the script behaves like a normal app)? I've found a tutorial on the web where I had to create a folder, name it "something.app" and then create a minimal app structure inside (Contents folder with inside MacOS and Resources folders) with inside a little C application that launches the script however this doesn't seem to work on Lion (it gives me an error about unsopported PowerPC apps).

Anyone has a clue on how can I do it? :)
 
Last edited:
Hey guys, I've got a little question here: is there a way to wrap a shell script into a .app bundle (so the script behaves like a normal app)?

One sort of sledgehammer approach to it would be to write a quick AppleScript that calls your shell script. Then when you "Save As", just save it as an application. The AS editor will create the .app directory structure for you, and you'll be all set.

Give that a shot?

jas
 
I now realize that I didn't explain my problem well (forgot to mention what kind of script I'd like to wrap).

So, I'd like to wrap the minecraft bukkit server. It is made of a bunch of files/folders (server info, the map, and so on, let's call it "data stuff") and the script ("startserver.command", btw what is the difference between a .command file and a .sh file? :confused:) which calls java and launches the server. What I'd like to achieve here is to actually put the command file and the data stuff inside the app wrapper.

One sort of sledgehammer approach to it would be to write a quick AppleScript that calls your shell script. Then when you "Save As", just save it as an application. The AS editor will create the .app directory structure for you, and you'll be all set.

Give that a shot?

jas

Yes, AppleScript was the first thing I thought of and it kinda worked but the problem with it is that the data stuff is not inside the app so the server is not really wrapped. Any idea how can I put all the stuff inside the .app folder?

And, btw, thank you for lightning fast answer :D
 
Hey guys, I've got a little question here: is there a way to wrap a shell script into a .app bundle (so the script behaves like a normal app)? ...
I seem to recall a utility that converts shell scripts to double-clickable applications. However, I will not do the Google search for you. If it is important to you, then you can do your own Google search.
 
I seem to recall a utility that converts shell scripts to double-clickable applications. However, I will not do the Google search for you. If it is important to you, then you can do your own Google search.

First of all, thank you for pointing out the utility (was it appify?). I didn't know it existed. However it does not work, e.g. it creates the wrapper but all it does is jumping on the Dock until I kill it. I think that this is not the right place to ask what's wrong with it so I think that I'll just give up on this
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.