Skip to content

Remove X11 hard requirement for *nix systems #2179

@Peppersawce

Description

@Peppersawce

Hello, I recently discovered this project and I was curious to see if I could use it to launch Victoria II on Haiku, a POSIX-compliant OS which doesn't use X11 libraries, so I tried building 1.3.0's source for it.

After a bunch of minor tweaks to the code, which include using system GLEW, GLFW and TBB instead of fetching them (fetched GLEW won't compile because it wants X headers), I got the compilation of the main binary (Alice) going.

Now, this system is "old" (by Windows 11 standards), with a 7th gen i3 and 12GBs of RAM, this amount of RAM was actually not enough during compilation and the system ended up using at least another 2Gigs as swap, but other than that it seemed to work fine.

The only time compilation stopped because of X11 missing has been because of src/launcher/launcher_main_nix.cpp (at line 7 and in the mouse_button_callback function)

So I decided trying to skip building the launcher, which seems to work alright. I got an Alice binary I could try using.

Unfortunately that binary segfaults (saying Mesa: User error: GL_INVALID_OPERATION in glClearTexImage(texture)), this is probably related to me not using GLEW and GLFW provided by your project, but then again I can't use those because of the hard X11 requirement.

So now I'd like to request some tweak in your build system to make X11 optional during build, this could be achieved by disabling building the *nix launcher if X11 is not present or by providing some alternative rendering for the *nix launcher that doesn't depend on X11 (or Wayland).
(Along with commands to stop looking for it in the GLEW/GLFW dependencies)

This is not just for obscure systems like Haiku, but would also help in future porting efforts to systems like modern Mac OS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions