Playing in Linux: Difference between revisions

m
seems like this should be wikilinked too
(oops, the AEI launch process is different now that we're not having the user install a global JRE)
m (seems like this should be wikilinked too)
 
(10 intermediate revisions by the same user not shown)
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 Windows version of the game on Linux using Wine using the below instructions. Installing the [[Anniversary Edition]] is covered as well.
There is no official support for Oni in the Linux OS family. Nevertheless, it is still possible to use Wine to run the Windows version of the game on Linux.
 
==Picking which Oni you want to run==
You essentially have three choices for the version of Oni you want to run:
*{{Hover|Vanilla|text=Vanilla means the game has not been modded.}} Oni + [[Daodan DLL]] patch
*[[Anniversary Edition]] Oni
*[[OniX]]
 
Then look below for the installation method you want to use.


==Using Lutris==
==Using Lutris==
Lutris is a popular GUI for managing games that run through compatibility layers such as Wine.
Lutris is a popular GUI for managing games that run through compatibility layers such as Wine. It supports scripts which will automatically install either vanilla Oni or AE Oni. If those don't work for you, we provide manual instructions for installing the game through Lutris as well.
 
===Installing with a premade script===
Premade install scripts are available from lutris.net for your convenience. They can be viewed and downloaded from [https://lutris.net/games/oni/ their Oni page] or, if you have Lutris installed, you can simply copy-paste one of the links below into your browser and it will offer to open the install script in Lutris. Make sure to have the Oni CD-ROM inserted (or the disk image mounted).
:'''lutris:oni-daodan-dll'''
:'''lutris:oni-anniversary-edition'''
:'''lutris:oni-onix'''
:A vanilla installation is also available at lutris:oni-vanilla but it would require manual patching to be able to run.
 
1. When you click Install to start running the install script, the default directory for the Lutris installation will end in "oni/" for all three patched versions of the game. This will create a naming conflict if you run one version's install script and then also want to install another version of the game. It's better to name the directory "oni-daodan/" or "oni-ae/" or "onix/" to avoid this problem, but if you do use the default directory that the install script suggests, "oni/", you can always change the directory later by right-clicking the entry in your Lutris library, choosing Configure, and using the Move button. Or you could simply not worry about it, use "oni/" for the first version of the game you install, and use a name like the ones above for additional installations, should they occur.
 
2. On the next screen you will be prompted to browse into the CD-ROM directory and find the installer for Oni, typically called onisetup.exe. You will also be prompted to pick the variant of the Daodan DLL to install if you chose the oni-daodan-dll script.
 
3. The game's installer will be launched and you can proceed through the screens as usual; when asked for a destination directory, go with the default of C:\Program Files\Oni – this is a directory internal to the Wine prefix being created, not the actual location on your hard drive, and some of the install scripts expect this path to be used. Make sure to say "No" when the installer asks if you want to run GLSetup.
 
4a. (AE Oni only) After the Oni installer finishes and closes, the AE Setup application will run. The default suggested location of Oni, C:\Program Files\Oni, is correct as long as you didn't change it in step 2. Once the AE Installer is downloaded, it will run and download its core mods, including the Daodan DLL patch which allows Oni to run on modern systems.


===Installing patched vanilla Oni===
4b. (OniX only) After the Oni installer finishes and closes, the OniX install script will launch in a console window. It may have questions for you at the start, but under normal circumstances it will simply run for several minutes. When done, you will be prompted to press any key to close the console window, and then the installation process will be complete.
 
The install scripts will create identically-named entries in the Lutris library for each version of Oni, so you'll need to edit the game's card afterward by right-clicking it, choosing Configure, and then changing its name to something like "Oni AE" which distinguishes it.
 
===Manually installing vanilla Oni===
1. Using the app store in your Linux distro, install Lutris as a Flatpak (not as an RPM, aka System Package).
1. Using the app store in your Linux distro, install Lutris as a Flatpak (not as an RPM, aka System Package).


2. Insert the Oni CD-ROM or mount the disk image.
2. Insert the Oni CD-ROM or mount the disk image.


3. Launch Lutris; first it will need to finish installing the packages that it needs.
3. Launch Lutris; first it will have to finish installing the packages that it needs.


4. Click the + button at top left, then choose "Install a Windows game from an executable". Enter the name of the game in "Game name". The identifier can stay as-is. For "Installer preset", choose "Windows 98 + 3DFX 32-bit" and leave the locale set to System. Click Install.
4. Click the + button at top left, then choose "Install a Windows game from an executable". Enter the name of the game in "Game name". The identifier can stay as-is. For "Installer preset", choose "Windows 98 + 3DFX 32-bit" and leave the locale set to System. Click Install.
Line 28: Line 55:
10. Oni isn't ready to run until we patch it with the Daodan DLL. Right-click the game again and choose "Browse files". You'll find yourself in the Linux file manager looking at a folder probably called "oni". Enter it and drill down to Program Files/Oni/, where the game EXE and GameDataFolder reside. Now that you see the directory where the Daodan DLL needs to go, visit the [[Daodan DLL]] page and follow the instructions there for manual installation. Note that step 5 tells the reader to click on the Oni EXE, but in Linux you'll need to launch the game through Lutris. When launched through Lutris, Oni should now run successfully.
10. Oni isn't ready to run until we patch it with the Daodan DLL. Right-click the game again and choose "Browse files". You'll find yourself in the Linux file manager looking at a folder probably called "oni". Enter it and drill down to Program Files/Oni/, where the game EXE and GameDataFolder reside. Now that you see the directory where the Daodan DLL needs to go, visit the [[Daodan DLL]] page and follow the instructions there for manual installation. Note that step 5 tells the reader to click on the Oni EXE, but in Linux you'll need to launch the game through Lutris. When launched through Lutris, Oni should now run successfully.


==Manual approach==
===Manually installing OniX===
1. Follow the instructions under {{SectionLink||Manually installing vanilla Oni}} through step 9.
 
2. Right-click the Oni installation you added to the Lutris library and choose Duplicate. Name the new copy "OniX".
 
3. Left-click the copy and click the arrow next to the wine glass icon at bottom, then choose Winetricks.
 
4. When the Winetricks GUI appears and asks you to choose the wineprefix, tell it "Select the default wineprefix". On the next screen, make sure that the window title has the correct prefix set; it should be something like /home/you/Games/oni.
 
5. Choose "Install a Windows DLL or component". When presented with a long list, start typing "dotnet". The AE requires .NET 2.0, so select dotnet20. You may receive some error messages that automatically dismiss themselves; do not worry about these. The .NET installer will run invisibly for a while and you will then return to the Winetricks GUI, which you can exit.
 
6. Download the OniX package from the [[OniX]] page and expand the ZIP.
 
7. Back in Lutris, right-click your OniX installation in the library and choose "Browse files". Navigate to Oni's location, e.g. /home/you/Games/oni/drive_c/Program Files/Oni/. Also open the expanded folder with the OniX files and move them into this Oni/ folder.
 
8. Return to Lutris, click the arrow next to the wine glass icon at bottom, then choose "Open Wine console". The console window that pops up should be in the base directory of the Wine prefix, e.g. /home/you/Games/oni, so 'cd' into the actual Oni folder with <code>cd "drive_c/Program Files/Oni"</code>. Next, enter "GameDataConvert.bat" to run the batch script by that name. The script should proceed automatically. When it's done, close the Wine console.
 
9. Now return to Lutris. You're not done yet because this copy of the game is another window into the same Wine prefix as the original, and clicking Play will launch the vanilla Oni installation inside it. Right-click the game entry and choose Configure. Under the "Game options" tab, change the executable from […]/Oni/Oni.exe to […]/Oni/OniX.exe and click Save. You now have a direct way to launch OniX from your Lutris library by simply double-clicking it.
 
===Manually installing AE Oni===
1. Follow the instructions under {{SectionLink||Manually installing vanilla Oni}} through step 9.
 
2. Right-click the Oni installation you added to the Lutris library and choose Duplicate. Name the new copy something like "Oni AE".
 
3. Left-click the copy and click the arrow next to the wine glass icon at bottom, then choose Winetricks.
 
4. When the Winetricks GUI appears and asks you to choose the wineprefix, tell it "Select the default wineprefix". On the next screen, make sure that the window title has the correct prefix set; it should be something like /home/you/Games/oni.
 
5. Choose "Install a Windows DLL or component". When presented with a long list, start typing "dotnet". The AE requires .NET 2.0, so select dotnet20. You may receive some error messages that automatically dismiss themselves; do not worry about these. The .NET installer will run invisibly for a while and you will then return to the Winetricks GUI, which you can exit.
 
6. Download the AE Setup application from the [[Anniversary Edition]] page.
 
7. Back in Lutris, select your "Oni AE" installation in the library. Click the arrow next to the wine glass icon at bottom, then choose "Run EXE inside Wine prefix". In the dialog that pops up, navigate to /home/you/Downloads or wherever you saved the AE Setup application.
 
8. The Setup app should open, asking you to locate the installation of Oni. It should be at the default location of C:\Program Files\Oni. Click Next, accept the default Start Menu folder name with Next, and skip making a desktop shortcut since this is within the Wine prefix. Select "Direct connection" for Internet connection type unless you need to use a proxy, and proceed with the installation. The AEI Updater should open the AE Installer, which will prompt you to initialize the Edition.
 
9. After completing the AE installation, return to Lutris. You're not done yet because this copy of the game is another window into the same Wine prefix as the original, and clicking Play will launch the vanilla Oni installation inside it. Right-click the game entry and choose Configure. Under the "Game options" tab, change the executable from […]/Oni/Oni.exe to […]/Oni/AE/Oni.exe and click Save. You now have a copy of the AE in your Lutris library that you can simply double-click to run.
 
==Using Wine directly==
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).
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).


