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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux build doesn't copy dynamic libraries into output directory #373

Open
NQNStudios opened this issue Jun 23, 2024 · 11 comments
Open

Linux build doesn't copy dynamic libraries into output directory #373

NQNStudios opened this issue Jun 23, 2024 · 11 comments
Labels
bug meta Related to the build system or other things other than the code

Comments

@NQNStudios
Copy link
Collaborator

The linux build currently requires the developer to have the dependencies installed system-wide to run the game, not just to build it.
I noticed this because, now that the scons build compiles TGUI for you, the TGUI it links against, won't be installed on your system, because it's built and installed in a local subdirectory. So you get this:

run_tests(["build/test/passed"], ["build/bin/boe_test"])
/home/nat/repos/cboe/build/bin/boe_test: error while loading shared libraries: libtgui.so.0.9.5: cannot open shared object file: No such file or directory
os.chdir('/home/nat/repos/cboe')
scons: done building targets.
@CelticMinstrel
Copy link
Member

CelticMinstrel commented Jun 24, 2024

Probably the simplest solution is to prefer static linking on Linux for most of the libraries. That said, I'd also be fine with bundled .so's and a custom rpath.

@NQNStudios
Copy link
Collaborator Author

Come to think of it, a portable Linux build would also have to ship the zenity executable:

std::string command = "zenity --file-selection";

@CelticMinstrel
Copy link
Member

That's true – if the goal is to make a standalone Linux build in whatever form (Flatpak for example) then it would need to distribute zenity and any of its dependencies as well.

@NQNStudios
Copy link
Collaborator Author

For zenity, I made an issue on their repository to see if anyone can help https://gitlab.gnome.org/GNOME/zenity/-/issues/94

@NQNStudios
Copy link
Collaborator Author

I think I could maybe, maybe live with having a Linux build that throws an error message if Zenity isn't installed, saying something to the effect of "OpenBoE for Linux requires Zenity. Please install Zenity through your distribution's package manager."

At least as a stopgap. Linux gaming is so, so, so, niche, I barely get any downloads/purchases of my games' Linux ports so delving into bundling a portable zenity build with cboe seems like a poor use of labor time.

@CelticMinstrel what do you think?

@NQNStudios
Copy link
Collaborator Author

Maybe with an open-source project you get more Linux users in the audience, but also--those kinds of users should be pretty comfortable installing an extra thing to make it work, I should think.

@CelticMinstrel
Copy link
Member

CelticMinstrel commented Aug 10, 2024

It definitely seems good as a stopgap. But, the main issue to consider is that it'll probably show when they try to save their game. Thus, it needs to be possible to install Zenity without closing BoE and have it work when they try to save again. This suggests that there should be an input box where they can manually type in the path to Zenity, as a last resort in case installing it relies on environment variables that can't be propagated to a running process (seems unlikely, but not impossible).

By the way, did you follow up on the response you received to your issue on the Zenity repo?

@NQNStudios
Copy link
Collaborator Author

It could happen at launch after querying which zenity and force the application to close.

@NQNStudios
Copy link
Collaborator Author

NQNStudios commented Aug 10, 2024

By the way, did you follow up on the response you received to your issue on the Zenity repo?

No, I think if I decide to go that route I'll go to their forum and ask if anyone has compiled a statically linked version & has advice about that. I looked into Flatpak and it seems like the wrong thing

@CelticMinstrel
Copy link
Member

It could happen at launch after querying which zenity and force the application to close.

I guess that would work, though it's a little unfortunate they can't even launch the game without installing it.

@NQNStudios
Copy link
Collaborator Author

A solution for the "Linux users can't launch the game without Zenity installed" problem would be, have the game manage a folder of save files that can be selected in a simple stack/page interface instead of an OS-specific file browser. Preferences could turn this feature on/off.

@CelticMinstrel CelticMinstrel added bug meta Related to the build system or other things other than the code labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug meta Related to the build system or other things other than the code
Projects
None yet
Development

No branches or pull requests

2 participants