lutris/docs/installers.rst

59 lines
2.1 KiB
ReStructuredText
Raw Normal View History

2013-05-25 05:48:03 +00:00
==================
Writing installers
==================
2013-06-09 22:00:52 +00:00
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.
If the game contains copyrighted files that cannot be redistributed, the value
should be ``N\A``. When the installer encounter this value, it will prompt the
user for the location of the file.
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
or install it otherwise.
2013-05-25 05:48:03 +00:00
2013-05-25 11:08:39 +00:00
Displaying an 'Insert disc' dialog
----------------------------------
The ``insert-disc`` command will display a message box to the user requesting
2013-05-25 11:08:39 +00:00
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,
2013-05-25 11:08:39 +00:00
otherwise it will be replaced with a button to open gCDEmu.
An optional parameter ``message`` will override the default text if given.
2013-05-25 05:48:03 +00:00
Moving files
------------
Move files by using the ``move`` command. ``move`` requires two parameters:
2013-05-25 05:48:03 +00:00
``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
2013-05-25 05:48:03 +00:00
prefixed by either ``$CACHE`` or ``$GAMEDIR`` to move a file or directory from
the download cache or the game installation 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
2013-05-25 05:48:03 +00:00
directory.
The ``move`` command cannot overwrite files.
Calling the installer
=====================
2013-06-09 22:00:52 +00:00
The installer can be called with the ``lutris:<game-slug>`` url scheme or by
specifying the path to an installer script.