[SOLVED] "Run EXE inside wine prefix" command line

Hello, I just installed Warcraft 3 following this procedure (install battlenet and run the installer inside the battlenet prefix). It worked, but now to run the game I must go to lutris, right click battle net, click “Run EXE inside wine prefix”, and select the game executable.

How can I do the same using the command line? I tried following this post and ran this command:

WINEPREFIX=~/Games/warcraft3 ~/.local/share/lutris/runners/wine/lutris-4.20-x86_64/bin/wine '~/Games/battlenet/drive_c/Program Files/Warcraft III/x86_64/Warcraft III.exe'

but the game crashes at startup. It seems that the line is incomplete. How can I know exactly the command that is run when I click “Run EXE inside wine prefix”?

1 Like

Finally I made it work. If anybody is interested, here my script to launch the game:

#!/bin/sh

export WINEPREFIX=/home/ytawo/Games/warcraft3
export WINEESYNC=1
export WINE=/home/ytawo/.local/share/lutris/runners/wine/lutris-4.20-x86_64/bin/wine
export DXVK_STATE_CACHE_PATH=/home/ytawo/Games/warcraft3
export __GL_SHADER_DISK_CACHE_PATH=/home/ytawo/Games/warcraft3
export SDL_VIDEO_FULLSCREEN_DISPLAY=off
export WINEARCH=win64
export WINE_LARGE_ADDRESS_AWARE=1
export game_name='Warcraft 3'
export WINEDLLOVERRIDES='api-ms-win-crt-private-l1-1-0,ucrtbase=n,b;d3d10,d3d10_1,d3d10core,d3d11,dxgi=n;d3d12,nvapi,nvapi64='

GAME_LOCATION='/home/ytawo/Games/warcraft3/drive_c/Program Files/Warcraft III/x86_64'
GAME_EXECUTABLE='Warcraft III.exe'

cd "$GAME_LOCATION"

$WINE "$GAME_EXECUTABLE" "$@"

The actual values will change depending on the game and install folder, but at least you know which environment variables to set.

2 Likes

Dear Ytawo, i want to set prefix in wine to run diablo 2 in specific resolution, but i don’t know how to create prefix, where i create this file or set a variables in the lutris wine configure. Can you would like to help me?