| Both sides previous revision Previous revision Next revision | Previous revision |
| systems:windows [2024/12/13 09:49] – [Folder compression] rion | systems:windows [2026/01/22 10:28] (current) – Document Wine configuration options with FIXME badges ssokolow |
|---|
| <WRAP center round todo 60%> | <WRAP center round todo> |
| The paths for some Windows components have been updated in v39 or v40. Update them and note the older paths underneath. | Under construction. |
| </WRAP> | </WRAP> |
| |
| |
| <WRAP group> | <WRAP group> |
| |
| <WRAP center round important> | <WRAP center round important> |
| It is recommended to use **btrfs** or **ext4** for ''/userdata/'' as WINE [[https://wiki.winehq.org/FAQ#Does_Wine_run_on_all_Unix_filesystems.3F|explains on their FAQ]] that some games won't run on a non-Linux native file system. Steam games are [[https://developer.valvesoftware.com/wiki/Steam_under_Linux#Wine.2C_Steam_.26_ntfs-3g|notoriously known to be unusable under WINE when using ntfs]]. | It is recommended to use **btrfs** or **ext4** for ''/userdata/'' as WINE [[https://wiki.winehq.org/FAQ#Does_Wine_run_on_all_Unix_filesystems.3F|explains on their FAQ]] that some games won't run on a non-Linux native file system. Steam games are [[https://developer.valvesoftware.com/wiki/Steam_under_Linux#Wine.2C_Steam_.26_ntfs-3g|notoriously known to be unusable under WINE when using the NTFS filesystem]]. |
| </WRAP> | </WRAP> |
| |
| ===== Program files ===== | ===== Program files ===== |
| |
| * ''/userdata/roms/windows/'' : installed windows game (both 32 and 64-bit). | * ''/userdata/roms/windows/'': installed windows game (both 32 and 64-bit). |
| * ''/userdata/roms/windows_installers/'' : ''.iso'', ''.msi'' or ''setup.exe'' used to install games into ''/userdata/roms/windows/''. | * ''/userdata/roms/windows_installers/'': ''.iso'', ''.msi'' or ''.exe'' used to install games into ''/userdata/roms/windows/''. |
| |
| ==== Games coming with an installer ==== | ==== Games coming with an installer ==== |
| * Executable Installers: A ''*.exe'' or ''*.msi'' file, that usually contains "setup" or "install" in the name (in some cases, other files may be bundled with them) | * Executable Installers: A ''*.exe'' or ''*.msi'' file, that usually contains "setup" or "install" in the name (in some cases, other files may be bundled with them) |
| |
| In both cases, those files need to be put into the ''/userdata/roms/windows_installers/'' folder. Once this is done, refresh the gamelist in EmulationStation, then go into the "Windows" system, select "Install a new game", and run the installer. | In both cases, those files need to be put into the ''/userdata/roms/windows_installers/'' folder. Once this is done, refresh the gamelist in EmulationStation, then go into the "Windows" system, select "Install a new game" or select "Windows Install"-system, and run the installer file. |
| | |
| | To make the "Install a new game" visible within the "Windows" system, go to **Main Menu --> Game Collection --> Disable "Don't show groups with only one system"** (This is imho the better option - Windows Installer isn't a real system, even it can be challenging to install some Windows-based games - thank you Mr. Gates) |
| |
| After a screen announcing that the configuration is being made, the installer should open up. It'll look the same way it does inside Windows. | After a screen announcing that the configuration is being made, the installer should open up. It'll look the same way it does inside Windows. |
| | |
| | <WRAP center round tip> |
| | Some installers themselves may require additional dependencies to run. If you're not sure what they are, you could consider running the installer on a real Windows machine and then copying its installed data from that machine directly into ''/userdata/roms/windows/''. |
| | </WRAP> |
| |
| Proceed to install the game in the normal way, as for the installation path, leave it to the default: The virtual ''C:\'' Drive will be located at ''/userdata/roms/windows/<game_name>.wine/drive_c/''. | Proceed to install the game in the normal way, as for the installation path, leave it to the default: The virtual ''C:\'' Drive will be located at ''/userdata/roms/windows/<game_name>.wine/drive_c/''. |
| |
| Once the installation is done, head over to the ''/userdata/roms/windows/<game_name>.wine/'' folder, and edit the ''autorun.cmd'' accordingly. | Once the installation is done, it tries to automatically create the ''autorun.cmd'' file based on the executable files present. If there are several exes or you need to set up command parameters, then head over to the ''/userdata/roms/windows/<game_name>.wine/'' folder, and edit the ''autorun.cmd'' accordingly. |
| |
| <WRAP center round important> | <WRAP center round important> |
| |
| This ''<game name>.wine'' folder is called the wineprefix. | This ''<game name>.wine'' folder is called the wineprefix. |
| | |
| | In Batocera **42 and higher** it is possible to add a save directory argument to specify where that game saves files to in the Wine prefix. These directories will be transferred to ''/userdata/saves/windows/<GAME>'' and are symlinked to the game specific wineprefix. So in case you have to rebuild all wineprefixes (version change for example), your savegames are still available and working. |
| | |
| | Example for a directory: |
| | |
| | SAVEDIR=drive_c/users/root/documents/localappdata/game/ |
| | DIR=drive_c/game |
| | CMD=game.exe |
| | |
| | Example for files (Use '';'' as delimiter): |
| | |
| | SAVEDIR=drive_c/game |
| | SAVEFILES=savefile1.sav;savefile2.save |
| | DIR=drive_c/game |
| | CMD=game.exe |
| | |
| | |
| | There are some additional parameters allowed, ''ENV'' and ''LANG''. The language can be changed per game for WINE. It is needed for certain older Windows Unicode games (mostly Japanese). If not used, games with Unicode filenames may fail to launch, and other games may display text incorrectly. May require additional fonts to be installed via winetricks, depending on the game. Use ''LANG=[language code]''. The ''ENV'' parameter allows the adding of any other parameter, it is quite useful for [[#DLL_Override_Instructions|overridding DLL files]] but read more about in it's chapter section. |
| | |
| | ENV=MESA_EXTENSION_MAX_YEAR=2002 |
| | LANG=ja_JP.UTF-8 |
| |
| <WRAP center round help> | <WRAP center round help> |
| If the path isn't working, try putting ''./'' before the path. Eg. ''DIR=./drive_c/Program Files/xmoto 0.6.1'' | If the path isn't working, try putting ''./'' before the path. Eg. ''DIR=./drive_c/Program Files/xmoto 0.6.1'' |
| </WRAP> | </WRAP> |
| |
| |
| ==== Games that don't need any installation ==== | ==== Games that don't need any installation ==== |
| |
| This ''<game name>.wine'' folder is called the wineprefix. | This ''<game name>.wine'' folder is called the wineprefix. |
| | |
| | ===== Use the WINE.toolbox for setup (v43) and a clean structures ===== |
| | |
| | Please read and understand the text written above as this reflects the basics how to setup WINE games. Since **v43** the process of creating the ''autorun.cmd'', managing prefixes, compressing games, extraction of games is made with more convenience. |
| | |
| | <WRAP group> |
| | <WRAP third left>{{https://up.picr.de/50494488sb.png?nolink&500}}</WRAP> |
| | Press F1 to enter [[ built_file_manager | PCManFM ]] and navigate to ''/userdata/roms/windows''. By making a left mouse click on your windows game folders you can see several commands that will help you to setup and manage all your windows games. |
| | |
| | * Create the ''autorun.cmd'' by selecting a single exe out of list |
| | * List and manage used prefixes for all games, prefixes not bound to a prefix will be selected for deletion. This helps to clean up your prefixes and saves also a lot of space |
| | * You can also symlink a prefix to a default one, this helps if you setted up a working prefix with winetricks |
| | * If you setted up your game it is a good idea to compress/squash it |
| | * Toolbox config lets you open a dialog to set text size |
| | |
| | Some more tricks: |
| | |
| | * Use symlinks for custom runners, so you have installed ''wine-11.0-amd64'' into ''/userdata/system/wine/custom/wine-11.0-amd64'' then you symlink this to ''/userdata/system/wine/custom/gog-wine-11.0-amd64'' this keeps wine prefixes separated. |
| | * winetricks can carry more than one winetrick now, usage ''batocera-wine windows tricks <game.pc/wine> trick1 trick2 ... trick{n}'' |
| | * Some winetricks need a pure 32bit prefix. All prefixes will be installed as 64bit variant. So tick ''Enable 32bit'' within ES Advanced Game Options (This has to be done **before** the prefix is created! If the prefix was created, delete it with the file explorer and start over again |
| | * If you symlink a wine runner you can use ''win32-<wine runner>'' the word ''win32-'' will enable the build of 32bit prefixes if this runner is selected. This also helps to keep things tidy and separated. |
| | </WRAP> |
| |
| ===== Emulators ===== | ===== Emulators ===== |
| | **VIRTUAL DESKTOP ''windows.virtual_desktop''** | Define the resolution and a new dedicated window.\\ => Off ''0'', On ''1''. | | | **VIRTUAL DESKTOP ''windows.virtual_desktop''** | Define the resolution and a new dedicated window.\\ => Off ''0'', On ''1''. | |
| | **ENABLE MOUSE ''windows.force_mouse''** | Show the cursor.\\ => Off ''0'', On ''1''. | | | **ENABLE MOUSE ''windows.force_mouse''** | Show the cursor.\\ => Off ''0'', On ''1''. | |
| | **ENABLE XIM ''windows.allow_xim''** | Enable XIM support. (FIXME what's XIM?)\\ => Off ''0'', On ''1''. | | | **ENABLE XIM ''windows.allow_xim''** | Enable [[https://en.wikipedia.org/wiki/X_Input_Method|XIM]] support. => Off ''0'', On ''1''. | |
| | **NO WRITE WATCH ''windows.no_write_watch''** | Disable support for memory write watches in ntdll. (FIXME what is this used for?)\\ => Off ''0'', On ''1''. | | | **NO WRITE WATCH ''windows.no_write_watch''** | Disable support for memory write watches in ntdll. (Dangerous speed hack. Only for specific game engines which don't need them [[https://github.com/Valloric/proton-ge-custom?tab=readme-ov-file#modification|such as CoreRT]].)\\ => Off ''0'', On ''1''. | |
| | **FORCE LARGE ADDRESS ''windows.force_large_adress''** | Force WINE to run games with large address. (FIXME what is this used for?)\\ => Off ''0'', On ''1''. | | | **FORCE LARGE ADDRESS ''windows.force_large_adress''** | Pretend that 32-bit .exe files have their Large Address Aware flag set. (Grants non-LAA 32-bit games access to as much as 4GiB of RAM instead of 2GiB. May fix OOM crashes or improve performance but could also cause crashes if the game has certain kinds of signed/unsigned sloppiness in its memory handling. Note that upstream Proton considers it safe to have this enabled by default.)\\ => Off ''0'', On ''1''. | |
| | **HEAP DELAY FREE ''windows.heap_delay_free''** | Delay freeing some memory. (FIXME what is this used for?)\\ => Off ''0'', On ''1''. | | | **HEAP DELAY FREE ''windows.heap_delay_free''** | Delay freeing some memory. (Workaround for games with use-after-free bugs (eg. [[https://www.joelonsoftware.com/2000/05/24/strategy-letter-ii-chicken-and-egg-problems/|SimCity for Windows 3.x]]) which would be applied automatically by Windows's bundled AppCompat database.)\\ => Off ''0'', On ''1''. | |
| | **HIDE NVIDIA GPU ''windows.hide_nvidia_gpu''** | Force Nvidia GPUs to always be reported as AMD GPUs. (FIXME what is this used for?)\\ => Off ''0'', On ''1''. | | | **HIDE NVIDIA GPU ''windows.hide_nvidia_gpu''** | Force Nvidia GPUs to always be reported as AMD GPUs. (For games which would otherwise expect nVidia features too new for the Wine/driver/etc. version Batocera uses.)\\ => Off ''0'', On ''1''. | |
| | **ENABLE DEBUG ''windows.wine_debug''** | Enable wine debug. (FIXME be more descriptive)\\ => Off ''0'', On ''1''. | | | **ENABLE DEBUG ''windows.wine_debug''** | Enable wine's debug logging. (Useful for identifying what compatibility settings or winetricks need to be applied or for filing Wine/Proton bug reports.)\\ => Off ''0'', On ''1''. | |
| |
| Advanced options will only be applied on the first launch of the game. Adjusting these values later will not do anything. | Advanced options will only be applied on the first launch of the game. Adjusting these values later will not do anything. |
| [[https://wiki.batocera.org/_media/user:wsquashfs_power-shell_script.zip|wsquashfs_power-shell_script.zip]] | [[https://wiki.batocera.org/_media/user:wsquashfs_power-shell_script.zip|wsquashfs_power-shell_script.zip]] |
| |
| * Extract the file to a folder. | * Extract the files to a folder. |
| * Right click on **CompressFolder.ps1** and choose Run with PowerShell. | * Right click on **CompressFolder.ps1** and choose Run with PowerShell. |
| | |
| | ===== Creating autorun.cmd from SSH ===== |
| | |
| | To create an ''autorun.cmd'' you can manually edit each file or you can type ''batocera-wine windows autorun <GAME.DIR> <DIR_IN_GAME.DIR>''. If you leave both brackets empty then your current directory is used for **<GAME.DIR>** and as well as **<DIR_IN_GAME.DIR>** - so be warned! |
| | |
| | Some examples: |
| | batocera-wine windows autorun "Age of Empires.wine" |
| | batocera-wine windows autorun "Age of Empires.wine" drive_c/P* |
| | batocera-wine windows autorun |
| | |
| | To find the correct **exe**-file batocera-wine can be equipped with a text file that contains regular expression (RegEx) and that will help to **exclude some exe**-files. Ideally we want to find only a single exe because this will lead to an automatic generation (it is same process if you install a Windows Application), if not you can select a file out from a list. If everything is gone well and you found some exe-files the output will likely look like this: |
| | |
| | {{:systems:wine-windows-exe-selection-pr13603.png?400|}} |
| | |
| | The RegEx list can be placed on two locations and has to be named ''autorun-regex.txt''. If you place your strings in both places, only the primary-file one is used! If you want to comment out an expression then use the hashtag literal. |
| | - ''/userdata/system/roms/windows_installers/'' (primary) |
| | - ''/userdata/saves/windows_installers/'' (secondary) |
| | |
| | <code txt [enable_line_numbers="true"]| autorun-regex.txt> |
| | # This is user file to create autorun.cmd by WINDOWS_INSTALLERS or 'batocera-wine windows autorun <GAME_DIR> <PATH_IN_GAME_DIR>' |
| | # Add addition strings, avoid trailing spaces you can comment out values by using # 23.02.2025 crcerror |
| | |
| | # Variation of Uninstaller/Install files |
| | ^.*/.*[sS]etup\.exe$ |
| | ^.*/*.[Ee]ditor.*$ |
| | ^.*/.*[-_\ ][Uu]ninstall\.exe$ |
| | ^.*/[Rr]emove\.exe$ |
| | ^.*/[Uu]nwise[[:digit:]]{0,2}\.exe$ |
| | ^.*/[Uu]ninstall[-_\ ].*\.exe$ |
| | ^.*/.*[Ii]nstall(..)?\.exe$ |
| | |
| | # Supplementary Directories |
| | ^.*/Adobe AIR/.*$ |
| | ^.*/[Uu]install[ers]{0,3}/.*$ |
| | ^.*/InstallShield Installation Information/.*$ |
| | ^.*/InstallShield/.*$ |
| | ^.*/_Redist/.*$ |
| | |
| | # Supplementary Files |
| | ^.*/dpinst\.exe$ |
| | ^.*/[Vv][Cc][\._]?redist[\._]x[86][64]\.exe$ |
| | ^.*/[Qq]uick[Ss][Ff][Vv]\.[Ee][Xx][Ee]$ |
| | |
| | # Cracks/Patches |
| | ^.*/no-cd.*$ |
| | ^.*/[Cc]rack(.)?/.*$ |
| | ^.*/[Pp]atch(..)?/.*$ |
| | </code> |
| | |
| | To automate the process you can use a small script, that automatically searches your Windows-games and calls the script for every single directory. Existing ''autorun.cmd'' files will be renamed to ''autorun.cmd.bak'', ''autorun.cmd.bak.~1~'', etc. |
| | |
| | <code bash| Autoautorun.sh> |
| | #!/bin/bash |
| | readarray -t array < <(find /userdata/roms/windows -mindepth 1 -maxdepth 1 -name "*" -type d) |
| | for i in "${array[@]}"; do |
| | batocera-wine windows autorun "$i" . |
| | done |
| | </code> |
| | |
| ===== Launching a Windows game from SSH ===== | ===== Launching a Windows game from SSH ===== |
| |
| Where ''/userdata/roms/windows/Windlands.pc'' is the path to the game | Where ''/userdata/roms/windows/Windlands.pc'' is the path to the game |
| |
| ===== Advanced ===== | ===== Manually add redistributables, packages and registry entries to your game ===== |
| |
| ==== WINEtricks ==== | Create the folder in the appropriate locations: |
| |
| Some games require tricks to run. For example, Age of King requires directplay for network play (https://appdb.winehq.org/objectManager.php?sClass=version&iId=147). It can be installed automatically thanks to the ''tricks'' command. | ^ Filetype | Install location ^ Backuplocation ^ |
| | | ''.exe'' | /userdata/system/wine/exe | /userdata/system/wine/installed.exe | |
| | | ''.msi'' | /userdata/system/wine/msi | /userdata/system/wine/installed.msi | |
| | | ''.ttf/.ttc'' | /userdata/system/wine/fonts | /userdata/system/wine/installed.fonts | |
| | | ''.reg'' | /userdata/system/wine/regs | /userdata/system/wine/installed.regs | |
| |
| export DISPLAY=:0.0 | Remember: Every installation/adding is logged to ''/userdata/system/wine/imports.log'' |
| batocera-wine windows tricks /userdata/roms/windows/aok.wine directplay | |
| | |
| A list of WINEtricks commands and more detail about using WINEtricks with Batocera is available [[emulators:winetricks|right here]]. | |
| |
| ==== Specify required dependencies ==== | ==== Manually install an exe files ==== |
| |
| The other way to install dependencies inside a WINEprefix is by creating a folder in ''/userdata/system/wine/exe'', and then putting the required executables inside. For 32-bit architectures, install the 32-bit version, and for 64-bit architectures, install both the 32 and 64-bit versions. For each one, a download SSH command will be given. The related licenses for those is https://webpifeed.blob.core.windows.net/webpifeed/eula/aspnetcomponent_rtw_ENU.htm : | To install dependencies inside a WINEprefix, is by creating a folder in ''/userdata/system/wine/exe'', and then putting the required executable files inside. For 32-bit architectures, install the 32-bit version, and for 64-bit architectures, install both the 32 and 64-bit versions. For each one, a download SSH command will be given. Read [[https://webpifeed.blob.core.windows.net/webpifeed/eula/aspnetcomponent_rtw_ENU.htm|here]] the related licenses for those packages. |
| | |
| | --> Common list of redistributable from Batocera server |
| |
| * **DirectX3D** : https://batocera.org/users/liberodark/wine/directx.7z | * **DirectX3D** : https://batocera.org/users/liberodark/wine/directx.7z |
| * ''%%wget -P /userdata/system/wine/exe https://batocera.org/users/liberodark/wine/directx.7z && 7zr x /userdata/system/wine/exe/directx.7z -o/userdata/system/wine/exe && rm /userdata/system/wine/exe/directx.7z%%'' | * ''%%wget -P /userdata/system/wine/exe https://batocera.org/users/liberodark/wine/directx.7z && 7zr x /userdata/system/wine/exe/directx.7z -o/userdata/system/wine/exe && rm /userdata/system/wine/exe/directx.7z%%'' |
| | |
| | <-- |
| | |
| | --> Common list of Visual C++ Redistributable from Batocera server |
| | |
| | * **2015-2022 Visual C++ Redistributable** : |
| | * 32-bit: https://batocera.org/users/liberodark/wine/vcredist_x86_2015_2022.exe |
| | * ''%%wget -P /userdata/system/wine/exe https://batocera.org/users/liberodark/wine/vcredist_x86_2015_2022.exe%%'' |
| | * 64-bit: https://batocera.org/users/liberodark/wine/vcredist_x64_2015_2022.exe |
| | * ''%%wget -P /userdata/system/wine/exe https://batocera.org/users/liberodark/wine/vcredist_x64_2015_2022.exe%%'' |
| |
| * **2015-2019 Visual C++ Redistributable** : | * **2015-2019 Visual C++ Redistributable** : |
| * ''%%wget -P /userdata/system/wine/exe https://batocera.org/users/liberodark/wine/vcredist_x64_2005.exe%%'' | * ''%%wget -P /userdata/system/wine/exe https://batocera.org/users/liberodark/wine/vcredist_x64_2005.exe%%'' |
| |
| Once placing the required ''*.exe'' for the game as described previously, launch the game, and the dependencies will install themselves silently. After closing the game, rename the ''/userdata/system/wine/exe/'' folder to something else, otherwise Batocera will try to reinstall the game each time it is started. | <-- |
| | |
| | Once placing the required ''*.exe''-files for the game as described previously, launch the game, and the dependencies will install themselves silently. After closing the game, the deployed redistributable files will be moved to ''/userdata/system/wine/installed.exe/'' folder. Batocera will never try to reinstall the files again, when the game is started again. You can follow previous installs if you open ''/userdata/system/wine/imports.log'', there you find a log of all installed packages. Place only ''*.exe''-files in the folder named above. |
| | |
| | ==== Manually install a msi file ==== |
| | |
| | To use a Windows Installer package inside your WINEprefix, create a folder in ''/userdata/system/wine/msi'', and then putting the required msi-package inside. Start the game and the dependencies will install themselves. Place only ''*.msi''-files in the folder named above. After finishing the game you will find the used msi-packages in ''/userdata/system/wine/installed.msi'' folder. |
| |
| ==== Manually put a registry file ==== | ==== Manually put a registry file ==== |
| |
| To apply specific registry values for a given game, create a folder in ''/userdata/system/wine/regs/'' and put the registry files (''*.reg'') inside. Once the game is launched, it will import the values contained in this file. Once the game is closed, rename the ''/userdata/system/wine/regs/'' folder to something else, otherwise Batocera will try to re-apply those changes each time the game is started. | To apply specific registry values for a given game, create a folder in ''/userdata/system/wine/regs/'' and put the registry files (''*.reg'') inside. Once the game is launched, it will import the values contained in this file. Place only ''*.reg''-files in the folder named above. Once the game is closed, the used file can be found in ''/userdata/system/wine/installed.regs/''. Batocera will therfore never try to re-apply those files when the game is started. |
| | |
| | Not recommended is to use ''/var/run/rawinput.reg'', this is for developers and after import the file is deleted. |
| | |
| | ==== Manually put a font file ==== |
| | |
| | You can put font-files to folder ''/userdata/system/wine/fonts'', the extensions ''*.ttf'' and ''*.ttc'' are accepted. After the game is started these files will be copied to to Wine-windows-fonts-directory. The installed extensions can be found in ''/userdata/system/wine/installed.fonts'' |
| | |
| | ===== Advanced ===== |
| | |
| | This section talks about some advanced topics: |
| | |
| | - WINE DLL Override Instructions |
| | - Using WINEtricks |
| | |
| | ==== DLL Override Instructions ==== |
| | |
| | This write-up is an excerpt about handling DLL Overrides from Batoceras WINE. Let us start with some background information about DLLs. |
| | |
| | A Dynamic Link Library (DLL) file contains compiled code, data, and resources that can be shared by multiple applications. On Windows, DLL files are typically stored in system folders, but game developers sometimes modify them by adding custom code. These modified DLLs are then placed in the game’s folder with the same name as the original system DLL. |
| | By default, Windows (the OS) prioritizes the DLL located in the game's folder over the one in the system directory. However, **WINE reverses this behavior**: |
| | * it looks for **DLL files in its system directories** at **first** |
| | * then in the **game's folder**, in **second**. |
| | This means WINE may use the default version of a DLL even if a customized version exists in the game's directory. |
| | |
| | To change this behavior in Wine, you can use a **DLL Override**. There are several ways to do this, including through the terminal, but one of the more user-friendly methods is editing the ''autorun.cmd'' by adding the using the ''ENV'' parameter. You can also edit the user.reg file using Notepad++ over a network connection. |
| | |
| | **Adding the ENV parameter** |
| | |
| | - First, add your game to the Batocera system, launch it once and then exit the game back to ES, which will create the required WINE bottle. |
| | - Edit the ''/userdata/roms/windows/<yourGame>.pc/autorun.cmd'' file and add the according ''ENV=WINEDLLOVERRIDES="<NameOfDllFile>"="native"'' |
| | - Do not use the dll-extension, just the plain filename |
| | - ''native'' means to override the DLL |
| | - ''builtin'' use the system DLL |
| | - ''disabled'' does not load the DLL |
| | - Save the file and start the game |
| | |
| | *You can daisychain WINEDLLOVERRIDES like ''ENV=WINEDLLOVERRIDES="msvbvm50,comctl32.ocx=n"'' or''ENV=WINEDLLOVERRIDES="NameOfDllFile1"="native" WINEDLLOVERRIDES="NameOfDllFile2"="native"''* |
| | |
| | **Editing the user.reg file** |
| | |
| | - First, add your game to the Batocera system and launch it once. This will create the required Windows file structure. |
| | - On a PC connected to the same network as your Batocera system, navigate to: ''/share/system/wine-bottles/windows/ge-custom/<game>.pc.wine'' |
| | - Locate the user.reg file in that directory. Right-click it and choose Edit with Notepad++. |
| | - Press Ctrl + F and search for: ''[Software\\Wine\\DllOverrides]'' |
| | - Add your override in this section: |
| | * **Here’s how you can format your override entries:** |
| | * ''"<NameOfDllFile1>"="native,builtin"'' |
| | * ''"<NameOfDllFile2>"="native"'' |
| | * ''"<NameOfDllFile3>"="builtin"'' |
| | * ''"<NameOfDllFile4>"="disabled"'' |
| | * ...and so on. |
| | |
| | Remember, you **DO NOT want to include the file extension in your entry**. For example, if you’re overriding ''ddraw.dll'', then you would simple say ''ddraw'' before the equal sign. |
| | If you're unsure which to use, start with ''"native,builtin"'' and test other options if necessary. |
| | |
| | ==== WINEtricks ==== |
| | |
| | Some games require tricks to run. For example, Age of King requires directplay for network play (https://appdb.winehq.org/objectManager.php?sClass=version&iId=147). It can be installed automatically thanks to the ''tricks'' command. |
| | |
| | export DISPLAY=:0.0 |
| | batocera-wine windows tricks /userdata/roms/windows/aok.wine directplay |
| | |
| | A list of WINEtricks commands and more detail about using WINEtricks with Batocera is available [[emulators:winetricks|right here]]. |
| | |
| | If a game needs several tricks you can add as many trick commands as you like (since v43), so you don't need to call the command every time |
| | |
| | batocera-wine windows tricks /userdata/roms/windows/aok.wine directplay vb5run vb6run |
| | |
| |
| ===== Troubleshooting ===== | ===== Troubleshooting ===== |
| | |
| | Down here there are some tricks to achive a good running on games. It's better to try some procedures written here and then later come back with your outfindigs on discord. A message like **My game isn't working** will not help anyone. Best feedback can be given, if you provide logs (found in ''/userdata/system/logs'') |
| |
| ==== My game isn't working! ==== | ==== My game isn't working! ==== |
| |
| After discovering which [[#wine_configuration|advanced system setting]] adjustment got the game working, be sure to delete its ''saves/windows/<game>'' folder before trying again. | After discovering which [[#wine_configuration|advanced system setting]] adjustment got the game working, be sure to delete its ''saves/windows/<game>'' folder before trying again. |
| |
| If there are still issues, it might be worth checking to see if the [[systems:steam|Steam]] version can be used instead, as that allows the automatic use of Proton which may grant different results. | |
| |
| ==== My application isn't working! ==== | ==== My application isn't working! ==== |
| * Get WINE version for Proton: <code>/usr/wine/proton/bin/wine64 --version</code> | * Get WINE version for Proton: <code>/usr/wine/proton/bin/wine64 --version</code> |
| |
| ==== Custom WINE versions in Batocera? ==== | ==== How to install custom WINE versions/runners in Batocera ==== |
| |
| With v40, you can now install a compatible version of Wine into the folder <code>/userdata/system/wine/custom/</code> | <WRAP center round help> |
| The runner should be in it's own folder, i.e. <code>/userdata/system/wine/custom/Wine-9.4/</code> | With v40 and later, you can now install a compatible version of Wine into the folder ''/userdata/system/wine/custom/''. The runner should be in it's own folder, i.e. ''/userdata/system/wine/custom/Wine-9.4/'' |
| | </WRAP> |
| |
| Batocera EmulationStation will then allow you to choose the runner of your choice. | <WRAP center round tip> |
| | A good resource for WINE-versions: [[https://github.com/Kron4ek/Wine-Builds]] |
| | </WRAP> |
| | |
| | - Create the directory <code>/userdata/system/wine/custom</code> if it doesn't already exist. This can be done using Windows/Samba or Terminal/WinSCP. |
| | - Download the desired WINE-version and unzip and copy them into its own directory like <code>/userdata/system/wine/custom/Wine-9.4</code> This can be done using Windows/Samba or WinSCP. |
| | - Using the Terminal or SSH, navigate to ///userdata/system/wine/custom// using <code>cd /userdata/system/wine/custom</code> |
| | - Set the correct rights for execution of the WINE files using <code>chmod a+x -R *</code> |
| | - Batocera EmulationStation will then allow you to choose the runner of your choice and you should be ready to go. |
| |
| {{:systems:pxl_20240329_043046171.jpg?400|}} | {{:systems:pxl_20240329_043046171.jpg?400|}} |
| |
| The best compatible versions are from [[https://github.com/Kron4ek/Wine-Builds]] | |
| ==== Further troubleshooting ==== | ==== Further troubleshooting ==== |
| |
| For further troubleshooting, refer to the [[:support|generic support pages]]. | For further troubleshooting, refer to the [[:support|generic support pages]]. |
| |