bakkesmodorg / BakkesMod2-Plugins

Default plugins for BakkesMod 2 (A Rocket League training framework)
http://bakkesmod.com
96 stars 23 forks source link

Linux compatibility #2

Open pepinpin opened 5 years ago

pepinpin commented 5 years ago

Hi, now that steam is fully and properly supported on Linux, any plans on bringing this awesome mod on it ?? I m dying to get better at RL and I m sure your mod is the perfect tool for it

Thx in advance

DatL4g commented 4 years ago

Any progress on this @Bakkes ?

d2vydov commented 4 years ago

Bump, Mac OS support also will be so awesome

DatL4g commented 4 years ago

Since Rocket League can only be used with Proton without restrictions, you can theoretically start BakkesMod with protontricks.

Usage

Step 1

Installs winetricks and protontricks

Step 2

Install Visual C++ Redistributable Packages by executing:

$ protontricks 252950 vcrun2019

This installs the VCRedist Packages 2015 - 2019

Step 3 (maybe optional)

This step depends on wether you use Proton 5 (or higher) or not. If you use Proton >5.0 this is no longer needed.

Setting Runtime Configuration Options for Rocket League to use D9VK. This can be done by configuring Properties and set Launch Options to

PROTON_USE_D9VK=1 %command%

Step 4

Start Rocket League and wait till it's loadded then run BakkesMod using protontricks

$ protontricks -c 'wine path/to/bakkesmod/BakkesMod.exe' 252950

Maybe use WINEFSYNC or WINEESYNC according to your configuration.

$ WINEFSYNC=1 protontricks -c 'wine path/to/bakkesmod/BakkesMod.exe' 252950 $ WINEESYNC=1 protontricks -c 'wine path/to/bakkesmod/BakkesMod.exe' 252950

However

When I press F2 the game gets totally black and I can't use it.

Issue created here

DatL4g commented 4 years ago

I got BakkesMod fully working after @Bakkes mentioned that Proton is using a diffrent d3dcompiler.lib

Thanks for that by the way

Additional Step

After following my above steps, you have to set a launch option for Rocket League to use the OpenGL-based wined3d.

PROTON_USE_WINED3D=1 %command%

How to use this is described in step 3

However

It's very laggy when you enable this

BishopT commented 4 years ago

Hi, I encounter same assertion failed even with the additional step. I just get a frozen screen instead of black screen. Any clue? How can I check the RL launch option is well taken into account? How can I check that it uses the right d3dcompiler.lib?

DatL4g commented 4 years ago

@BishopT If you follow my steps exactly you will get it to run but it is practically useless as it is extremely laggy.

Justkant commented 4 years ago

I can confirm that, even with the additional step, I still encounter the assertion failure described in https://github.com/bakkesmodorg/BakkesModInjectorCpp/issues/8

I can also say that while running on Gnome using X, and trying to run rocket league with the OpenGL-based wined3d, I don't get the very laggy behavior that @DATL4G talk about.

But when using Gnome with Wayland I get the laggy behavior and I can only start rocket league with the OpenGL-based wined3d (if not the game won't start, probably related to dx11 with xwayland, haven't tried PROTON_USE_D9VK=1 %command%, F2 did nothing too, no crash & no window).

Also while using no launch option in X, after injecting the mod, the game always crash and will only work if I use PROTON_USE_WINED3D=1 %command% (and with no lag) to inject the mod.

Linux: 5.6.10-arch1-1 Nvidia: 440.82 Proton: 5.0-7 Gnome: 3.36.2

BishopT commented 4 years ago

@DATL4G I followed steps described here so same steps but vcrun2017 has been installed instead of vcrun2019. Then added PROTON_USE_D9VK=1 %command% in RL launch options

The game is not laggy even with PROTON_USE_D9VK=1 %command%

Linux 5.3.0-51-generic GTK 3.22.30 Nvidia 435.21 Proton 5.0-7

DatL4g commented 4 years ago

@BishopT D9VK launch option is no longer needed in Proton >5.0 Instead follow my additional step.

I'll send my protontricks configuration later.

BishopT commented 4 years ago

My bad, I wanted to say PROTON_USE_WINED3D=1 %command%. Just copy-paste wrong text 😬

DatL4g commented 4 years ago

@BishopT @Justkant Here my additional protontricks configuration

