Jump to content

Playing in Linux: Difference between revisions

m
placed current instructions under a new section to separate them from the other instructions coming later; added placeholder section for Daodan DLL as reminder for later
m (oops)
m (placed current instructions under a new section to separate them from the other instructions coming later; added placeholder section for Daodan DLL as reminder for later)
Line 1: Line 1:
{{UpdatedForOniX|1.0.0}}
{{UpdatedForOniX|1.0.0}}
{{Hatnote|If you are looking for help running Oni on the Steam Deck, see [[Playing on the Steam Deck]] for much simpler instructions.}}
{{Hatnote|If you are looking for help running Oni on the Steam Deck, see [[Playing on the Steam Deck]] for much simpler instructions.}}
There is no official support for Oni in the Linux OS family. Nevertheless, it is still possible to run the game on Linux. The [[Anniversary Edition]] Installer can be made to run as well.
There is no official support for Oni in the Linux OS family. Nevertheless, it is still possible to run the Windows version of the game on Linux using Wine. The [[Anniversary Edition]] Installer can be made to run as well.


==Installing the needed packages==
==Manual approach==
Rather than using a Wine management GUI such as Lutris or Bottles, you may want to do it yourself by working directly with Wine (this is also a fallback if those tools do not work for you).
 
===Installing the needed packages===
; Wine
; Wine
: A compatibility layer for running Windows applications on a Linux machine.
: A compatibility layer for running Windows applications on a Linux machine.
# Open a Linux terminal and search for Wine packages. You need to know what your package manager is: apk, apt, dnf, emerge, pacman, yum, zypp…. Tell the package manager to search for "wine" and look for a 32-bit Wine package in the results. The package might be called "wine32", "wine32:i386", "wine.i686", etc. If you don't see any of those options, you may need to enable 32-bit architecture with a command such as (in Ubuntu) <code>sudo dpkg --add-architecture i386</code> followed by <code>sudo apt update</code>, then search again. In order to install Wine, the package manager may also need to install a ton of dependencies if this a fairly new Linux install, but it will probably not take too long.
: Open a Linux terminal and search for Wine packages. You need to know what your package manager is: apk, apt, dnf, emerge, pacman, yum, zypp…. Tell the package manager to search for "wine" and look for a 32-bit Wine package in the results. The package might be called "wine32", "wine32:i386", "wine.i686", etc. If you don't see any of those options, you may need to enable 32-bit architecture with a command such as (in Ubuntu) <code>sudo dpkg --add-architecture i386</code> followed by <code>sudo apt update</code>, then search again. In order to install Wine, the package manager may also need to install a ton of dependencies if this a fairly new Linux install, but it will probably not take too long.


; Winetricks
; Winetricks
: A helper app for configuring various parts of Wine-created compatibility environments.
: A helper app for configuring various parts of Wine-created compatibility environments.
# In some distros, Winetricks is installed alongside Wine itself, however it usually needs to be installed as a separate package, so search for "winetricks" and install it if it hasn't already been installed.
: In some distros, Winetricks is installed alongside Wine itself, however it usually needs to be installed as a separate package, so search for "winetricks" and install it if it hasn't already been installed.


