wem run
The wem run
command will install or run your configured executable.
→ Install
If you have both InstallExe
and InstallExpected
configured, WEM will try to install the program using the specified executable, and then verify the installation by checking for the existence of InstallExpected
.
If InstallExpected
is not found, a warning will be printed mentioning as much. You should adjust or disable InstallExpected
as needed in that case.
→ Skip Install
Use the --skip-install
option to skip running the configured InstallExe
.
→ Run
When there's no installation to be done, wem run
will run your configured RunExe
. Any settings will be applied before running the RunExe
executable.
wem run morrowind
→ Run Prefix
The --run-prefix
flag (config value RunPrefix
) offers a way to append something to your RunExe
.
For example, to use the excellent MangoHud tool, you could invoke it with --run-prefix
:
wem run morrowind --run-prefix mangohud
→ Dry Run
The --dry-run
flag is offered as a way to approximate the WEM setup with manual commands:
wem run morrowind --dry-run
cd /home/hristos/games/WinePrefixes/morrowind/drive_c/game; WINEARCH=win64 WINEPREFIX=/home/hristos/games/WinePrefixes/morrowind WINEDLLOVERRIDES=dinput,d3d8=n,b /bin/wine explorer /desktop=1920x1080 C:\\game\\Morrowind.exe
This is not meant to be a full replacement for the context WEM provides, rather it is just a way to approximate what WEM is doing under the hood. Certain options such as installing DXVK do not happen when using dry run output.
→ Pre/Post Run
You may also configure a command to run before and after your main executable has run.
wem run morrowind --run-pre "{{.Winetricks}} foo"
wem run morrowind --run-post "something with args"
Note that when you pass in pre/post options via CLI like this, WEM will naively split what you give it on spaces. This means the second example above runs something
as a command using with
and args
as arguments to it.
Please see this section of the Options documentation for complete details on how these work and what you can do with them.
→ Explorer
Use the --explorer
flag to run explorer in the context of your wine env.
wem run morrowind --explorer
→ Regedit
Use the --regedit
flag to run regedit in the context of your wine env.
wem run morrowind --regedit
→ Winecfg
The --winecfg
flag is offered as a convenient way to run winecfg in the context of your wine env.
wem run morrowind --winecfg
→ Winetricks
Similarly: the --winetricks
flag is offered as a convenient way to run winetricks in the context of your wine env.
wem run morrowind --winetricks
→ Exec
The --exec
flag is a way to run an arbitrary executable in the context of your wine env.
wem run morrowind --exec "{{.RunWorkDir}}/MyCoolThing.exe"
Variables used in the string passed to exec will be rendered.
→ Skip Run
Use the --skip-run
option to skip running the configured RunExe
. Doing wem install
is probably what you want instead of this.