Setup

Run protontricks 252950 --gui to get a GUI for your Rocket League protontricks configuration Choose Default Prefix

Installed DLLs

Installed Fonts

Linux 5.4.0-7626-generic Nvidia 440.82 Proton 5.0-7 Gnome 3.36.1

DatL4g commented 4 years ago

I created a post on Reddit in which everything is explained again and how to work around the performance problem

BishopT commented 4 years ago

Works like a charm with GloriousEggroll's proton! Thank you @DATL4G for spotting that one

And many thanks to all the people who contributed to that version :)

kescherCode commented 3 years ago

Ever since EGS support was introduced, suddenly, I get this dialog on injection (for the Steam version!): image Note both x86 and x64 versions of vc_redist are installed in the prefix.

image

Here's a version info screenshot, in case something's off there image

Here's the injector log, if that is of any use. injectorlog.log I wonder what the hell is happening between the last line and the one before it in this excerpt, considering the exit code indicated there is 0:

2021-01-20 00-50-27.320 [Info] (IsSafeToInject) Steam is ready!
2021-01-20 00-50-27.337 [Info] (TimerTimeout) Rocket league process ID is 188
2021-01-20 00-50-27.337 [Info] (SetState) Switching from BAKKESMOD_IDLE (1) to INJECT_DLL (9)
2021-01-20 00-50-32.338 [Info] (TimerTimeout) Trying to inject C:\users\steamuser\Application Data\bakkesmod\bakkesmod/dll\bakkesmod.dll
2021-01-20 00-50-32.474 [Info] (TimerTimeout) Already injected check: 0
2021-01-20 00-50-32.485 [Info] (GetPlatform) Z:\mnt\data\kescher\Steam\steamapps\common\rocketleague\Binaries\Win64\RocketLeague.exe || 0000000140000000
2021-01-20 00-50-32.486 [Info] (DetectRocketLeagueFolder) Could not find steamapps folder, detected 0000000001BA6E80
2021-01-20 00-50-32.486 [Info] (GetSteamRocketLeagueDirFromLog) Found RL dir from log: Z:\mnt\data\kescher\Steam\steamapps\common\rocketleague\Binaries\Win64\
2021-01-20 00-50-32.486 [Info] (GetSteamInstallLocation) Automatically detected Rocket League path using log: "Z:\\mnt\\data\\kescher\\Steam\\steamapps\\common\\rocketleague\\Binaries\\Win64\\"
2021-01-20 00-50-32.486 [Info] (GetSteamVersion) Looking for steam manifest in Z:\mnt\data\kescher\Steam\steamapps\common\rocketleague\Binaries\Win64\..\..\..\..\appmanifest_252950.acf
2021-01-20 00-50-32.486 [Info] (GetSteamVersion) Path contains a manifest file
2021-01-20 00-50-32.486 [Info] (GetSteamVersion) Steam buildID 6066322
2021-01-20 00-50-32.486 [Info] (IsSteamVersionReady) Test 6066322
2021-01-20 00-50-32.486 [Info] (IsSteamVersionReady) Comparing steam buildid 6066322 to 6066322
2021-01-20 00-50-32.505 [Info] (InjectDLL) GetExitCodeThread(): 0
2021-01-20 00-50-32.505 [Info] (InjectDLL) Last error: 0
2021-01-20 00-50-32.636 [Info] (SetState) Switching from INJECT_DLL (9) to INJECTION_FAILED (11)
Mistra commented 3 years ago

@kescherCode Confirmed, i have the same exact problem with the same (pointless) log. I've installed the redist both from ms site and from the protontricks console. Tomorrow I'll keep on digging.

JokerGermany commented 3 years ago

Didn't have this issue, i only can't use the autouploader Feature, because of a "FIX" which they released...

Would be nice if they would develop against the wine sdk. Then it would work on windows and every os which is supported by wine... Wouldn't be more work, but then it would work on linux, too...

eren-kemer commented 3 years ago

Didn't have this issue, i only can't use the autouploader Feature, because of a "FIX" which they released...

Would be nice if they would develop against the wine sdk. Then it would work on windows and every os which is supported by wine... Wouldn't be more work, but then it would work on linux, too...

Do you happen to know which date/release this first started not working anymore? Are there any log entries for the issue? Maybe i could take a look.

