How to go about making a stand alone app on the dock to open a game using a terminal command

applescriptgamesterminalwine

I have a game that they never released for mac, and I installed the game using WINE, the install itself was flawless, but every time I want to play it, I'm forced to open Terminal and run

cd /Users/Max/.wine/drive_c/Program\ Files/Electronic\ Arts/Dead\ Space/
wine Dead\ Space.exe

I saw a question that I thought would answer this using applescript, but when i tried to duplicate the example, it didn't work. I'm sure the information I've given is enough to start the answer to my problem, if not, just let me know. Thanks

Best Answer

create the following plain text file:

#!/bin/bash
cd /Users/Max/.wine/drive_c/Program\ Files/Electronic\ Arts/Dead\ Space/
exec wine Dead\ Space.exe

save it as dead_space.command

in Terminal, change it to an executabe:

sudo chmod +rx dead_space.command

Now, the file dead_space.command should start your game when you double click on it.