How to make an installer that pulls a local file

I would like to make a Diablo 3 installer that pulls local files because I have network issues. I made an installer that pulls the file from a file bin site so it’s a Batttle.net network problem that we can’t fix. But as a site installer maybe it’s better people use their own files for security reasons. I tried file:///*** as URL but no results, maybe I would have to install apache to make that to work.

Interesting problem.

Maybe you could do something like the GoG installers do.

files:
- file1: N/A:Please select the GOG installer
- file2: https://lutris.net/files/tools/innoextract.tar.gz

See the N/A: part which shows a file selection dialog to select a local file.

You could also try to put a direct file path in place of the http path. Thus:

/path/to/file.dmp

Tried this and I get the error: Invalid YAML, problem at line 2, mapping values are not allowed here

files:
- setup
    filename: Battle.net-Setup.exe
    - file1: https://www.battle.net/download/getInstallerForGame?os=win&version=LIVE&gameProgram=BATTLENET_APP
    - file2: N/A:Please select the Battle.net installer installer
game:
  arch: win64
  exe: drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe
  prefix: $GAMEDIR
installer:
- task:
    arch: win64
    description: Creating 64bit Wine prefix.
    name: create_prefix
    prefix: $GAMEDIR
- task:
    app: arial
    arch: win64
    description: Installing Arial font
    name: winetricks
    prefix: $GAMEDIR
- task:
    app: fontsmooth-rgb
    arch: win64
    description: Setting fontsmooth=rbg
    name: winetricks
    prefix: $GAMEDIR
- task:
    arch: win64
    description: Setting Windows 10 mode for Wine
    key: Version
    name: set_regedit
    path: HKEY_CURRENT_USER\\Software\\Wine
    prefix: $GAMEDIR
    value: win10
- write_json:
    data:
      Client:
        GameLaunchWindowBehavior: '2'
        HardwareAcceleration: 'false'
        Sound:
          Enabled: 'false'
        Streaming:
          StreamingEnabled: 'false'
    description: Disabling Sound/Hardware Acceleration/Streaming in Blizzard App
    file: $GAMEDIR/drive_c/users/$USER/Application Data/Battle.net/Battle.net.config
- task:
    arch: win64
    description: 'Installing Blizzard App

      ------------------------------

      Do not try to log into Battle.net. Lutris will automatically close the login
      window. After Lutris installer is finished, you can start Blizzard App with
      \"Launch the game\", and install / locate your Blizzard game.'
    exclude_processes: Battle.net.exe Agent.exe \"Battle.net Helper.exe\"
    executable: setup
    name: wineexec
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    arch: win64
    description: 'Wine Staging: Enabling DXVA2'
    key: backend
    name: set_regedit
    path: HKEY_CURRENT_USER\\Software\\Wine\\DXVA2
    prefix: $GAMEDIR
    value: va
system:
  env:
    DXVK_HUD: '0'
    DXVK_STATE_CACHE: '1'
    DXVK_STATE_CACHE_PATH: $GAMEDIR
    PBA_ENABLE: '0'
    __GL_SHADER_DISK_CACHE: '1'
    __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR
    __GL_THREADED_OPTIMIZATIONS: '1'
    __PBA_CB_HEAP: '128'
    __PBA_GEO_HEAP: '512'
    mesa_glthread: 'true'
  exclude_processes: Agent.exe \"Battle.net Helper.exe\"
wine:
  dxvk: true
  esync: true

It doesn’t recognize the files: - setup filename: -file1 and -file2 format.

The manual install of battle.net does have a file selection instead of a download:

Note that this is purely the battle.net installation. If you want to cache games then you have to look at how battle.net scans for installed games.

Today I had a similar problem.

I solved mine by removing the setup section. Then when it references the setup session later you need to change that to the new flag you have used for the file.

FYI, After switching to my local copy, I received an error like this

local variable ‘DESKTOP_FOLDERS’ referenced before yadadadada

If you receive something similar, you need to update lutris. I updated to the git version and fixed the issue.

Not 100% sure since we’re doing different programs and I used json. But I think it should be close to something like this.

files:
- file1: N/A:Please select the installer
game:
  arch: win64
  exe: drive_c/Program Files (x86)/Battle.net/Battle.net Launcher.exe
  prefix: $GAMEDIR
installer:
- task:
    arch: win64
    description: Creating 64bit Wine prefix.
    name: create_prefix
    prefix: $GAMEDIR
- task:
    app: arial
    arch: win64
    description: Installing Arial font
    name: winetricks
    prefix: $GAMEDIR
- task:
    app: fontsmooth-rgb
    arch: win64
    description: Setting fontsmooth=rbg
    name: winetricks
    prefix: $GAMEDIR
- task:
    arch: win64
    description: Setting Windows 10 mode for Wine
    key: Version
    name: set_regedit
    path: HKEY_CURRENT_USER\\Software\\Wine
    prefix: $GAMEDIR
    value: win10
- write_json:
    data:
      Client:
        GameLaunchWindowBehavior: '2'
        HardwareAcceleration: 'false'
        Sound:
          Enabled: 'false'
        Streaming:
          StreamingEnabled: 'false'
    description: Disabling Sound/Hardware Acceleration/Streaming in Blizzard App
    file: $GAMEDIR/drive_c/users/$USER/Application Data/Battle.net/Battle.net.config
- task:
    arch: win64
    description: 'Installing Blizzard App

      ------------------------------

      Do not try to log into Battle.net. Lutris will automatically close the login
      window. After Lutris installer is finished, you can start Blizzard App with
      \"Launch the game\", and install / locate your Blizzard game.'
    exclude_processes: Battle.net.exe Agent.exe \"Battle.net Helper.exe\"
    executable: file1
    name: wineexec
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    arch: win64
    description: 'Wine Staging: Enabling DXVA2'
    key: backend
    name: set_regedit
    path: HKEY_CURRENT_USER\\Software\\Wine\\DXVA2
    prefix: $GAMEDIR
    value: va
system:
  env:
    DXVK_HUD: '0'
    DXVK_STATE_CACHE: '1'
    DXVK_STATE_CACHE_PATH: $GAMEDIR
    PBA_ENABLE: '0'
    __GL_SHADER_DISK_CACHE: '1'
    __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR
    __GL_THREADED_OPTIMIZATIONS: '1'
    __PBA_CB_HEAP: '128'
    __PBA_GEO_HEAP: '512'
    mesa_glthread: 'true'
  exclude_processes: Agent.exe \"Battle.net Helper.exe\"
wine:
  dxvk: true
  esync: true