mirror of
https://github.com/lutris/lutris
synced 2024-10-02 22:14:23 +00:00
Update installers.rst
Of course, don't hesitate to correct my changes. Regarding "execute", can the "file" parameter be a path ? I wasn't sure, I didn't say it.
This commit is contained in:
parent
3da3d1ac1f
commit
11c95cc289
|
@ -6,41 +6,58 @@ Fetching required files
|
|||
=======================
|
||||
|
||||
The ``files`` section of the installer references every file needed for
|
||||
installing the game. The section's keys are an unique identifier used later by
|
||||
the installer. The value can be either a string containing an URI pointing at
|
||||
the required file or a dictionnary containing the ``filename`` and ``uri`` keys.
|
||||
The ``uri`` key is equivalent to passing only a string to the installer and the
|
||||
``filename`` key will be used to give the local copy another name.
|
||||
installing the game. This section's keys are unique identifier used later in
|
||||
the ``installer`` section. The value can either be a string containing a URI
|
||||
pointing at the required file or a dictionary containing the ``filename`` and
|
||||
``uri`` keys. The ``uri`` key is equivalent to passing only a string to the
|
||||
installer and the ``filename`` key will be used to give the local copy another
|
||||
name.
|
||||
|
||||
If the game contains copyrighted files that cannot be redistributed, the value
|
||||
should begin with ``N/A``. When the installer encounter this value, it will
|
||||
prompt the user for the location of the file. To indicate to the user what file
|
||||
to select, append a message to ``N/A`` like this:
|
||||
``N/A:Please select the installer for this game``
|
||||
to select, append a message to ``N/A`` like this (quotes included):
|
||||
``"N/A:Please select the installer for this game"``
|
||||
|
||||
|
||||
If the game makes use of (Windows) Steam data, the value should be
|
||||
``$WINESTEAM:appid:path/to/data``. This will check that the data is available
|
||||
``"$WINESTEAM:appid:path/to/data"``. This will check that the data is available
|
||||
or install it otherwise.
|
||||
|
||||
|
||||
Installer meta data
|
||||
===================
|
||||
|
||||
Referencing the main file
|
||||
---------------------------
|
||||
|
||||
For Linux and Wine games, specify the executable file with the ``exe``
|
||||
directive. The given path is relative to the game dir.
|
||||
|
||||
Examples:
|
||||
``exe: game.sh``
|
||||
``exe: drive_c/Program Files/Game/game.exe``
|
||||
|
||||
For emulator games, in case you don't ask the user to select the rom
|
||||
directly but make the installer extract it from an archive or something, you
|
||||
can reference the rom like this: ``main_file: file.rom``.
|
||||
|
||||
Installing mods and add-ons
|
||||
---------------------------
|
||||
|
||||
Mods and add-ons require that a base game is already available on the system.
|
||||
You can let now the installer that you want to install an add-on by specifying
|
||||
You can let the installer know that you want to install an add-on by specifying
|
||||
the ``requires`` directive. The value of ``requires`` must be the canonical
|
||||
slug name of a game, not one of its aliases. For example, to install the add-on
|
||||
"The reckoning" for Quake 2, you should add:
|
||||
|
||||
``requires: quake-2``
|
||||
|
||||
|
||||
Writing the installation script
|
||||
===============================
|
||||
|
||||
After every file needed by the game have been aquired, the actual installation
|
||||
After every file needed by the game has been aquired, the actual installation
|
||||
can take place. A series of directives will tell the installer how to set up
|
||||
the game correctly.
|
||||
|
||||
|
@ -52,8 +69,7 @@ him to insert the game's disc into the optical drive. A link to CDEmu homepage's
|
|||
and PPA will also be displayed if the program isn't detected on the machine,
|
||||
otherwise it will be replaced with a button to open gCDEmu.
|
||||
|
||||
An optional parameter ``message`` will override the default text if given.
|
||||
|
||||
You can override this default text with the ``message`` parameter.
|
||||
|
||||
Moving files and directories
|
||||
----------------------------
|
||||
|
@ -61,10 +77,10 @@ Moving files and directories
|
|||
Move files by using the ``move`` command. ``move`` requires two parameters:
|
||||
``src`` and ``dst``.
|
||||
|
||||
The ``src`` parameter can either be a ``file id`` or a relative location. If the
|
||||
parameter value is not found in the list of ``file ids``, then it must be
|
||||
prefixed by either ``$CACHE`` or ``$GAMEDIR`` to move a file or directory from
|
||||
the download cache or the game installation dir, respectively.
|
||||
The ``src`` parameter can either be a ``file id`` or a path relative to game
|
||||
dir. If the parameter value is not found in the list of file ids,
|
||||
then it must be prefixed by either ``$CACHE`` or ``$GAMEDIR`` to move a file or
|
||||
directory from the download cache or the game's install dir, respectively.
|
||||
|
||||
The ``dst`` parameter should be prefixed by either ``$GAMEDIR`` or ``$HOME``
|
||||
to move files to path relative to the game dir or the current user's home
|
||||
|
@ -78,16 +94,17 @@ Example:
|
|||
|
||||
move:
|
||||
src: game-file-id
|
||||
dst: $GAMEDIR/location
|
||||
dst: $GAMEDIR/location
|
||||
|
||||
Copying and merging directories
|
||||
-------------------------------
|
||||
|
||||
Both merging and copying actions are done with the ``merge`` directive.
|
||||
Whether the actions acts as merge or copy depends of the existence of the
|
||||
Whether the action does a merge or copy depends on the existence of the
|
||||
destination directory. When merging into an existing directory, original files
|
||||
with the same as ones present in the merged directory will be overwritten, take
|
||||
this into account when writing your script and order your actions accordingly.
|
||||
with the same name as the ones present in the merged directory will be
|
||||
overwritten. Take this into account when writing your script and order your
|
||||
actions accordingly.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -95,8 +112,7 @@ Example:
|
|||
|
||||
merge:
|
||||
src: game-file-id
|
||||
dst: $GAMEDIR/location
|
||||
|
||||
dst: $GAMEDIR/location
|
||||
|
||||
Extracting archives
|
||||
-------------------
|
||||
|
@ -111,20 +127,34 @@ Example:
|
|||
|
||||
extract:
|
||||
file: game-archive
|
||||
dst: $GAMEDIR/datadir/
|
||||
dst: $GAMEDIR/datadir/
|
||||
|
||||
Making a file executable
|
||||
------------------------
|
||||
|
||||
Marking the file as executable is done with the ``chmodx`` command. It is often
|
||||
needed for games that ships in a zip file which does not retain file permissions.
|
||||
needed for games that ship in a zip file, which does not retain file permissions.
|
||||
|
||||
Example: ``chmodx: $GAMEDIR/game_binary``
|
||||
|
||||
Executing a file
|
||||
----------------
|
||||
|
||||
Execute files with the ``execute`` directive. Use the ``args`` parameter to add
|
||||
command arguments, and ``file`` to reference a ``file id``.
|
||||
|
||||
Example:
|
||||
|
||||
::
|
||||
|
||||
execute:
|
||||
args: --argh
|
||||
file: great-id
|
||||
|
||||
Running a task provided by a runner
|
||||
-----------------------------------
|
||||
|
||||
Some actions are specific to some runners, you can call them with th ``task``
|
||||
Some actions are specific to some runners, you can call them with the ``task``
|
||||
command. You must at least provide the ``name`` parameter which is the function
|
||||
that will be called. Other parameters depend on the task being called.
|
||||
|
||||
|
@ -138,8 +168,17 @@ wine: ``winetricks`` Runs winetricks with the ``app`` argument. ``prefix`` is
|
|||
an optional WINEPREFIX path.
|
||||
|
||||
|
||||
Calling the installer
|
||||
=====================
|
||||
Trying the installer locally
|
||||
============================
|
||||
|
||||
The installer can be called with the ``lutris:<game-slug>`` url scheme or by
|
||||
specifying the path to an installer script.
|
||||
If needed (i.e. you didn't download the installer first from the website), add
|
||||
the ``runner`` and ``name`` directives. The value for ``runner`` must be the
|
||||
slug name for the runner. (E.g. winesteam for Steam Windows.)
|
||||
Save your script in a file and use the following command in a terminal:
|
||||
``lutris -i /path/to/file``
|
||||
|
||||
|
||||
Calling the online installer
|
||||
============================
|
||||
|
||||
The installer can be called with the ``lutris:<game-slug>`` url scheme.
|
||||
|
|
Loading…
Reference in a new issue