![]() |
Command Line Switches - revisited
It's been posted that to get a list of command line switches, one needs only to run (from the command line):
Quote:
To run an application from the command line in OSX (Terminal), one types (for example): Quote:
Quote:
|
Re: Command Line Switches - revisited
Doesn't seem to work on windows too. http://forum.shrapnelgames.com/image...s/confused.gif
http://img233.imageshack.us/img233/2661/dom3helpcm3.jpg |
Re: Command Line Switches - revisited
Short answer: You should find a stdout.txt in your dominions3 directory that has the -h output
Long answer: It does work but windows doesnt handle putting it to the screen the same way Linux does. Or actually I should say that WinNT or WinXP dont (Im guessing thats what you have since nothing showed up). The networking aspect of those two versions of windows, and no dos beneath them, sends the results to stndout.txt and stnderr.txt |
Re: Command Line Switches - revisited
I understand that theory, but it doesn't appear to work. Here is the full contents of the Dominions3 directory, including hidden files:
Quote:
Quote:
Quote:
Quote:
|
Re: Command Line Switches - revisited
@Gandalf Parker : Thanks, it works. http://forum.shrapnelgames.com/images/smilies/happy.gif
|
Re: Command Line Switches - revisited
I can't say about Mac OSX, but on Windows standard descriptors work the same way as on Linux/UNIX if the application is built as "console" application. If application is built as "Windows" application, standard output isn't going anywhere. The programmer need to reopen descriptors into some file. That's what Dom3 must be doing.
|
Re: Command Line Switches - revisited
1 Attachment(s)
Windows
On my W2kSP4 box, running dom3.exe -h at the command prompt does provide me with a stdout.txt containing the info about the command line options ... : http://www.shrapnelcommunity.com/thr...70-cmdline.png |
Re: Command Line Switches - revisited
Psientist, you don't want to use the "open" command. Just type /Applications/Games/Dominions 3/Dominions3.app/Contents/MacOS/Dominions3 -h
and you'll get your list. Note that if you want to run the game this way, say if you like using a nonstandard resolution, you have to run it from a slightly different location (search the forum for other posts by me and others to see how) - but if you just want to run the command-line version (to get help, verify turns, host a turn, etc.) this works fine. I don't know if open has support for command-line switches to the program you're opening (open is really designed for opening files, not running applications) but even if it doesn you'd probably have to put it in quotes. Anyway, you don't want or need it in this case. Hope this gets you what you need. |
Re: Command Line Switches - revisited
Ygori:
Thanks for the assist. I figured it out, finally. Although I had tried a few times to run the Dominions3 app inside the bundle by *navigating* to that directory (e.g., "cd /Applications/Dominions 3/Dominions3.app/Contents/MacOS/") before running it, it never worked. But just establishing the current working directory outside of the application bundle, and then running the core app with the entire path specified, did the trick. So, to repeat for every OSX user's benefit: 1. open terminal. 2. run the following command, adjusting the path to specify the location of your Dominions 3 game folder: Quote:
|
Re: Command Line Switches - revisited
I was thinking that from what I read when I tried to google an answer, but I couldnt test it so I kept my mouth shut (for once). The "open" said it opened a gui console. That would seem to be oppossing the result desired for -h and -T. I found examples using open and some that didnt use open but nothing clearly saying why use one and not the other.
Does using the "open" make ALL switches ignored? Do switches such as nofade or nomusic work? |
Re: Command Line Switches - revisited
all switches seem to be treated as another filename argument, perhaps to the "open" command.
|
Re: Command Line Switches - revisited
I saw an example online of using the open and then putting the filename in single quotes so that
open Dominions3.app -h would have been open 'Dominions3.app -h ' or something like that. I couldnt tell what quotes were used whether it as " ' ` or whatever. Im just curious because this is one of the subjects Im debating wiki/blog/faq or something on Dom3Minions. Some how-to on screenshots, sprites, command switches, backups, saves, restores, alarms, hosting, map making, etc etc |
Re: Command Line Switches - revisited
Gandalf - good idea! But unfortunately, it doesn't seem to work. encapsulating the "Dominions3.app -h' (application plus switches within the quotes) doesn't make any difference, which sort of runs counter to *nix standard behavior I guess.
Quote:
|
Re: Command Line Switches - revisited
Remember, open expects its argument to be a file. If it's an executable file, I guess that's okay, but files don't usually take command-line arguments -- programs do.
You don't need open to run a program; you don't even want it to run a program, unless I'm missing something. |
Re: Command Line Switches - revisited
Yesterdays progress file item should be of interest.
17th january * Version 3.05 16th january * Universal binary working. * New spell for Man. The "Universal Binary" Im guessing refers to this.. http://en.wikipedia.org/wiki/Universal_binary Be sure to let us know how the new patch works out for you guys. |
Re: Command Line Switches - revisited
Well, I'm still running a motorola PowerPC - based Mac. The universal binary won't affect me until I upgrade...but that's still good news!
|
All times are GMT -4. The time now is 06:06 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.