Line 67: Line 132:
4. Oni should install without problems. When GLSetup runs and offers to install OpenGL, make sure to say '''"No"'''. Creating a desktop shortcut is also pointless because you will need to create your own shortcut that uses Wine (see step E). When the installer closes, you can eject the Oni CD-ROM or un-mount the disk image.
4. Oni should install without problems. When GLSetup runs and offers to install OpenGL, make sure to say '''"No"'''. Creating a desktop shortcut is also pointless because you will need to create your own shortcut that uses Wine (see step E). When the installer closes, you can eject the Oni CD-ROM or un-mount the disk image.


5. <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 Daodan DLL or the AE, so choose your path below: D1 or D2 (they are inter-compatible, so you can both patch your base install of Oni with the Daodan DLL and also install the AE on top of the base install to get a second copy of the game which is patched and also contains mods).
5. <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 next, so choose your path below: D1, D2 or D3 (they are inter-compatible, so you can both patch your base install of Oni with the Daodan DLL or OniX and also install the AE on top of the base install to get a second copy of the game which is patched and also modded).


===D1: Patching Oni with the Daodan DLL===
===D1: Patching Oni with the Daodan DLL===
The Anniversary Edition is not required in order to provide the patch that Oni needs in order to run on modern systems. The AE makes it possible to installs mods in Oni, but the patch comes from the Daodan DLL, an independent fan creation which the AE automatically installs. Go to the [[Daodan DLL]] article and follow the manual installation instructions, substituting the standard path given there for Oni (C:\Program Files\Oni\) for the one you picked in the installer in step C3.
The Anniversary Edition is not required in order to install the patch that Oni needs in order to run on modern systems. The actual patch is the Daodan DLL, an independent fan creation which the AE automatically installs. Go to the [[Daodan DLL]] article and follow the manual installation instructions, substituting the standard path given there for Oni (C:\Program Files\Oni\) with the one you picked in the installer in step C3.