You'll need this for installing the Anniversary Edition, if you want it (the game can be patched to run without installing the AE; this is covered below):
; A legacy Java Runtime Environment offline installer for the 32-bit (aka x86) version of Windows XP
; A legacy Java Runtime Environment offline installer for the 32-bit (aka x86) version of Windows XP
:You'll need this for installing the Anniversary Edition, if you want it (the game can be patched to run without installing the AE; this is covered below).
: The maximum compatible version is '''7u65'''. An installer for 7u25 is still hosted [https://javadl.oracle.com/webapps/download/AutoDL?BundleId=78825 here].
: The maximum compatible version is '''7u65'''. An installer for 7u25 is still hosted [https://javadl.oracle.com/webapps/download/AutoDL?BundleId=78825 here].


==Preparing the Wine prefix==
===Preparing the Wine prefix===
# Open a Linux terminal and create a new Wine prefix (an instance of the Wine compatibility environment) with these commands:
# Open a Linux terminal and create a new Wine prefix (an instance of the Wine compatibility environment) with these commands:
#: <code>export WINEARCH=win32</code>
#: <code>export WINEARCH=win32</code>
Line 29: Line 32:
# The "Oni" Wine prefix is now ready. Remember, that in order to run either Oni or the AE Installer, the path to this prefix file must be specified (exported). If it is not specified, then the Wine session will use a default prefix file, one which is probably set to represent 64-bit Windows 7 or 64-bit Windows 10 (which is quite sensible for most applications, but unfortunately not good enough for Oni).
# The "Oni" Wine prefix is now ready. Remember, that in order to run either Oni or the AE Installer, the path to this prefix file must be specified (exported). If it is not specified, then the Wine session will use a default prefix file, one which is probably set to represent 64-bit Windows 7 or 64-bit Windows 10 (which is quite sensible for most applications, but unfortunately not good enough for Oni).


==Installing Oni==
===Installing Oni===
Skip to the next section if you have an existing installation of Oni.
Skip to the next section if you have an existing installation of Oni.
# Mount the disk image for the Oni CD-ROM, or insert your CD-ROM into the disc drive.
# Mount the disk image for the Oni CD-ROM, or insert your CD-ROM into the disc drive.
Line 40: Line 43:
# <u>Don't bother trying to run the game yet.</u> An attempt to run an unpatched copy of Oni on a modern system is almost guaranteed to fail. The game needs to be patched via the AE Installer.
# <u>Don't bother trying to run the game yet.</u> An attempt to run an unpatched copy of Oni on a modern system is almost guaranteed to fail. The game needs to be patched via the AE Installer.


==Installing AE Installer==
===Patching Oni with the Daodan DLL===
[…]
 
===Patching Oni with the AE===
====Installing AE Installer====
This is a rather straightforward process which builds on an Oni installation.
This is a rather straightforward process which builds on an Oni installation.
# Download the latest Windows version of the AE Installer from the Oni Mod Depot ([http://mods.oni2.net/node/79 click here]).
# Download the latest Windows version of the AE Installer from the Oni Mod Depot ([http://mods.oni2.net/node/79 click here]).
Line 49: Line 56:
# During the AE Installer installation, there will be a prompt to provide Oni's installation directory. Navigate to the appropriate directory. Your Linux system's directory tree should be mapped to "/".
# During the AE Installer installation, there will be a prompt to provide Oni's installation directory. Navigate to the appropriate directory. Your Linux system's directory tree should be mapped to "/".
# At the end of the installation, the AE Installer will be automatically executed and will attempt to fetch updates. During the fetching process, it may appear that the AE Installer has hanged, but this is because there is no visual indication that there is work being done in the background. Be patient.
# At the end of the installation, the AE Installer will be automatically executed and will attempt to fetch updates. During the fetching process, it may appear that the AE Installer has hanged, but this is because there is no visual indication that there is work being done in the background. Be patient.
# Remember to follow the instructions within the AE Installer which tell you to hit the Install button at least once, even if you don't select any mods to install.


==Launching AE Installer==
====Running AE Installer====
The AE Installer will be automatically launched after it is installed. However, any other time you want to launch the AE Installer, open a Linux terminal, export the "Oni" prefix, navigate to the folder with the '''AEInstaller2Updater.jar''' file, and launch the .jar file through Wine Java Runtime Environment:
The AE Installer will be automatically launched after it is installed. However, any other time you want to launch the AE Installer, open a Linux terminal, export the "Oni" prefix, navigate to the folder with the '''AEInstaller2Updater.jar''' file, and launch the .jar file through Wine Java Runtime Environment:
: <code>export WINEPREFIX=/full/path/to/prefix</code>
: <code>export WINEPREFIX=/full/path/to/prefix</code>
Line 56: Line 64:
: <code>wine start /ProgIDOpen jarfile AEInstaller2Updater.jar</code>
: <code>wine start /ProgIDOpen jarfile AEInstaller2Updater.jar</code>


==Patching/modding Oni via AE Installer==
===Launching patched Oni===
Simply let the AE Installer do its magic. ^_^
 
==Launching patched Oni==
There are two possible ways to launch Oni:<br>
There are two possible ways to launch Oni:<br>
A. Launch the game through the AE Installer application.<br>
A. Launch the game through the AE Installer application if you installed the AE.<br>
B. Open a Linux terminal, export the "Oni" prefix, navigate to the folder with the patched Oni.exe file, and launch it via Wine:
B. Open a Linux terminal, export the "Oni" prefix, navigate to the folder with the patched Oni.exe file, and launch it via Wine:
: <code>export WINEPREFIX=/full/path/to/prefix</code>
: <code>export WINEPREFIX=/full/path/to/prefix</code>
Line 67: Line 72:
: <code>wine Oni.exe</code>
: <code>wine Oni.exe</code>


==Troubleshooting==
===Troubleshooting===
;Gunfire kills the frame rate
;Gunfire kills the frame rate
Some users experience a large drop in frame rate when certain actions occur such as firing a gun. This is a sound-related bug which indicates that you didn't follow step 3 under "Preparing the Wine prefix" :-) Make sure to install msacm32 with winetricks.
Some users experience a large drop in frame rate when certain actions occur such as firing a gun. This is a sound-related bug which indicates that you didn't follow step 3 under "Preparing the Wine prefix" :-) Make sure to install msacm32 with winetricks.