JokerGermany commented 3 years ago

@eren-kemer Something around 2020-12-02 https://www.reddit.com/r/bakkesmod/comments/k45z46/crashing_when_game_ends/geeje0c?utm_source=share&utm_medium=web2x&context=3

This should be this commit: https://github.com/bakkesmodorg/AutoReplayUploader/commit/6638caf646f2e303eb736b5f72a16c8a02361415 It fixes the crash of the game, but they seems to have implemented a hard coded \

kentslaney commented 3 years ago

Any progress @Mistra @kescherCode? I'm running into the same error and I've tried everything I can think of. I also ran into this issue on the way, though I'd be surprised if it's relevant to this one. Also I recently enabled AMD SVM, though, again, I doubt it's related.

kescherCode commented 3 years ago

@kentslaney No, still no progress. None of the things you mentioned should make a difference (vcrun2015 is not an issue here, and I use an Intel CPU)

kentslaney commented 3 years ago

@kescherCode Sorry, with AMD SVM I just meant that I have hardware emulation enabled, which changes how instruction addressing happens in (particularly 64 bit) virtual environments. I know Wine Is Not an Emulator and it does on the fly conversion, but I wasn't sure if it might quietly enable some optimization that BakkesMod isn't expecting.

Edit: turned it off and the bug still happens

blastrock commented 3 years ago

I'd really like this to work too. I investigated this last error a bit about the injection failing because of vcredist. It looks like for some reason the injection from bakkesmod.exe always fails. I have written my own injector (by copy-pasting pieces from bakkesmod) and used that instead.

I can confirm that the injection is indeed successful from wine logs. Also, starting bakkesmod.exe after this injection makes it say that everything is alright and you need to press f2.

Now the issue is that I get a black screen in the game as soon as inject the dll. The game is still running, making sounds and responding to inputs, but the screen is black.

Btw, I'm using the epic version of the game on Proton 5.13. You can find my dll injector here: https://gist.github.com/blastrock/6958033f03a0bdffa52c6dfa2ce0e60a in case someone wants to take this further. If someone has a hint or two to debug this blackscreen, please do tell :)

kescherCode commented 3 years ago

@blastrock the blackscreen issue has always been the case, and you need to use a custom Proton version for this not to happen (proton-ge-custom, wine-tkg-git proton, ...)

sadn1ck commented 3 years ago

can confirm, @blastrock 's method worked for me with proton-tkg 6.5, had to update a few commands (was getting winpthread dll error, so had to add -static flag)

https://gist.github.com/sadn1ck/d68cfdc28067b329bc82e7f80ab0b71e

blastrock commented 3 years ago

Thanks @kescherCode . I didn't know these forks of proton, I haven't got time to test one yet, but I will definitely do.

@sadn1ck thanks for testing! So this injector does work for other people than me.

Now I'm not sure what to conclude from that. I really wrote that by copy pasting code from bakkesmod, so it should do pretty much the same thing. The only difference I noticed is that bakkesmod uses a Windows path with a mix of / and \ like C:\users\steamuser\Application Data\bakkesmod\bakkesmod/dll\bakkesmod.dll (taken from injectorlog.log) and my injector uses a full unix path. I'll try to patch my injector with the same Windows path to see how it behaves and if it's the source of the problem. Or if you are motivated @sadn1ck please go ahead :)

ayush123460 commented 3 years ago

