Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits)

There are a few ways to mitigate the library issue on Linux:

  1. Package the libraries with your executable and use a loader shell script that sets LD_LIBRARY_PATH accordingly. This is the method used by Ren'Py.
  2. Speaking of: if your game is in Python, you can use Nuitka or PyInstaller to make a stand-alone directory you can zip up and distribute.
  3. Failing that, use a language that builds all it can statically into the executable. Go, D and Nim are like that. Edit: I think so is Rust.
  4. Actually you can do that with C / C++ too, but it's tricky and some distributions (*cough* Debian *cough*) hate static libraries.
  5. Worst case, use a slightly older Linux to build, and let players know they're going to need SDL2 or whatever installed. They're probably going to have it anyway, and it's no different from telling Windows users to install the latest DirectX.

So, we don't exactly have rules about it because there aren't any, but maybe some of these ideas will help you.

(1 edit)
Package the libraries with your executable and use a loader shell script that sets LD_LIBRARY_PATH accordingly.

are loader scripts actually better than `game.x86_32` `game.x86_64`?

use a language that builds all it can statically into the executable.

as funny as writing `unsafe` `-w -Oz` rust with a custom build system would be, isnt that a little excessive?

Actually you can do that with C / C++ too, but it's tricky and some distributions (*cough* Debian *cough*) hate static libraries.

passing `-Bstatic` to the linker is tricky? or statically compiling the libraries?

Worst case, use a slightly older Linux to build, and let players know they're going to need SDL2 or whatever installed.

any recommendations, with a <2GB installer? i use arch btw

(1 edit)
are loader scripts actually better than `game.x86_32` `game.x86_64`?

No, but  loader scripts allow you to set LD_LIBRARY_PATH, while a plain executable doesn't.

isnt that a little excessive?

I'm not sure how it works in Rust. I meant in general.

passing `-Bstatic` to the linker is tricky? or statically compiling the libraries?

It's not so simple in C++, and Debian doesn't even package static libraries because its maintainers worship dynamic loading.

any recommendations, with a <2GB installer?

I don't have any concrete suggestions, sorry. SalixOS maybe. It's based on Slackware, a very conservative distribution.

(1 edit)
loader scripts allow you to set LD_LIBRARY_PATH, while a plain executable doesn't.

rpath?

It's not so simple in C++

guess im not learning C++