Page 1 of 3

Running on Linux

Posted: Fri Apr 28, 2023 7:25 am
by Eoin
I think I managed to get Vanguard running in Linux. At least I managed to create a character and spend a minute or two walking around in game. So I will need to spend some more time in game to verify.

With some Google-fu, I managed to find a wine patch at https://pastebin.com/wGJ7yKgS. It was pretty old and "SetCurrentDirectoryW( LPCWSTR dir )" has changed files since then. So I attempted to follow the instructions on https://github.com/GloriousEggroll/wine-ge-custom, but I didn't try to apply the patches Glorious Eggroll does (I code in .NET on Windows, so a lot of new stuff for me to grok). I was able get things to build and the created wine runner worked in Lutris.

Long story short, I came up with this git patch:

Code: Select all

diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index b676c50c416..50c90c9f501 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -2772,6 +2772,16 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetCurrentDirectoryW( LPCWSTR dir )
 {
     UNICODE_STRING dirW;
 
+    WCHAR *p = (WCHAR *)dir;
+    while (*p) p++;
+    {
+        if (*--p == '.') 
+        {
+            *p = '\0';
+            FIXME("%s . fixed\n", debugstr_w(dir));
+        }
+    }
+    
     RtlInitUnicodeString( &dirW, dir );
     return set_ntstatus( RtlSetCurrentDirectory_U( &dirW ));
 }
Which manages to solve the "bin\." issue. So instead of trying to access the shader caches with "bin\.Caches", it uses "bin\Caches". Not sure if it will break anything. Hopefully this information can help someone else or at least help with getting an actual wine contributor to come up with a more proper fix.

Re: Running on Linux

Posted: Fri Apr 28, 2023 9:28 am
by OncaLupe
Nice work! There are a few people in the Discord that have been trying to get VG working on Linux. I don't use Linux myself so I can't help or verify anything, but hopefully this allows others to play on Linux.

Re: Running on Linux

Posted: Sat Apr 29, 2023 5:10 am
by Oranges7
Hi there, Linux user here, thank you for taking a deeper dive and look into this! I have been trying to reach out to members of the Wine, Crossover, Lutris, Bottles communities to get this resolved, so far to no avail. Now this looks like we're heading into the right direction. Who could we reach out to create a simplified launcher for this or who could help implement these changes? Maybe someone could create a launcher for Lutris or Bottles with the changes that you propose? Could Glorious Eggroll be of any help? I always get the game to start and patch fine by installing .NET 4.8 into the Wine prefix the game is using, bypassing the manifest errors, but trying to login after hitting "play" results in a short splash screen + immediate silent crash. So far I thought it might be related to the things mentioned in the troubleshooting guide for Vanguard on Windows, but after trying everything suggested in the official guide, it still crashes in the exact same location.

Cheers

Re: Running on Linux

Posted: Sun May 07, 2023 1:57 pm
by brynnaelf
Tested this fix for hours and it works perfectly. I added the code to wine 7.8 source, then built wine (shared wow64). Wine version was chosen randomly, just avoided 8+ even though it is probably fine as well. I ran everything manually, as it is a test build only and not a suitable binary to upload for others.

Re: Running on Linux

Posted: Sat May 13, 2023 9:06 am
by Oranges7
brynnaelf wrote: Sun May 07, 2023 1:57 pm Tested this fix for hours and it works perfectly. I added the code to wine 7.8 source, then built wine (shared wow64). Wine version was chosen randomly, just avoided 8+ even though it is probably fine as well. I ran everything manually, as it is a test build only and not a suitable binary to upload for others.
Hey there, that sounds great! Any chance you guys could make a custom build or runner of this and share it via Lutris, Bottles, Crossover or anything else? Also, any tips on how to make this work for Steam's Proton (maybe via ProtonGE)? Ty

Re: Running on Linux

Posted: Fri May 19, 2023 11:31 am
by brynnaelf
Oranges7 wrote: Sat May 13, 2023 9:06 amHey there, that sounds great! Any chance you guys could make a custom build or runner of this and share it via Lutris, Bottles, Crossover or anything else? Also, any tips on how to make this work for Steam's Proton (maybe via ProtonGE)? Ty
Sure, any patched wine version will work. You can use custom runners with lutris, bottles, etc. For proton one would just have to patch the proton source or ProtonGE as you mentioned.

Re: Running on Linux

Posted: Sun May 21, 2023 2:11 am
by Techwizz
I made a custom Proton-GE build with the patch applied. The first 2 times I opened the game, it crashed, but ever since those 2 it has been working flawlessly. So I would love for some of you to test it out

Here's how to install my build

Code: Select all

wget https://techwizz-emu.com/downloads/GE-Proton-8-3-VGO.tar.gz
mkdir -p ~/.steam/root/compatibilitytools.d
tar -xf GE-Proton-8-3-VGO.tar.gz -C ~/.steam/root/compatibilitytools.d
Then simply restart Steam, after that you click to add a non-steam game then browse. Click to show all file types. Browse to the VGOLauncher exe and add that. Right click and force compatibility tool then select GE-Proton-8-3-VGO. I would not recommend setting it as your main Proton because it could easily not work so well for other games.

I may also make a Lutris WINE build if there is interest. Let me know if you'd like to see that! Thanks and have fun playing VGO on Linux finally.

Re: Running on Linux

Posted: Tue May 23, 2023 7:29 am
by nPegler
Any required winetricks or protontricks?

Re: Running on Linux

Posted: Tue May 23, 2023 9:05 pm
by Techwizz
nPegler wrote: Tue May 23, 2023 7:29 am Any required winetricks or protontricks?
Nope, just install the custom build of Proton, that's it.

Re: Running on Linux

Posted: Thu May 25, 2023 3:46 pm
by Oranges7
Techwizz wrote: Sun May 21, 2023 2:11 amI may also make a Lutris WINE build if there is interest. Let me know if you'd like to see that! Thanks and have fun playing VGO on Linux finally.
*raises hand* I would love to have a simple to use method via Lutris, Bottles, Crossover if anyone feels up to the challenge or if anyone can spare the free time. Ideally both Bottles and Lutris could use the custom build for the tweaks you guys have made, if possible. I will gladly test it this way, everything else from source is a bit difficult rn now due to time constraints. I have a copy of Dark Messiah of Might & Magic and Hydrophobia: Prophecy on Steam, willing to gift these to the person who can make the requested builds available for all of us via Lutris or / and Bottles. :)

Cheers