CommandLineOptions.wiki
author sheepyluva@gmail.com
Sat, 10 Dec 2011 08:56:39 +0000
changeset 181 714a208397bd
parent 6 1744484ba5c0
child 273 e165ada6aae2
permissions -rw-r--r--
version number fixes removing pre-0.9.16 version numbers since nobody should write scripts for that old versions anyway... and carrying ancient version numbers just clutters the page (at least as long as they are listed in the headlines)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     1
#labels Documentation,Engine,Frontend
6
1744484ba5c0 Edited wiki page through web user interface.
kyberneticist
parents: 5
diff changeset
     2
The basic parameters to pass to the Hedgewars frontend and engine control the location of the game data, configuration files and saves.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     4
= Frontend =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     5
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     6
There are two options that enable to load the data directory and the configuration directory in non standard locations.
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     7
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     8
  * {{{--data-dir=[path containing 'hedgewars/Data']}}}
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     9
  * {{{--config-dir=[path containing 'Demos' 'Saves' etc.]}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    10
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    11
You can set up both on the command line. The program exits if either of the folders is not correct; quotes are optional, but needed if your path contains spaces
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    12
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    13
_Example_ 
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    14
{{{
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    15
$ /usr/bin/hedgewars --data-dir="/opt/local/share/" --config-dir=".hedgewars/tesing config/"
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    16
}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    17
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    18
= Engine =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    19
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    20
It is possible to start a replay or save file directly from the terminal issuing the standalone {{{hwengine}}} utility with very simple syntax. The replay files are usually contained in the configuration directory:
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    21
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    22
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    23
  * _Linux_: {{{~/.hedgewars}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    24
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    25
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    26
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    27
== Standard Use ==
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    28
{{{$ hwengine [path to data folder] [path to replay file]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    29
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    30
the data folder is where you installed the game, or where you configured it when you compiled.
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    31
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    32
== Advanced Use ==
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    33
it is possible to specify additional settings by adding one third argument (and only one)
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    34
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    35
  * {{{--set-video [screen width] [screen height] [color dept]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    36
  * {{{--set-audio [volume] [enable music] [enable sounds]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    37
  * {{{--set-other [language file] [full screen] [show FPS]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    38
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    39
these options always require three additional configurations and are mutually exclusive (that is, you can only set one of them, if you need to configure more, you have to use the l33t arguments below).
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    40
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    41
== Very Advanced Use (l33t only) ==
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    42
(intentional non-explanation of the commands below, like any other l33t documentation; plus they're really self explanatory)
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    43
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    44
  * {{{--set-multimedia [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    45
  * {{{--set-everything [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    46
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    47
== Some examples ==
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    48
let's see some *GOOD* examples
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    49
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    50
{{{
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    51
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    52
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --set-video 1920 1080 32
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    53
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --set-everything 1280 1024 32 128 1 1 en.txt 0 0 0 8 0
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    54
}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    55
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    56
and some *BAD* examples
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    57
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    58
{{{
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    59
$ hwengine anywhere/replay.hwd
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    60
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --set-video 1024 768
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    61
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --set-video 800 600 32 --set-audio 128 1 1
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    62
}}}