Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the game work on Linux with Steam integration #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romlok
Copy link

@romlok romlok commented Jun 12, 2021

This adds a small script, and the love, libluajit.so, and luasteam.so binaries (64-bit) to get the game working under Linux, with the Steam integration intact (achievements, at least).

I wasn't really sure where to put the files I added, so feel free to rearrange or reimplement as appropriate!

I copied the included love and libluajit binaries from the ones installed from the Debian package repos (eg. https://packages.debian.org/bullseye/amd64/love).
The luasteam.so binary was downloaded from https://github.com/uspgamedev/luasteam/releases

Note that we also require libsteam_api.so. As I understand it, this library is not freely redistributable, so it is not included in the PR. For personal use, I used a copy from one of my other 64-bit Steam games.

Steps to get this working:

  1. Clone this branch into, eg. /src/SNKRX
  2. Rebase onto a327ex:SNKRX if necessary (the game will likely be updated more recently than this branch/PR)
  3. Copy libsteam_api.so from a 64-bit Steam game you already have installed, into /src/SNKRX/engine/love/linux/
  4. Run ./run-linux.sh

or

  1. "Add a game" -> "Add a Non-Steam Game" in the Steam client; "Browse" to and select the /src/SNKRX/run-linux.sh script (you may have to change the "File type" in the dialog).
  2. Run the new blank-icon SNKRX from your library, rather than the official SNKRX.

Either way, achievements and time spent should be logged against the official SNKRX.

While this gives us Linux users a workaround, I would very much like to see this fantastic game available for Linux directly on Steam, so I hope this helps! 馃惂

run-linux.sh Outdated Show resolved Hide resolved
@SolitudeSF
Copy link

SolitudeSF commented Jun 17, 2021

I don't know what will happen if you don't own the game on Steam

it won't launch (as expected)

@mac-chaffee
Copy link

I ended up having to run sudo apt-get install libluajit-5.1-2 in addition to the steps you described, but after that, it's working!

@romlok
Copy link
Author

romlok commented Jun 27, 2021

I ended up having to run sudo apt-get install libluajit-5.1-2 in addition to the steps you described, but after that, it's working!

Thanks! I didn't notice that one because it had already been installed on my system as a dependency of obs-studio. I've added Debian's version of libluajit-5.1-2.so to the repo as well. 馃憤

@JustinMBrown
Copy link

JustinMBrown commented Jun 28, 2021

FYI, run-linux.sh also requested a bunch of shared libraries other than libsteam_api.so. I was able to install them one by one, but then I ran into this:

./linux/love: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./linux/love)

./linux/love: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by ./linux/love)

I have 2.27 on ubuntu 18.04.5

@SolitudeSF
Copy link

SolitudeSF commented Jun 28, 2021

stop using lts distros on desktop.

love needs to be built against steam runtime or statically linked.

@JustinMBrown
Copy link

stop using lts distros on desktop

I'm not sure what you mean. Also, are there any plans to make the game available on linux through steam?

NB. We also need a copy of 64-bit libsteam_api.so available in the
engine/love/linux directory, or elsewhere on the LD_LIBRARY_PATH.
@romlok
Copy link
Author

romlok commented Jul 16, 2021

stop using lts distros on desktop

I'm not sure what you mean. Also, are there any plans to make the game available on linux through steam?

From the context, I believe they mean that one should rely as little as possible on system libraries, and distribute (or statically compile in) necessary versions of all required libraries (that aren't in the Steam runtime).

I don't have experience with packaging games for Steam, so I don't really know what versions of what need to be included, only what worked for me. It seems the versions of the libraries I included were compiled against glibc 2.29 (released 2019), so will only work with newer distros.

AFAIK the dev hasn't said anything about an official Linux Steam release, and as much as I'd like to see it, I wouldn't expect it to be a priority for them unless they were personally interested in the Linux platform itself, since Linux gamers can play the game today, either via Proton or this workaround.

@JustinMBrown
Copy link

via Proton

That worked, thanks!

@Kogol1
Copy link

Kogol1 commented Oct 6, 2021

Will this work also for mac os m1 ?

@romlok
Copy link
Author

romlok commented Oct 9, 2021

Will this work also for mac os m1 ?

You may be able to follow a similar process to get it to work on Mac, but I'm not familiar with MacOS, so I don't know how easy it would be to find the necessary libraries compiled for the new Apple silicon.

@Jpxe Jpxe mentioned this pull request Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants