2013-05-25 05:48:03 +00:00
==================
Writing installers
==================
2017-08-26 10:34:12 +00:00
See an example installer at the end of this document.
2013-06-09 22:00:52 +00:00
Fetching required files
=======================
2013-06-17 22:05:32 +00:00
The `` files `` section of the installer references every file needed for
2014-01-24 12:05:24 +00:00
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
2015-04-30 21:37:12 +00:00
`` url `` keys. The `` url `` key is equivalent to passing only a string to the
2014-01-24 12:05:24 +00:00
installer and the `` filename `` key will be used to give the local copy another
2017-12-03 09:36:25 +00:00
name. If you need to set referer use `` referer `` key.
2013-06-09 22:00:52 +00:00
2013-06-17 22:05:32 +00:00
If the game contains copyrighted files that cannot be redistributed, the value
2013-07-11 16:15:32 +00:00
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
2014-02-09 13:39:39 +00:00
to select, append a message to `` N/A `` like this:
`` N/A:Please select the installer for this game ``
2013-07-11 16:15:32 +00:00
2014-03-15 21:02:17 +00:00
Examples:
::
files:
- file1: http://site.com/gamesetup.exe
- file2: "N/A:Select the game's setup file"
2017-06-19 00:35:17 +00:00
- file3:
url: http://site.com/url-that-doesnt-resolve-to-a-proper-filename
filename: actual_local_filename.zip
2017-12-03 09:36:25 +00:00
referer: www.mywebsite.com
2014-03-15 21:02:17 +00:00
2013-06-09 22:00:52 +00:00
2013-06-17 22:05:32 +00:00
If the game makes use of (Windows) Steam data, the value should be
2014-02-09 13:39:39 +00:00
`` $WINESTEAM:appid:path/to/data `` . This will check that the data is available
2013-06-09 22:00:52 +00:00
or install it otherwise.
2014-01-24 12:05:24 +00:00
2013-06-18 00:13:03 +00:00
Installer meta data
===================
2014-01-24 12:05:24 +00:00
Referencing the main file
---------------------------
For Linux and Wine games, specify the executable file with the `` exe ``
2014-03-15 22:26:22 +00:00
directive. The given path is relative to the game directory.
Example: `` exe: game.sh ``
2014-01-24 12:05:24 +00:00
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
2014-03-15 21:02:17 +00:00
can reference the rom with the `` main_file `` parameter.
2014-03-15 22:26:22 +00:00
Example: `` main_file: game.rom ``
2014-01-24 12:05:24 +00:00
2017-08-26 10:34:12 +00:00
For web games, specify the game's URL (or filename) with `` main_file `` .
2014-03-15 22:26:22 +00:00
Example: `` main_file: http://www... ``
2014-03-15 21:02:17 +00:00
Presetting game parameters
--------------------------
The `` game `` directive lets you preset game parameters and options. Available
parameters depend on the runner:
2014-09-18 16:20:43 +00:00
* linux: `` args `` (optional command arguments), `` working_dir ``
(optional working directory, defaults to the exe's dir).
2014-03-15 21:02:17 +00:00
2017-08-26 10:34:12 +00:00
* wine: `` args `` , `` arch `` (optional WINEARCH), `` prefix `` (optional Wine prefix), `` working_dir `` (optional
2014-09-18 16:20:43 +00:00
working directory, defaults to the exe's dir).
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
* winesteam: `` args `` , `` prefix `` (optional Wine prefix).
2014-08-21 18:05:12 +00:00
2017-08-26 10:34:12 +00:00
Example (Windows game):
2014-03-15 21:02:17 +00:00
::
game:
2017-08-26 10:34:12 +00:00
exe: drive_c/Game/game.exe
prefix: $GAMEDIR
args: -arg
Runner configuration
--------------------
The runner can be preconfigured from the installer.
The name of the directive is the slug name of the runner,
for example `` wine `` . Available parameters depend on the runner.
The best way to set this is to add the game to Lutris, tweak the
runner config and then copy it from `` .config/lutris/games/<game name and id>.yml `` .
Example for Wine (set wine version for this installer):
::
wine:
version: overwatch-2.15-x86_64
System configuration
--------------------
The `` system `` directive lets you preset the system config for the game.
Example (setting some environment variables):
::
system:
env:
__GL_SHADER_DISK_CACHE: '1'
__GL_THREADED_OPTIMIZATIONS: '1'
mesa_glthread: 'true'
2013-06-18 00:13:03 +00:00
2014-03-15 21:02:17 +00:00
Mods and add-ons
----------------
Mods and add-ons require that a base game is already installed on the system.
2014-01-24 12:05:24 +00:00
You can let the installer know that you want to install an add-on by specifying
2013-06-28 10:15:37 +00:00
the `` requires `` directive. The value of `` requires `` must be the canonical
2014-03-15 21:02:17 +00:00
slug name of the base game, not one of its aliases. For example, to install the
add-on "The reckoning" for Quake 2, you should add:
2013-06-18 00:13:03 +00:00
`` requires: quake-2 ``
2014-01-24 12:05:24 +00:00
2013-06-17 22:05:32 +00:00
Writing the installation script
===============================
2014-01-24 12:05:24 +00:00
After every file needed by the game has been aquired, the actual installation
2013-06-17 22:05:32 +00:00
can take place. A series of directives will tell the installer how to set up
2014-03-15 21:02:17 +00:00
the game correctly. Start the installer section with `` installer: `` then stack
the directives by order of execution (top to bottom).
2013-05-25 05:48:03 +00:00
2013-05-25 11:08:39 +00:00
Displaying an 'Insert disc' dialog
----------------------------------
2013-05-26 16:43:42 +00:00
The `` insert-disc `` command will display a message box to the user requesting
2014-03-15 21:02:17 +00:00
him to insert the game's disc into the optical drive.
Ensure a correct disc detection by specifying a file or folder present on the
disc with the `` requires `` parameter.
2014-10-25 13:56:22 +00:00
The $DISC variable will contain the drive's path for use in subsequent
installer tasks.
2014-03-15 22:26:22 +00:00
A link to CDEmu's homepage and PPA will also be displayed if the program isn't
2014-03-15 21:02:17 +00:00
detected on the machine, otherwise it will be replaced with a button to open
gCDEmu. You can override this default text with the `` message `` parameter.
Example:
2013-05-25 11:08:39 +00:00
2014-03-15 21:02:17 +00:00
::
- insert-disc:
requires: diablosetup.exe
2013-05-25 11:08:39 +00:00
2013-06-17 22:05:32 +00:00
Moving files and directories
----------------------------
2013-05-25 05:48:03 +00:00
2014-11-24 15:44:00 +00:00
Move files or directories by using the `` move `` command. `` move `` requires
two parameters: `` src `` (the source file or folder) and `` dst `` (the
destination folder).
2013-05-25 05:48:03 +00:00
2014-11-24 15:44:00 +00:00
The `` src `` parameter can either be a `` file ID `` or a path relative to game
2014-02-09 11:29:27 +00:00
dir. If the parameter value is not found in the list of file ids,
2014-01-24 12:05:24 +00:00
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.
2013-05-25 05:48:03 +00:00
2013-05-26 16:43:42 +00:00
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
2014-11-24 15:44:00 +00:00
If the source is a `` file ID `` , it will be updated with the new destination
path. It can then be used in following commands to access the moved file.
2013-05-25 05:48:03 +00:00
The `` move `` command cannot overwrite files.
2013-05-26 16:43:42 +00:00
2013-06-28 10:15:37 +00:00
Example:
::
2013-07-11 16:15:32 +00:00
2014-03-15 21:02:17 +00:00
- move:
2015-04-29 22:07:16 +00:00
src: $game-file-id
2014-03-15 21:02:17 +00:00
dst: $GAMEDIR/location
2013-07-11 16:15:32 +00:00
2013-06-17 22:05:32 +00:00
Copying and merging directories
-------------------------------
2013-06-28 10:15:37 +00:00
Both merging and copying actions are done with the `` merge `` directive.
2014-01-24 12:05:24 +00:00
Whether the action does a merge or copy depends on the existence of the
2013-06-28 10:15:37 +00:00
destination directory. When merging into an existing directory, original files
2014-01-24 12:05:24 +00:00
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.
2013-06-17 22:05:32 +00:00
2014-11-24 15:44:00 +00:00
If the source is a `` file ID `` , it will be updated with the new destination
path. It can then be used in following commands to access the copied file.
2013-06-28 10:15:37 +00:00
Example:
::
2013-07-11 16:15:32 +00:00
2014-03-15 21:02:17 +00:00
- merge:
2015-04-29 22:07:16 +00:00
src: $game-file-id
2014-03-15 21:02:17 +00:00
dst: $GAMEDIR/location
2013-06-28 10:15:37 +00:00
2013-06-17 22:05:32 +00:00
Extracting archives
-------------------
2013-05-26 16:43:42 +00:00
2013-06-28 10:15:37 +00:00
Extracting archives is done with the `` extract `` directive, the `` file ``
2015-04-29 22:03:46 +00:00
argument is a `` file id `` or a file path. If the archive should be extracted
in some other location than the `` $GAMEDIR `` , you can specify a `` dst ``
argument.
2013-06-28 10:15:37 +00:00
2014-03-15 22:26:22 +00:00
You can optionally specify the archive's type with the `` format `` option.
2014-02-09 11:29:27 +00:00
This is useful if the archive's file extension does not match what it should
be. Accepted values for `` format `` are: zip, tgz, gzip and bz2.
2013-07-11 16:15:32 +00:00
Example:
2013-06-28 10:15:37 +00:00
::
2014-03-15 21:02:17 +00:00
- extract:
2015-04-29 22:07:16 +00:00
file: $game-archive
2014-03-15 21:02:17 +00:00
dst: $GAMEDIR/datadir/
2013-06-28 10:15:37 +00:00
Making a file executable
------------------------
2016-04-15 11:51:44 +00:00
Marking the file as executable is done with the `` chmodx `` directive. It is often
2014-03-15 21:02:17 +00:00
needed for games that ship in a zip file, which does not retain file
permissions.
2013-06-28 10:15:37 +00:00
2014-03-15 21:02:17 +00:00
Example: `` - chmodx: $GAMEDIR/game_binary ``
2013-06-28 10:15:37 +00:00
2014-01-24 12:05:24 +00:00
Executing a file
----------------
2015-05-04 21:58:47 +00:00
Execute files with the `` execute `` directive. Use the `` file `` parameter to
reference a `` file id `` or a path, `` args `` to add command arguments,
2016-04-15 11:51:44 +00:00
`` terminal `` (set to "true") to execute in a new terminal window, `` working_dir ``
to set the directory to execute the command in (defaults to the install path).
2015-05-04 21:58:47 +00:00
The command is executed within the Lutris Runtime (resolving most shared
2016-04-15 11:32:10 +00:00
library dependencies). The file is made executable if necessary, no need to run
2017-08-26 10:34:12 +00:00
chmodx before. You can also use `` env `` (environment variables), `` exclude_processes `` (space-separated list of processes to exclude from being watched), `` include_processes `` (the opposite of `` exclude_processes `` , is used to override Lutris' built-in exclude list) and `` disable_runtime `` (run a process without the Lutris Runtime, useful for running system binaries).
2014-01-24 12:05:24 +00:00
Example:
::
2014-03-15 21:02:17 +00:00
- execute:
2014-09-18 16:20:43 +00:00
args: --argh
2015-04-29 22:07:16 +00:00
file: $great-id
2015-05-04 21:58:47 +00:00
terminal: true
2017-08-26 10:34:12 +00:00
env:
key: value
You can use the `` command `` parameter instead of `` file `` and `` args `` . This
lets you run bash/shell commands easier. `` bash `` is used and is added to `` include_processes `` internally.
Example:
::
- execute:
command: 'echo Hello World! | cat'
Writing files
-------------
Writing text files
~~~~~~~~~~~~~~~~~~
2017-12-30 20:24:47 +00:00
Create or overwrite a file with the `` write_file `` directive. Use the `` file ``
(an absolute path or a `` file id `` ) and `` content `` parameters.
You can also use the optional parameter `` mode `` to specify a file write mode.
Valid values for `` mode `` include `` w `` (the default, to write to a new file)
or `` a `` to append data to an existing file.
2017-08-26 10:34:12 +00:00
2017-12-30 20:25:20 +00:00
Refer to the YAML documentation for reference on how to including multiline
documents and quotes.
2017-08-26 10:34:12 +00:00
Example:
::
- write_file:
file: $GAMEDIR/myfile.txt
content: 'This is the contents of the file.'
2014-01-24 12:05:24 +00:00
2014-10-19 00:11:34 +00:00
Writing into an INI type config file
2017-08-26 10:34:12 +00:00
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-10-19 00:11:34 +00:00
2014-11-11 18:26:47 +00:00
Modify or create a config file with the `` write_config `` directive. A config file
2014-10-19 00:11:34 +00:00
is a text file composed of key=value (or key: value) lines grouped under
[sections]. Use the `` file `` (an absolute path or a `` file id `` ), `` section `` ,
2017-08-26 10:34:12 +00:00
`` key `` and `` value `` parameters. Note that the file is entirely rewritten and
2014-10-19 00:11:34 +00:00
comments are left out; Make sure to compare the initial and resulting file
to spot any potential parsing issues.
Example:
::
2015-03-19 10:27:53 +00:00
- write_config:
2017-08-26 10:34:12 +00:00
file: $GAMEDIR/myfile.ini
2014-10-19 00:11:34 +00:00
section: Engine
key: Renderer
value: OpenGL
2017-08-26 10:34:12 +00:00
Writing into a JSON type file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modify or create a JSON file with the `` write_json `` directive.
Use the `` file `` (an absolute path or a `` file id `` ) and `` data `` parameters.
Note that the file is entirely rewritten; Make sure to compare the initial
and resulting file to spot any potential parsing issues. You can set the optional parameter `` merge `` to `` false `` if you want to overwrite the JSON file instead of updating it.
Example:
::
- write_json:
file: $GAMEDIR/myfile.json
data:
Sound:
Enabled: 'false'
This writes (or updates) a file with the following content:
::
{
"Sound": {
"Enabled": "false"
}
}
2014-10-19 00:11:34 +00:00
2013-07-11 16:15:32 +00:00
Running a task provided by a runner
-----------------------------------
2014-02-09 11:29:27 +00:00
Some actions are specific to some runners, you can call them with the `` task ``
2013-07-11 16:15:32 +00:00
command. You must at least provide the `` name `` parameter which is the function
2014-10-19 12:39:33 +00:00
that will be called. Other parameters depend on the task being called. It is
possible to call functions from other runners by prefixing the task name with
the runner's name (e.g., from a dosbox installer you can use the wineexec task
with `` wine.wineexec `` as the task's `` name `` )
2013-07-11 16:15:32 +00:00
Currently, the following tasks are implemented:
2015-03-19 10:27:53 +00:00
* wine / winesteam: `` create_prefix `` Creates an empty Wine prefix at the
specified path. The other wine/winesteam directives below include the
creation of the prefix, so in most cases you won't need to use the
create_prefix command. Parameters are `` prefix `` (the path), `` arch ``
2017-12-03 09:36:25 +00:00
(optional architecture of the prefix, default: win32), `` overrides `` (optional dll overrides, format described later), `` install_gecko `` (optional variable to stop installing gecko), `` install_mono `` (optional variable to stop installing mono).
2015-03-19 10:27:53 +00:00
Example:
::
- task:
name: create_prefix
prefix: $GAMEDIR
arch: win64
2014-09-18 16:20:43 +00:00
* wine / winesteam: `` wineexec `` Runs a windows executable. Parameters are
2015-03-19 10:27:53 +00:00
`` executable `` (`` file ID `` or path), `` args `` (optional arguments passed
to the executable), `` prefix `` (optional WINEPREFIX),
2017-11-27 22:04:16 +00:00
`` arch `` (optional WINEARCH, required when you created win64 prefix), `` blocking `` (if true, do not run the process in a thread), `` working_dir `` (optional working directory), `` include_processes `` (optional space-separated list of processes to include to
being watched)
2017-08-26 10:34:12 +00:00
`` exclude_processes `` (optional space-separated list of processes to exclude from
being watched), `` env `` (optional environment variables), `` overrides `` (optional dll overrides).
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
Example:
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
::
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
- task:
name: wineexec
prefix: $GAMEDIR
executable: drive_c/Program Files/Game/Game.exe
args: --windowed
2014-03-15 22:26:22 +00:00
2014-09-18 16:20:43 +00:00
* wine / winesteam: `` winetricks `` Runs winetricks with the `` app `` argument.
2017-08-26 10:34:12 +00:00
`` prefix `` is an optional WINEPREFIX path. You can run many tricks at once by adding more to the `` app `` parameter (space-separated).
2014-03-15 21:02:17 +00:00
2016-08-04 19:37:39 +00:00
By default Winetricks will run in silent mode but that can cause issues
with some components such as XNA. In such cases, you can provide the
option `` silent: false ``
2014-09-18 16:20:43 +00:00
Example:
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
::
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
- task:
name: winetricks
prefix: $GAMEDIR
app: nt40
2014-03-15 21:02:17 +00:00
2017-11-07 14:53:06 +00:00
* wine / winesteam: `` winecfg `` runs execute winecfg in your `` prefix `` argument. Parameters are
`` prefix `` (optional wineprefix path), `` arch `` (optional WINEARCH, required when you created win64 prefix),
`` config `` (dunno what is is).
example:
::
- task:
name: winecfg
prefix: $GAMEDIR
config: config-file
arch: win64
* wine / winesteam: `` joycpl `` runs joycpl in your `` prefix `` argument. Parameters are
`` prefix `` (optional wineprefix path), `` arch `` (optional WINEARCH, required when you created win64 prefix).
example:
::
- task:
name: joypl
prefix: $GAMEDIR
arch: win64
* wine / winesteam: `` eject_disk `` runs eject_disk in your `` prefix `` argument. parameters are
`` prefix `` (optional wineprefix path).
example:
::
- task:
name: eject_disc
prefix: $GAMEDIR
* wine / winesteam: `` disable_desktop_integration `` remove links to user directories in a `` prefix `` argument. parameters are
`` prefix `` (wineprefix path).
example:
::
- task:
name: eject_disc
prefix: $GAMEDIR
2014-09-18 16:20:43 +00:00
* wine / winesteam: `` set_regedit `` Modifies the Windows registry. Parameters
2014-10-09 14:14:15 +00:00
are `` path `` (the registry path, use backslashes), `` key `` , `` value `` ,
`` type `` (optional value type, default is REG_SZ (string)), `` prefix ``
2017-11-07 14:53:06 +00:00
(optional WINEPREFIX), `` arch ``
(optional architecture of the prefix, required when you created win64 prefix).
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
Example:
2014-03-15 21:02:17 +00:00
2014-09-18 16:20:43 +00:00
::
2013-07-11 16:15:32 +00:00
2014-09-18 16:20:43 +00:00
- task:
name: set_regedit
prefix: $GAMEDIR
2014-10-09 14:14:15 +00:00
path: HKEY_CURRENT_USER\Software\Valve\Steam
key: SuppressAutoRun
2015-12-29 15:14:18 +00:00
value: '00000000'
2014-10-09 14:14:15 +00:00
type: REG_DWORD
2017-11-07 14:53:06 +00:00
arch: win64
* wine / winesteam: `` delete_registry_key `` Deletes registry key in the Windows registry. Parameters
are `` key `` , `` prefix ``
(optional WINEPREFIX), `` arch `` (optional architecture of the prefix, required when you created win64 prefix).
Example:
::
- task:
name: set_regedit
prefix: $GAMEDIR
path: HKEY_CURRENT_USER\Software\Valve\Steam
key: SuppressAutoRun
value: '00000000'
type: REG_DWORD
arch: win64
2013-07-11 16:15:32 +00:00
2015-02-05 23:48:45 +00:00
* wine / winesteam: `` set_regedit_file `` Apply a regedit file to the
2017-11-07 14:53:06 +00:00
registry, Parameters are `` filename `` (regfile name),
`` arch `` (optional architecture of the prefix, required when you created win64 prefix).
2015-02-05 23:48:45 +00:00
Example::
- task:
name: set_regedit_file
prefix: $GAMEDIR
filename: myregfile
2017-11-07 14:53:06 +00:00
arch: win64
2013-05-26 16:43:42 +00:00
2017-11-07 14:53:06 +00:00
* wine / winesteam: `` winekill `` Stops processes running in Wine prefix. Parameters
2017-12-30 20:24:47 +00:00
are `` prefix `` (optional WINEPREFIX),
2017-11-07 14:53:06 +00:00
`` arch `` (optional architecture of the prefix, required when you created win64 prefix).
2017-09-04 07:23:38 +00:00
Example
::
- task:
name: winekill
prefix: $GAMEDIR
2017-11-07 14:53:06 +00:00
arch: win64
2017-09-04 07:23:38 +00:00
2015-03-21 11:12:01 +00:00
* dosbox: `` dosexec `` Runs dosbox. Parameters are `` executable `` (optional
`` file ID `` or path to executable), `` config_file ``
(optional `` file ID `` or path to .conf file), `` args `` (optional command
arguments), `` working_dir `` (optional working directory, defaults to the
`` executable `` 's dir or the `` config_file `` 's dir), `` exit `` (set to
`` false `` to prevent DOSBox to exit when the `` executable `` is terminated).
Example:
::
- task:
name: dosexec
2015-04-29 22:07:16 +00:00
executable: $file_id
2015-03-21 11:12:01 +00:00
config: $GAMEDIR/game_install.conf
args: -scaler normal3x -conf more_conf.conf
2015-02-07 18:36:30 +00:00
Displaying a drop-down menu with options
----------------------------------------
Request input from the user by displaying a menu filled with options to choose
from with the `` input_menu `` directive.
The `` description `` parameter holds the message to the user, `` options `` is an
indented list of `` value: label `` lines where "value" is the text that will be
2015-02-07 23:09:50 +00:00
stored and "label" is the text displayed, and the optional `` preselect ``
2015-02-07 18:36:30 +00:00
parameter is the value to preselect for the user.
The result of the last input directive is available with the `` $INPUT `` alias.
If need be, you can add an `` id `` parameter to the directive which will make the
selected value available with `` $INPUT_<id> `` with "<id>" obviously being the
id you specified. The id must contain only numbers, letters and underscores.
Example:
::
- input_menu:
2017-11-29 00:03:12 +00:00
description: "Choose the game's language:"
2015-02-07 18:36:30 +00:00
id: LANG
options:
- en: English
- bf: Brainfuck
- "value and": "label can be anything, surround them with quotes to avoid issues"
2015-08-29 08:57:04 +00:00
preselect: bf
2015-02-07 18:36:30 +00:00
In this example, English would be preselected. If the option eventually
selected is Brainfuck, the "$INPUT_LANG" alias would be available in
following directives and would correspond to "bf". "$INPUT" would work as well,
up until the next input directive.
2014-01-24 12:05:24 +00:00
Trying the installer locally
============================
If needed (i.e. you didn't download the installer first from the website), add
2017-12-03 09:36:25 +00:00
the `` name `` (if name contains : character surrond name with quotes), `` game_slug `` , `` slug `` , `` version `` and `` runner `` directives.
2017-08-27 12:59:19 +00:00
The value for `` runner `` must be the slug name for the runner.
(E.g. winesteam for Steam Windows.)
2017-08-26 10:34:12 +00:00
Under `` script `` , add `` files `` , `` installer `` , `` game `` and other installer
directives. See below for an example.
Save your script in a .yaml file and use the following command in a terminal:
`` lutris -i /path/to/file.yaml ``
Example Linux game:
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: linux
script:
game:
exe: $GAMEDIR/mygame
args: --some-arg
2017-12-03 09:36:25 +00:00
working_dir: $GAMEDIR
2017-08-26 10:34:12 +00:00
files:
- myfile: http://example.com/mygame.zip
installer:
- chmodx: $GAMEDIR/mygame
2017-12-03 09:36:25 +00:00
system:
terminal: true
env:
SOMEENV: true
Example wine game:
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: wine
script:
game:
exe: $GAMEDIR/mygame
args: --some-args
prefix: $GAMEDIR/prefix
arch: win64
working_dir: $GAMEDIR/prefix
files:
- installer: "N/A:Select the game's setup file"
installer:
- task:
executable: installer
name: wineexec
prefix: $GAMEDIR/prefix
arch: win64
wine:
Desktop: true
WineDesktop: 1024x768
overrides:
ddraw.dll: n
system:
terminal: true
env:
WINEDLLOVERRIDES: d3d11=
SOMEENV: true
Example gog wine game, some installer crash with with /SILENT or /VERYSILENT option (Cuphead and Star Wars: Battlefront II for example), (most options can be found here http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline, there is undocumented gog option `` /nogui `` , you need to use it when you use `` /silent `` and `` /suppressmsgboxes `` parameters):
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: wine
script:
game:
exe: $GAMEDIR/prefix/game/Game.exe
args: --some-arg
prefix: $GAMEDIR/prefix
arch: win64
working_dir: $GAMEDIR/prefix
files:
- installer: "N/A:Select the game's setup file"
installer:
- task:
args: /SILENT /LANG=en /SP- /NOCANCEL /SUPPRESSMSGBOXES /NOGUI /DIR="C:/game"
executable: installer
name: wineexec
prefix: $GAMEDIR/prefix
arch: win64
wine:
Desktop: true
WineDesktop: 1024x768
overrides:
ddraw.dll: n
system:
terminal: true
env:
WINEDLLOVERRIDES: d3d11=
SOMEENV: true
Example gog wine game, alternative (requires innoextract):
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: wine
script:
game:
exe: $GAMEDIR/prefix/drive_c/Games/YourGame/game.exe
args: --some-arg
prefix: $GAMEDIR/prefix
arch: win64
working_dir: $GAMEDIR/prefix
files:
- installer: "N/A:Select the game's setup file"
installer:
- execute:
args: --gog -d "$CACHE" "$setup"
description: Extracting game data
file: innoextract
- move:
description: Extracting game data
dst: $GAMEDIR/drive_c/Games/YourGame
src: $CACHE/app
wine:
Desktop: true
WineDesktop: 1024x768
overrides:
ddraw.dll: n
system:
terminal: true
env:
WINEDLLOVERRIDES: d3d11=
SOMEENV: true
Example gog linux game (mojosetup options found here https://www.reddit.com/r/linux_gaming/comments/42l258/fully_automated_gog_games_install_howto/):
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: linux
script:
game:
exe: $GAMEDIR/game.sh
args: --some-arg
working_dir: $GAMEDIR
files:
- installer: "N/A:Select the game's setup file"
installer:
- chmodx: installer
- execute:
executable: installer
description: Installing game, it will take a while...
args: -- --i-agree-to-all-licenses --noreadme --nooptions --noprompt --destination=$GAMEDIR
system:
terminal: true
Example gog linux game, alternative (requires unzip):
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: linux
script:
game:
exe: Game/start.sh
args: --some-arg
working_dir: $GAMEDIR
files:
- installer: "N/A:Select the game's setup file"
installer:
- execute:
args: $installer -d "$GAMEDIR" "data/noarch/*"
description: Extracting game data, it will take a while...
file: unzip
- rename:
dst: $GAMEDIR/Game
src: $GAMEDIR/data/noarch
system:
terminal: true
Example winesteam game:
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: winesteam
script:
game:
appid: 227300
args: --some-args
prefix: $GAMEDIR/prefix
arch: win64
installer:
- task:
description: Setting up wine prefix
name: create_prefix
prefix: $GAMEDIR/prefix
arch: win64
wine:
Desktop: true
WineDesktop: 1024x768
overrides:
ddraw.dll: n
system:
terminal: true
env:
WINEDLLOVERRIDES: d3d11=
SOMEENV: true
Example steam linux game:
::
name: My Game
game_slug: my-game
version: Installer
slug: my-game-installer
runner: winesteam
script:
game:
appid: 227300
args: --some-args
steam:
quit_steam_on_exit: true
system:
terminal: true
env:
SOMEENV: true
2017-08-26 10:34:12 +00:00
When submitting the installer script to lutris.net, only copy the script part. Remove the two space indentation:
::
game:
exe: $GAMEDIR/mygame
args: --some-arg
files:
- myfile: http://example.com
installer:
- chmodx: $GAMEDIR/mygame
2014-01-24 12:05:24 +00:00
Calling the online installer
============================
2013-05-26 16:43:42 +00:00
2014-01-24 12:05:24 +00:00
The installer can be called with the `` lutris:<game-slug> `` url scheme.
2017-12-03 09:36:25 +00:00
Library override info
======================
Overrides option accepts this values:
`` n,b `` = Try native and fallback to builtin if native doesn't work
`` b,n `` = Try builtin and fallback to native if builtin doesn't work
`` b `` = Use buildin
`` n `` = Use native
`` disabled `` = Disable library
Overrides format for `` create_prefix `` , `` wineexec `` commands and for `` wine `` options section:
::
overrides:
ddraw.dll: n
d3d9: disable
winegstreamer: builtin
Override or set env
===================
Example:
::
env:
WINEDLLOVERRIDES: d3d11=
SOMEENV: true
Sysoptions
==========
**wine section:**
`` version `` (example: `` staging-2.21-x86_64 `` )
`` custom_wine_path `` (example: `` /usr/local/bin/wine `` )
`` x360ce-path `` (example: `` $GAMEDIR `` )
`` x360ce-dinput `` (example: `` true `` )
`` x360ce-xinput9 `` (example: `` true `` )
`` dumbxinputemu `` (example: `` true `` )
`` xinput-arch `` (example: `` win32 `` or `` win64 `` )
`` Desktop `` (example: `` true `` )
`` WineDesktop `` (example: `` 1024x768 `` )
`` MouseWarpOverride `` (example: `` enable `` , `` disable `` or `` force `` )
`` OffscreenRenderingMode `` (example: `` fbo `` or `` backbuffer `` )
`` StrictDrawOrdering `` (example: `` enabled `` or `` disabled `` )
`` UseGLSL `` (example: `` enabled `` or `` disabled `` )
`` RenderTargetLockMode `` (example: `` disabled `` , `` readtex `` or `` readdraw `` )
`` Audio `` (example: `` auto `` , `` alsa `` , `` oss `` or `` jack `` )
`` ShowCrashDialog `` (example: `` true `` )
`` show_debug `` (example: empty value, `` -all `` or `` +all `` )
`` overrides `` (example: described above)
**winesteam (wine section options available to winesteam runner) section:**
`` steam_path `` (example: `` Z:\home\user\Steam\Steam.exe `` )
`` quit_steam_on_exit `` (example: `` true `` )
`` steamless_binary64 `` (example: fallout64-nosteam)
`` steamless_binary `` (example: fallout-nosteam)
`` run_without_steam `` (example: `` true `` )
**steam section:**
`` steamless_binary64 `` (example: fallout64-nosteam)
`` steamless_binary `` (example: fallout-nosteam)
`` run_without_steam `` (example: `` true `` )
`` quit_steam_on_exit `` (example: `` true `` )
`` start_in_big_picture `` (example: `` true `` )
`` steam_native_runtime `` (example: `` false `` )
`` args `` (example: `` -tcp -language "english" `` )
**system section:**
`` reset_desktop `` (example: `` true `` )
`` restore_gamma `` (example: `` true `` )
`` resolution `` (example: `` 2560x1080 `` )
`` terminal `` (example: `` true `` )
`` env `` (described above)
`` prefix_command `` (example: `` firejail --profile=/etc/firejail/steam.profile -- `` )
`` include_processes `` (example: `` Setup.exe `` )
`` exclude_processes `` (example: `` unpack.exe `` )
`` single_cpu `` (example: `` true `` )
`` disable_runtime `` (example: `` true `` )
`` disable_monitoring `` (example: `` true `` )
`` reset_pulse `` (example: `` true `` )
`` pulse_latency `` (example: `` true `` )
`` use_us_layout `` (example: `` true `` )
`` killswitch `` (example: `` /dev/input/js0 `` )
`` xboxdrv `` (example: `` --silent --type xbox360 `` )
`` sdl_gamecontrollerconfig `` (example: `` $HOME/gamecontrollerdb.txt `` )
`` xephyr `` (example: offm `` 8bpp `` or `` 16bpp `` )
`` xephyr_resolution `` (example: `` 1024x768 `` )