The Launcher Installs WeMod
This is probably the most complex part of wemod-launcher. In essence this:
- Downloads WeMod
- Copies working prefixes for WeMod to run
- Builds the prefix for WeMod to run
- For this it also grabs winetricks
- Or downloads the prefix for WeMod to run
- For this the closest online version to the active Proton version will get downloaded
- Syncs the WeMod data (for example login data)
- Can also zip a prefix so it can be uploaded
Let’s look at all this:
- We check if the prefix is a wemod-launcher prefix.
- This info is easy to get since the prefix will have a file named
.wemod_installerin the same folder where the drive_c folder is located. So it’s inside the prefix if wemod-launcher was previously added. - If this file is found, we are done with the prefix install, so now we install WeMod and sync the WeMod data folder into the script folder. So we will then continue with: Docs: Download EXE and Sync Data
- If this file is missing the interesting part starts.
- To install the prefix, the wemod-launcher script
will scan the entire parent dir of the base folder.
This is in hopes of finding a prefix in that folder
that has this magic
.wemod_installerfile. - If we find a folder that has this file,
then we copy the folder to the prefix we want to install the prefix on.
So we copy the working prefix to the new game prefix.
At this point we are also done with the prefix —
the
.wemod_installerwas also copied over after all. So we continue right here: Docs: Download EXE and Sync Data - But if we do not find anything we have 2 options:
- Download a WeMod-ready prefix that’s uploaded on GitHub.
- Or build the prefix
- If Download is selected we just download a fitting version from GitHub and unpack the prefix into the game.
- Now we have the
.wemod_installerfile and are done with the prefix so we go to: Docs: Download EXE and Sync Data - If Building was selected we install winetricks
- So we now run
winetricks -b sdl cjkfonts vkd3d dxvk2030 dotnet48This will install all dependencies of WeMod to the game prefix. - After this was successful we add the
.wemod_installerfile to mark WeMod as installed. Now since the prefix is done, we go to: Docs: Download EXE and Sync Data