Help:CommandLineArgs: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
page to document command-line args
 
Flozi (talk | contribs)
→Possible Arguments: 99.0- add --oldmenu command line parameter to always get to the old menu
Line 17: Line 17:


== Possible Arguments ==
== Possible Arguments ==
As of 98.0:
As of 99.0:


<code><pre>Usage: spring [options] [path_to_script.txt or demo.sdf]
<code><pre>Usage: spring.exe [options] [path_to_script.txt or demo.sdf]
Allowed options:
Allowed options:


   -h [ --help ]           This help message
   -h [ --help ]         This help message
   -V [ --version ]         Display program version
   -V [ --version ]       Display program version
   --sync-version           Display program sync version (for online gaming)
   --sync-version         Display program sync version (for online gaming)
   -f [ --fullscreen ]     Run in fullscreen mode
   -f [ --fullscreen ]   Run in fullscreen mode
   -w [ --window ]         Run in windowed mode
   -w [ --window ]       Run in windowed mode
  -x [ --xresolution ] arg Set X resolution
   -b [ --minimise ]     Start in background (minimised)
  -y [ --yresolution ] arg Set Y resolution
   --nocolor             Disables colorized stdout
   -b [ --minimise ]       Start in background (minimised)
   -q [ --quiet ]         Ignore unrecognized arguments
   --nocolor               Disables colorized stdout
   -s [ --server ] arg   Run as a server
   -q [ --quiet ]           Ignore unrecognized arguments
   -t [ --textureatlas ] Dump each finalized textureatlas in textureatlasN.tga
   -s [ --server ] arg     Run as a server
   --benchmark arg       Enable benchmark mode (writes a benchmark.data file).  
   -t [ --textureatlas ]   Dump each finalized textureatlas in  
                        The given number specifies the timespan to test.
                          textureatlasN.tga
   --benchmarkstart arg   Benchmark start time in minutes.
   --benchmark arg         Enable benchmark mode (writes a benchmark.data  
   --list-ai-interfaces   Dump a list of available AI Interfaces to stdout
                          file). The given number specifies the timespan to  
   --list-skirmish-ais   Dump a list of available Skirmish AIs to stdout
                          test.
   --list-config-vars     Dump a list of config vars and meta data to stdout
   --benchmarkstart arg     Benchmark start time in minutes.
   --list-def-tags       Dump a list of all unitdef-, weapondef-, ... tags and
   --list-ai-interfaces     Dump a list of available AI Interfaces to stdout
                        meta data to stdout
   --list-skirmish-ais     Dump a list of available Skirmish AIs to stdout
   --list-ceg-classes     Dump a list of available projectile classes to stdout
   --list-config-vars       Dump a list of config vars and meta data to stdout
   --test-creg           Test if all CREG classes are completed
   --list-def-tags         Dump a list of all unitdef-, weapondef-, ... tags  
   --safemode             Turns off many things that are known to cause problems
                          and meta data to stdout
                        (i.e. on PC/Mac's with lower-end graphic cards)
   --list-ceg-classes       Dump a list of available projectile classes to  
   -C [ --config ] arg   Exclusive configuration file
                          stdout
   -i [ --isolation ]     Limit the data-dir (games & maps) scanner to one  
   --test-creg             Test if all CREG classes are completed
                        directory
   --safemode               Turns off many things that are known to cause  
   --isolation-dir arg   Specify the isolation-mode data-dir (see --isolation)
                          problems (i.e. on PC/Mac's with lower-end graphic  
   -d [ --write-dir ] arg Specify where Spring writes to.
                          cards)
   -g [ --game ] arg     Specify the game that will be instantly loaded
   -C [ --config ] arg     Exclusive configuration file
   -m [ --map ] arg       Specify the map that will be instantly loaded
   -i [ --isolation ]       Limit the data-dir (games & maps) scanner to one  
   -n [ --name ] arg     Set your player name
                          directory
  --oldmenu              Start the old menu
   --isolation-dir arg     Specify the isolation-mode data-dir (see  
                          --isolation)
   -d [ --write-dir ] arg   Specify where Spring writes to.
   -g [ --game ] arg       Specify the game that will be instantly loaded
   -m [ --map ] arg         Specify the map that will be instantly loaded
   -n [ --name ] arg       Set your player name


Spring 98.0
Spring 99.0
This program is licensed under the GNU General Public License</pre></code>
This program is licensed under the GNU General Public License
</pre></code>


[[Category:Help]]
[[Category:Help]]

Revision as of 18:38, 18 July 2015

Spring Command-line Arguments

Spring has several command-line arguments which have various uses from setting window size, choosing the starting map & game (as of 98.0 these can be specified as a rapid tag) and various developer debugging tools.

spring://

In Spring 97.0 a new syntax was added which should in the long term replace Script.txt for clients, so that it is only needed for hosts, without the need to create a file to start Spring as a client. Spring links spring:// URL scheme in the OS, so you can start such URLs from browser (as UT99 did). E.g. you can place a spectator link on your website to join your autohosts and/or you can use it for weblobbies.

The syntax is as follows: spring spring://username:passwd@hostname:port

All except hostname are optional, i.e. spring://localhost will work fine.

How to display possible arguments

Linux: ./spring --help

Windows: spring --help > out.txt

Possible Arguments

As of 99.0:

Usage: spring.exe [options] [path_to_script.txt or demo.sdf]
Allowed options:

  -h [ --help ]          This help message
  -V [ --version ]       Display program version
  --sync-version         Display program sync version (for online gaming)
  -f [ --fullscreen ]    Run in fullscreen mode
  -w [ --window ]        Run in windowed mode
  -b [ --minimise ]      Start in background (minimised)
  --nocolor              Disables colorized stdout
  -q [ --quiet ]         Ignore unrecognized arguments
  -s [ --server ] arg    Run as a server
  -t [ --textureatlas ]  Dump each finalized textureatlas in textureatlasN.tga
  --benchmark arg        Enable benchmark mode (writes a benchmark.data file). 
                         The given number specifies the timespan to test.
  --benchmarkstart arg   Benchmark start time in minutes.
  --list-ai-interfaces   Dump a list of available AI Interfaces to stdout
  --list-skirmish-ais    Dump a list of available Skirmish AIs to stdout
  --list-config-vars     Dump a list of config vars and meta data to stdout
  --list-def-tags        Dump a list of all unitdef-, weapondef-, ... tags and 
                         meta data to stdout
  --list-ceg-classes     Dump a list of available projectile classes to stdout
  --test-creg            Test if all CREG classes are completed
  --safemode             Turns off many things that are known to cause problems
                         (i.e. on PC/Mac's with lower-end graphic cards)
  -C [ --config ] arg    Exclusive configuration file
  -i [ --isolation ]     Limit the data-dir (games & maps) scanner to one 
                         directory
  --isolation-dir arg    Specify the isolation-mode data-dir (see --isolation)
  -d [ --write-dir ] arg Specify where Spring writes to.
  -g [ --game ] arg      Specify the game that will be instantly loaded
  -m [ --map ] arg       Specify the map that will be instantly loaded
  -n [ --name ] arg      Set your player name
  --oldmenu              Start the old menu

Spring 99.0
This program is licensed under the GNU General Public License