@blastrock on the recommendation of @sadn1ck i have tried the same injector of yours by changing the rocket league path (i'm using the epic launcher through lutris due to steam issues) with wine-tkg, and can confirm it works. I don't believe it's a problem caused by the injector. However, I do believe you should try the staging build of wine if you're unsure about a fork.

blastrock commented 3 years ago

Ok, I just tested again with proton ge, it does work! Thanks!

I also tested replacing the path with a Windows path as I said just before, but the injector still works. I can't explain why the official injector doesn't work.

kentslaney commented 3 years ago

Thanks @blastrock! I got it working on Ubuntu 20.04, Proton GE 6.5 r2, command sequence looked roughly like:

sudo apt install mingw-w64
mkdir -p ~/Games/bakkes
cd ~/Games/bakkes
curl -LO https://gist.githubusercontent.com/blastrock/6958033f03a0bdffa52c6dfa2ce0e60a/raw/1e9f4208eac9f8392e670f9465b3fae3b8503645/inject.cpp
curl -LO https://github.com/bakkesmodorg/BakkesModInjectorCpp/releases/download/1.9.5/BakkesModSetup.exe
curl -LO https://github.com/bakkesmodorg/BakkesModInjectorCpp/releases/download/1.9.5/BakkesModInjectorWin7.zip
unzip BakkesModInjectorWin7.zip
# run setup if not already done to create the dll
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 /home/$USER/Games/bakkes/BakkesModSetup.exe' 252950
# update the ws variable in wmain on line 115 of inject.cpp using the output from this:
find ~/.steam/steam/ -name bakkesmod.dll
x86_64-w64-mingw32-c++ -I/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib inject.cpp -municode -std=c++17 -static-libgcc -static-libstdc++ -static -o inject.exe
# actual command
WINEESYNC=1 WINEPREFIX=/home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/ WINEPATH=/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib ~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 inject.exe
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 /home/$USER/Games/bakkes/BakkesMod.exe' 252950

(This is a guide not a script, doesn't really copy/paste)

mgalgs commented 3 years ago

Thanks @kentslaney . Where does the dll end up during the BakkesModSetup.exe step? I'm running:

WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 /home/mgalgs/src/bakkesmod-on-arch-gist/BakkesModSetup.exe' 252950

but it's just exiting with no output and a return code of 0. Can't find the dll in any of these places:

find ~/.steam/steam/ -name bakkesmod.dll
find /opt/steam/steamapps/compatdata/252950/pfx/drive_c -name bakkesmod.dll

Also, what path are you hard-coding in inject.cpp (ws variable in the wmain function)? Guessing that needs to point to the actual dll on your system?

kentslaney commented 3 years ago

@mgalgs for me it's /home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/drive_c/users/steamuser/Application Data/bakkesmod/bakkesmod/dll/bakkesmod.dll, also apparently you need to run both the last two commands each time, not just the last one. ~The find didn't catch it because ~/.steam/steam is a link.~ Actually you included the trailing slash, so I'm not sure anymore.

kentslaney commented 3 years ago

@mgalgs That's embarrassing, turns out I forgot to add the "follow redirects" flag to cURL, and didn't notice because I constructed that part backwards and didn't fully wipe my working wine env so my original dll was still there. To be honest I'm surprised I didn't notice because the unzip should have failed too. I've edited my comment.

jakhh8 commented 3 years ago

I have tried to follow the steps @kentslaney used but when i try to open rocket league, it doesn't work. It opens the wine server but it doesn't open a rocket league window. I then tried opening rocket league and then the injector.exe but it had a floating point exception. Does anyone have any idea how to fix this, or if i did something wrong

kentslaney commented 3 years ago

@jakhh8 you should be able to open rocket league using Proton GE 6.5 r2 before following any of my steps. Set launch options to PROTON_LOG=1 %command% and check the log output for errors.

jakhh8 commented 3 years ago

@kentslaney when i try to run WINEPREFIX=/home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/ WINEPATH=/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib ~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine inject.exe it outputs fish: Job 1, 'WINEPREFIX=/home/$USER/.steam/s…' terminated by signal SIGFPE (Floating point exception) to the terminal if i have the game open while doing so.

jakhh8 commented 3 years ago

@kentslaney I can open the game without any of the bakkesmod stuff without errors but when i try to open injector.exe it just crashes with the previously mentioned error.

blastrock commented 3 years ago

I have updated my gist. I put the command to compile a static binary as @sadn1ck does in his gist.

@jakhh8 you may try that instead, but it's just a shot in the dark. There are no floating point arithmetic or divisions in the program, so I can't see why it would trigger a SIGFPE. Maybe the WINEPATH isn't the correct one, so the static compilation may fix that since you won't need a WINEPATH then.

jakhh8 commented 3 years ago

@blastrock I figured out the SIGFPE, it was coming from wine because I used WINEESYNC instead of WINEFSYNC(i'm a moron). I have compiled injector with your updated flags, but now it says GetExitCodeThread(): 0 Last error: 0 however it doesn't work, and bakkesmod says i need to download vc_redist.x64.exe

blastrock commented 3 years ago

Bakkesmod says that when the dll failed loading, but we can't have the real error due to how the injection is done.

If you're sure vc_redist is installed, you can try running rocketleague with WINEDEBUG=+loaddll, try injecting the dll, and then look at the wine logs from rocketleague for the actual error.

jakhh8 commented 3 years ago

Thank you for your help, the last problem was also just a stupid mistake by me, I mispelled compatdata in the ws string in injector.cpp

kescherCode commented 3 years ago

Following the guide with Proton-GE 6.8, I had to move the "Bakkes" folder to inside the Rocket League wine prefix, otherwise it wouldn't launch. I moved it to C:\Bakkes within the prefix.

huebleruwm commented 3 years ago

Thanks @blastrock! I got it working on Ubuntu 20.04, Proton GE 6.5 r2, command sequence looked roughly like:

sudo apt install mingw-w64
mkdir -p ~/Games/bakkes
cd ~/Games/bakkes
curl -LO https://gist.githubusercontent.com/blastrock/6958033f03a0bdffa52c6dfa2ce0e60a/raw/1e9f4208eac9f8392e670f9465b3fae3b8503645/inject.cpp
curl -LO https://github.com/bakkesmodorg/BakkesModInjectorCpp/releases/download/1.9.5/BakkesModSetup.exe
curl -LO https://github.com/bakkesmodorg/BakkesModInjectorCpp/releases/download/1.9.5/BakkesModInjectorWin7.zip
unzip BakkesModInjectorWin7.zip
# run setup if not already done to create the dll
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 /home/$USER/Games/bakkes/BakkesModSetup.exe' 252950
# update the ws variable in wmain on line 115 of inject.cpp using the output from this:
find ~/.steam/steam/ -name bakkesmod.dll
x86_64-w64-mingw32-c++ -I/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib inject.cpp -municode -std=c++17 -static-libgcc -static-libstdc++ -static -o inject.exe
# actual command
WINEESYNC=1 WINEPREFIX=/home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/ WINEPATH=/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib ~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 inject.exe
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 /home/$USER/Games/bakkes/BakkesMod.exe' 252950

(This is a guide not a script, doesn't really copy/paste)

Got it working with pretty much these steps. But had to use the newer revision of inject.cpp, so download it with curl -LO https://gist.githubusercontent.com/blastrock/6958033f03a0bdffa52c6dfa2ce0e60a/raw/inject.cpp instead and don't edit it. Also I just used the BakkesMod.exe that was put into the prefix's drive_c by the installer, so I didn't need the windows 7 version at all.

So this is what got it working for me, using Proton-6.8-GE-2 and the steam version of RL

# install  mingw-w64 to compile inject.cpp
sudo apt install mingw-w64

# make a directory to work in
mkdir -p ~/Games/bakkes
cd ~/Games/bakkes

# download the injector and bakkesmod setup
curl -LO https://gist.githubusercontent.com/blastrock/6958033f03a0bdffa52c6dfa2ce0e60a/raw/inject.cpp
curl -LO https://github.com/bakkesmodorg/BakkesModInjectorCpp/releases/download/1.9.5/BakkesModSetup.exe

#go through installation process, it should install in the same prefix that RL is in and detect it 
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.8-GE-2/files/bin/wine64 /home/$USER/Games/bakkes/BakkesModSetup.exe' 252950

# compile the injector
x86_64-w64-mingw32-c++ -I/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib inject.cpp -municode -std=c++17 -static-libgcc -static-libstdc++ -static -o inject.exe

Now all that above only needs to be done once, these two command I use to start bakkesmod. I put them in a script and just run it after I've already opened rocket league.

# inject the dll by calling the compiled inject.exe
WINEESYNC=1 WINEPREFIX=/home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/ WINEPATH=/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib ~/.steam/steam/compatibilitytools.d/Proton-6.8-GE-2/files/bin/wine64 /home/$USER/Games/bakkes/inject.exe &

# open bakkesmod, it should detect that the injection is complete and you should be able to hit F2 in RL
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.8-GE-2/files/bin/wine64 /home/$USER/Steam/steam/steam/steamapps/compatdata/252950/pfx/drive_c/Program\ Files/BakkesMod/BakkesMod.exe' 252950 &

I ran into the vc_redist error and couldn't make any progress, eventually found this thread. Tried switching the windows version in the winecfg to 7 and 10, tried installing only vcrun2017, and some other suggestions I found that didn't work. So thank you for working around this with the injector @blastrock, twas a massive help.

I tried making a script to open rocket league, wait for it to open, then inject the dll and open bakkesmod, then wait for rocket league to close, then close bakkesmod. So that I could call that in steam instead, and it would all open and close RL and bakkesmod together. But when I did that rocket league would always crash, it seemed like rocket league needed to be fully open and basically at the start screen before injecting the dll and opening bakkesmod. I added a delay from when it opened to injected and that fixed it, but that's a lame solution. So if anyone has a better idea that would be appreciated.

JokerGermany commented 3 years ago

@eren-kemer Something around 2020-12-02 https://www.reddit.com/r/bakkesmod/comments/k45z46/crashing_when_game_ends/geeje0c?utm_source=share&utm_medium=web2x&context=3

This should be this commit: bakkesmodorg/AutoReplayUploader@6638caf It fixes the crash of the game, but they seems to have implemented a hard coded \

I changed to a newer Proton-GE Version, and now it's uploading again =)

kentslaney commented 3 years ago

@huebleruwm When I did that bakkesmod just claimed the mod was out of date if it started too early. Also, using the script from the wiki page to close them at the same time seemed to be correlated with my game eventually freezing which is why I abandoned it. My guess is keeping the separate ESYNCed process open for long periods of time caused it, but I haven't bothered to look into it too far.

Anyway, if you wanted to avoid a manual delay you could specify PROTON_LOG=1 and grep through the log output for a line that works empirically. You could probably close out BakkesMod once it finishes injecting using a similar method so it doesn't stay open the whole time.

While I'm here, I'll recommend the only interesting part of my script, which was specifying launch options as "/path/to/script.sh" %command% then beginning the script with exec "$@" & so you don't have to hard code the launch command.

kentslaney commented 3 years ago

@huebleruwm actually I just wrote it myself

#!/bin/bash
# set launch options to `"/path/to/this/script.sh" %command%`
# put any other launch options before `%command%` like normal
echo "" > ~/Games/steam-252950.log
eval "PROTON_LOG=1 PROTON_LOG_DIR=/home/$USER/Games $@" &

while ! grep "Initializing Engine Completed" ~/Games/steam-252950.log > /dev/null; do
    sleep 1
done

WINEESYNC=1 WINEPREFIX=/home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/ WINEPATH=/usr/x86_64-w64-mingw32/include\;/usr/x86_64-w64-mingw32/lib ~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 ~/Games/bakkes/inject.exe
WINEESYNC=1 protontricks -c '~/.steam/steam/compatibilitytools.d/Proton-6.5-GE-2/dist/bin/wine64 /home/$USER/Games/bakkes/BakkesMod.exe' 252950 &

bakkeslog="/home/$USER/.steam/steam/steamapps/compatdata/252950/pfx/drive_c/users/steamuser/Application Data/bakkesmod/bakkesmod/bakkesmod.log"
echo "" > "$bakkeslog"
while ! grep "BakkesMod initialized" "$bakkeslog" > /dev/null; do
    sleep 1
done
killall BakkesMod.exe
huebleruwm commented 3 years ago

@kentslaney Great idea and great script! All I had to do was change the paths and it worked perfect. I didn't even know you could close bakkesmod and still have it work, never would've thought to try.

blastrock commented 3 years ago

I am not sure why you guys start BakkesMod.exe. The only use I have for BakkesMod.exe is to update the dll. Just running inject.exe should give access to all of the features.

Or maybe it does something else that I didn't know about?

kescherCode commented 3 years ago

@blastrock I run it to update the dll. I even added a small feature to my launch script where it does not inject, only launches BakkesMod.exe so it can update itself in case a new version is available.

kentslaney commented 3 years ago

@blastrock Oh I just didn't know, honestly not quite sure how I ended up with both. I guess I'll keep it for the sake of updating, it's generally killed pretty quickly.

JokerGermany commented 3 years ago

This is my start/stop script: https://bakkesmod.fandom.com/wiki/Running_in_Linux_/_Steam_Proton#Script

kentslaney commented 3 years ago

@JokerGermany Does that still work? It doesn't mention the inject.cpp and bakkesmod fails to inject for me if I start it immediately when RocketLeague.exe starts