===D2: Patching Oni with the AE===
===D2: Patching Oni with OniX===
If you're not looking for extra features and just want to run Oni on your modern PC, OniX is a solid choice. Download the ZIP from the [[OniX]] page, place the files in your Oni directory, open your terminal app and switch to the Oni directory, and run the following command to perform a one-time conversion of the game data:
: <code>wine cmd.exe /c GameDataConvert.bat</code>
 
===D3: Patching Oni with the AE===
====a: Installing the AE====
====a: Installing the AE====
This is a more complex process which builds a patched copy of Oni on top of a vanilla Oni installation, but it will allow you to install mods.
This is a more complex process which builds a patched copy of Oni on top of a vanilla Oni installation, but it will allow you to install mods.
Line 80: Line 149:
: <code>winetricks</code>
: <code>winetricks</code>


2. Running winetricks without any arguments will launch a GUI. First choose "Select the default wineprefix". On the next screen, make sure that the window title has the correct prefix set. Choose "Install a Windows DLL or component". When presented with a long list, scroll down to the "dotnet" section. The AE requires .NET 2.0, so select dotnet20. When Microsoft .NET Framework 2.0 Setup appears, proceed through the installation normally. You will return to the Winetricks GUI, which you can exit.
2. Running winetricks without any arguments will launch a GUI. First choose "Select the default wineprefix". On the next screen, make sure that the window title has the correct prefix set. Choose "Install a Windows DLL or component". When presented with a long list, start typing "dotnet". The AE requires .NET 2.0, so select dotnet20. When Microsoft .NET Framework 2.0 Setup appears, proceed through the installation normally. You will return to the Winetricks GUI, which you can exit.


2. Download the latest Windows version of the AE Installer, linked from [[Anniversary Edition]].
2. Download the latest Windows version of the AE Installer, linked from [[Anniversary Edition]].
Line 104: Line 173:


===E: Launching patched Oni===
===E: Launching patched Oni===
There are two possible ways to launch Oni:<br>
This depends on which patch you installed.
1. If you installed the AE, launch the game through the AE Installer, which itself is launched using the process in D2(b).


2. If you didn't install the AE, or want to launch the Oni EXE directly without going through the AEI, open a Linux terminal, export the WinXP prefix, navigate to the folder with the patched Oni.exe file, and launch it via Wine:
1. If you installed the AE, you can launch the game through the AE Installer, which you would launch using the process in D3(b). However this takes longer than directly launching AE Oni as seen in step 2, so there's no advantage to this if you aren't in the AE Installer to change your mod loadout.
 
2. If you installed the Daodan DLL or just don't want to launch Oni through the AE Installer, open a Linux terminal, export the WinXP 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>
: <code>cd /full/path/to/folder/with/patched/Oni/EXE</code>
: <code>cd /full/path/to/folder/with/Oni</code>
: <code>wine Oni.exe</code>
: <code>wine Oni.exe</code>


As a shortcut, you can place the above commands into a shell script and then create a desktop file which executes the script (make sure to set both the .sh and .desktop files as executable).
3. If you installed OniX, you don't need a special Wine prefix to launch it because it expects a modern environment, so whether or not you export the WinXP prefix as in step 2, the command to run OniX is:
: <code>cd /full/path/to/folder/with/Oni</code>
: <code>wine OniX.exe</code>
 
As a shortcut, you can place the relevant launch commands into a shell script and then create a desktop file which executes the script (make sure to set both the .sh and .desktop files as executable).


===Troubleshooting===
===Troubleshooting===