[SOLVED] Lutris WINE .NET Issue During Game Installation - Failure Processing Application Bundle
Im trying to install a game through Lutris using the game's installer and I keep coming across the same error that I can't really find much information on. It seems to be an issue with dotnet itself or the actual game installer and not WINE though, so I am unsure how to proceed.
Failure processing application bundle. Failed to create directory [Z:\path\to\executable\/home/$USER/.cache/dotnet_bundle_extract\] for extracting bundled files.
Some more details:
The game is installed using an installer
The game is made with Unity 2021 with a Mono version equivalent to .NET 4.8
Here is what i have tried so far (Updated):
Reinstalling Mono in the prefix using WINETRICKS
Uninstalling Mono and installing .NET 4.8 using WINETRICKS
Editing the register in the WINE prefix to show .NET 4.8 being installed (you can see this in provided logs, but I am unsure if I am doing it correctly)
Creating a symlink to the users home directory (whis 'works' but it installs DLLs outside of the prefix)
Here is the install script I am using:
--- game_slug: gamename name: GameName year: 2023 user: t3nk3y runner: wine slug: gamename version: GameName - Alpha Test description: notes: "Actual game install will occur on the first run of the game." script: files: - gamenameinstaller: N/A:Please select the GameNameInstaller.exe file game: arch: win64 exe: drive_c/users/$USER/AppData/Local/GameName/Launcher/GameNameInstaller.exe prefix: "$GAMEDIR" installer: - task: description: Creating Wine prefix arch: win64 name: create_prefix prefix: "$GAMEDIR" - task: description: Working around .NET check name: set_regedit path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full key: Release value: 0x00080ea8 type: REG_DWORD - task: description: Launching GameNameInstaller.exe arch: win64 executable: gamenameinstaller name: wineexec prefix: $GAMEDIR wine: UseGLSL: disabled dxvk: true esync: true
I am unsure of what to try next, and any help or advice would be greatly appreciated.
Well for one thing, that's a really strange directory structure. The Z drive is referring to a WINE prefix, so I'd go into the prefix directory and determine the correct path that it should be pointing to, and then find out what its calling that incorrect path and fix it.
I just looked at the script you posted, can you try running echo $GAMEDIR in a terminal and see what it's defined as in your environment variables? If that's the cause of that odd path, then you can update it by running export GAMEDIR=/home/$USER/new/path/to/game
I actually 'fixed' it by creating a symlink to the home folder, and the installer ends up creating a folder with a set of DLLs:
D3DCompiler_47_cor3.dll
PenImc_cor3.dll
PresentationNative_cor3.dll
vcruntime140_cor3.dll
wpfgfx_cor3.dll
I think some of these could be installed into the prefix using winetricks, but I'm not sure about the others.
Although this does 'work' (and by work i mean it gets rid of the current error, the entire installation process is still borked but now it's just further down the line) I'm not sure I'm comfortable with the fix. Ideally, I would prefer everything getting installed to reside within the WINE prefix. Finding out what was throwing the path error would probably help but I'm not sure how to figure that out or if it could even be changed.
You can install Dotnet in Linux natively, that might be a better option than trying to use Mono. Try sudo apt search dotnet | grep installed to see if you already have some of it installed. I have all of the following packages installed locally on Pop!_OS aspnetcore-runtime-6.0 dotnet-apphost-pack-6.0 dotnet-host dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-sdk-6.0 dotnet-targeting-pack6.0 dotnet-templates-6.0 dotnet6. You probably don't need all of those installed, I think just sudo apt install dotnet6 will install all of the other packages as dependencies when you install it.
I'm not really familiar with Game Slug but you said you're using Lutris? Is it possible to try installing it through Steam or Heroic Games Launcher? I'm more familiar with those. Also, can you tell me which game it is that you're trying to install? That might help.
@ShaunaTheDead@BloodSlut yeah, I don't think that the system wide dotnet will work under wine with the windows dependencies programs want, but yeah, if it does that'll be awesome
I'm not sure why, but as far as I can tell, my system is running WINE prefixes on my base system. Maybe it compartmentalizes them if you install WINE through Flatpak, or through Proton. I'm not sure. When I open a commandline terminal through Winetricks it tells me I'm using my base system.
@ShaunaTheDead@BloodSlut what do you mean? you can use different wine prefixes for different applications, so I don't quite get it. Also, outside bottles, I'm not sure you can run wine in flatpak
I already have dotnet installed natively (driver, runtime, SDK, and targeting pack). If I could figure out exactly what was calling the error I could have a better sense of what's going on.
The weird thing is that the game itself is running Mono, which Lutris appears to automatically set up when creating a prefix, and even if the launcher/game isn't recognizing it, I don't know why it would be trying to use .NET, let alone installing and accessing prerequisites outside of the prefix.
The game_slug is just an internal ID for Lutris, it would be used for if/when I upload the installation script to the Lutris website.
Installation through Steam was a no-go, I'm not sure Steam and stock Proton have the tools required to get this running, and Heroic likely wouldn't be much different.
The game itself is an alpha-test under NDA, so I can't disclose too much, (and why I haven't been able to find much helpful information searching online). It has a standalone installer and launcher which is what I believe is causing the most issues. I can get in contact with the devs but I'm trying to avoid bugging them since there is not currently planned support for Linux.
Okay, try running env in a terminal and seeing what DOTNET_BUNDLE_EXTRACT_BASE_DIR is set to. For me it's DOTNET_BUNDLE_EXTRACT_BASE_DIR=/home/$USER/.cache/dotnet_bundle_extract but I'm betting that yours is more like /homemeDownloads/home/me/.cache/dotnet_bundle_extract whereas it should almost certainly be /home/$USER/.cache/dotnet_bundle_extract
And in the environment variables you might as well check DOTNET_ROOT and see if any Dotnet programs are in your PATH. For me those are DOTNET_ROOT=/usr/lib/dotnet and PATH=/home/$USER/.dotnet/tools
Here's a command to check them all quickly: echo $DOTNET_BUNDLE_EXTRACT_BASE_DIR && echo $DOTNET_ROOT && echo $PATH | grep /home/$USER/.dotnet/tools
I'm not sure if this is standard behaviour, but when I run Winetricks > Select default prefix > Run a commandline shell (for debugging) it opens a terminal window under my default username with the same environment variables as my OS, so I think it might matter what your OS environment variables are set to.
@ShaunaTheDead@BloodSlut of course it matters. Environment variables get passed to wine, after which other processes inherit them, simply because they are children of wine. Because wine makes them available to windows calls too, well, you get them in wine processes.
Okay, so there's nothing actually wrong with `DOTNET_BUNDLE_EXTRACT_BASE_DIR', its just that its being inherited from the system and ends up tacked on to the filepath of where the installer executable is.
I think I need to locally clear the env var in the WINE prefix, but I am unsure how.
You be able to just delete the prefix folder and start over. Maybe run echo $GAMEDIR in terminal afterwards to make sure that the GAMEDIR Environment Variable was erased as well.
Another thing I just thought of is that maybe the installer executable isn't being run by the WINE prefix made for the game? It could explain how the path is both pointing to the installer's directory even if outside of the prefix, and why its trying to install dependencies outside of the game's prefix
Can you follow the instructions here to manually install the game and then switch the same WINE prefix to the game executable after the installation is finished. That should guarantee that they're installed on the same WINE prefix.