Alright, despite the fact that I was able to use terminal to compress basically every file for every ScummVM game I own, I am completely at a loss regarding opening a specific game via Terminal. I have read the Unix instructions, which Mac OS X basically is, and it states that
scummvm -f -p atlantis OR
/path/to/scummvm -f -p/path/to/atlantis/ atlantis
should basically work every time. Yet every time, I get an error that states scummvm doesn't exist. When I type it as scummvm.app, it states it is a directory. How do I freaking get a command line code to open Fate of Atlantis without making me actually open ScummVM and select it on the console screen? I am trying to make some nice little mini-application files so I don't have to go through the console every time, but I need to figure this part out first before I can get into the easier Automator stuff.
Help me forum, you're my only hope! (I know, cheesy but I am kinda desperate)
Using Command Line codes with Terminal in Mac OS X
Moderator: ScummVM Team
-
- Posts: 6
- Joined: Sat Jun 07, 2008 1:50 am
- Location: San Diego, CA
- Contact:
-
- Posts: 129
- Joined: Mon May 05, 2008 3:37 pm
the program file you need to run is actually hidden away inside the .app, so you have to do (depending on where your app is):
or similar.
Code: Select all
/Applications/ScummVM.app/Contents/MacOS/scummvm -f -p/path/to/atlantis/ atlantis
-
- Posts: 6
- Joined: Sat Jun 07, 2008 1:50 am
- Location: San Diego, CA
- Contact:
-
- Posts: 6
- Joined: Sat Jun 07, 2008 1:50 am
- Location: San Diego, CA
- Contact:
How Do I Set a Variable/Updateable File Paths?
Alright, the next question I have is similar to the first. Using
/Applications/ScummVM/ScummVM.app/Contents/MacOS/scummvm -f -p/Applications/ScummVM/atlantis/ atlantis
Worked beautifully, however is there any way to make it so the file paths will find their items without the /Applications/ScummVM/etc. path listed? I have tested numerous methods and they all give positive results, but the problem is when I try to move the ScummVM.app or the program folder, it won't update so the command line code stops working properly. Is there any way to make it so the command line code will work no matter where the app/program file is located? Thank.
/Applications/ScummVM/ScummVM.app/Contents/MacOS/scummvm -f -p/Applications/ScummVM/atlantis/ atlantis
Worked beautifully, however is there any way to make it so the file paths will find their items without the /Applications/ScummVM/etc. path listed? I have tested numerous methods and they all give positive results, but the problem is when I try to move the ScummVM.app or the program folder, it won't update so the command line code stops working properly. Is there any way to make it so the command line code will work no matter where the app/program file is located? Thank.
Yes and no. IF you want to launch the scummvm binary directly from the ScummVM.app bundle wrapper, you will always have to specify the full path!
However, it would of course be possible to first search for ScummVM.app, then take that path to construct the shell command from it, by concatenating the path you found via searching, and the rest.
Not very elegant, but then you are abusing the system... . If I was you, I'd just install ScummVM.app in a fixed location to avoid that hazzle (but actually I'd just use the launcher .
However, it would of course be possible to first search for ScummVM.app, then take that path to construct the shell command from it, by concatenating the path you found via searching, and the rest.
Not very elegant, but then you are abusing the system... . If I was you, I'd just install ScummVM.app in a fixed location to avoid that hazzle (but actually I'd just use the launcher .
-
- Posts: 129
- Joined: Mon May 05, 2008 3:37 pm
right, i've just been experimenting in the terminal, and found that making a "hard link" (this is a funky unix feature) can help you with this.
basically you will make a pretend file, in a specific location (for example, your home directory), and all this pretend file does is point to the real file that you specify. so telling the command line to run the pretend file, will make the real file run.
i've just checked, and with a hard link (as opposed to a symbolic link, which is a similar alternative), when you move the original (real) file to a new location, the pretend file will still point to it successfully. (i think this will only work if you move it around on the same volume - and the link (pretend file) has to be on that volume too. if more than one disk is involved then this method will probably fail)
so, what you do is...
this will make the link (pretend file) in your home directory. so in future, running:
should continue to work even when you move ScummVM.app around (on the same disk).
edit: oh, i make no guarantees what will happen if & when you replace the ScummVM.app with a newer version etc. - but it's easy enough to delete the link (rm ~/scummvm) and make a fresh one with the above command.
...the easier option would be to keep ScummVM.app in one place
basically you will make a pretend file, in a specific location (for example, your home directory), and all this pretend file does is point to the real file that you specify. so telling the command line to run the pretend file, will make the real file run.
i've just checked, and with a hard link (as opposed to a symbolic link, which is a similar alternative), when you move the original (real) file to a new location, the pretend file will still point to it successfully. (i think this will only work if you move it around on the same volume - and the link (pretend file) has to be on that volume too. if more than one disk is involved then this method will probably fail)
so, what you do is...
Code: Select all
ln /Applications/ScummVM.app/Contents/MacOS/scummvm ~/scummvm
Code: Select all
~/scummvm -f blahblahblah
edit: oh, i make no guarantees what will happen if & when you replace the ScummVM.app with a newer version etc. - but it's easy enough to delete the link (rm ~/scummvm) and make a fresh one with the above command.
...the easier option would be to keep ScummVM.app in one place
-
- Posts: 6
- Joined: Sat Jun 07, 2008 1:50 am
- Location: San Diego, CA
- Contact:
That seemed to work well enough. How about moving the game files around? I tried the same technique as the .app, but it seems that since the files have no specific item to run, it doesn't work the same way. How can I assign a "soft link (?)" for the game files folder? I've been trying with Flight of the Amazon Queen but haven't had any luck. It only works if I document the full link in the command line code. Thanks again, by the way!
One other thing. Strangely, that technique seems to revert the ScummVM console to the older black and green version. Not quite sure why.
One other thing. Strangely, that technique seems to revert the ScummVM console to the older black and green version. Not quite sure why.
-
- Posts: 129
- Joined: Mon May 05, 2008 3:37 pm
yeah it goes green and black because it doesn't find the theme file. you might be able to work around this by putting the right file(s) in the right place relative to the scummvm link, but i expect it's not a very high priority.
and yes the game folder is more of a problem, because you can't use hard links for directories, and symbolic links don't follow to the new location when you move the target. i can't think of a solution for this i'm afraid.
is there a particular reason why you can't keep things in the same place tho?
and yes the game folder is more of a problem, because you can't use hard links for directories, and symbolic links don't follow to the new location when you move the target. i can't think of a solution for this i'm afraid.
is there a particular reason why you can't keep things in the same place tho?
- eriktorbjorn
- ScummVM Developer
- Posts: 3560
- Joined: Mon Oct 31, 2005 7:39 am
-
- Posts: 129
- Joined: Mon May 05, 2008 3:37 pm