Jump to content

How to Compile Static for Linux


practicing01

Recommended Posts

https://stackoverflow.com/questions/39782630/how-can-i-compile-sdl2-and-glew-applications-statically-on-linux


Windows, sorry but options should be there if available D1Nxlj.png


https://wiki.libsdl.org/FAQLinux


this last link should help you locate thing inside the cmake junk, or even the makefile itself, and might help understand the foirst link which seems heavy on theory as well as other sub dependencies as an extra problem.

Link to comment
Share on other sites

I was thinking about this awhile ago and I think the answer must be AppImage. I just haven't got around to delving deeper. There is also FlatPak and Snap but AppImage looks to be the most flexible and easy for the user but as I said, I haven't delved into it. Here are some links.


AppImage

https://appimage.org/


Flatpak

https://flatpak.org/


Snap App

https://snapcraft.io/



Edit: Maybe I didn't understand the question. Heh

Link to comment
Share on other sites

I was suggesting earlier about dependency management being part of the install but apparently Godot and unity builds work on every distro flawlessly, so if Godot and unity do it I guess torque should too, tho i suspect the answer might be doing the same as Godot and unity which probably includes shipping half a gig of bloat :p or is that just unreal games :D

Link to comment
Share on other sites

I was thinking of distribution of aT3D game so that it would work on any distro out there. I imagine the dependencies wouldn't add much bloat. Many distros come with flatpak or snap app installed but that's why I was thinking AppImage since it runs without a client piece of software.


You can compile with all dependencies included?


I need to read more about that cause that would be great.

Link to comment
Share on other sites

seems he has an issue with SDL specifically, which I read some time ago had some issues RE static linking, whether that exists still now I don't know, I suspect not given I have options for it again, I think is the base game is running on either 3.6 or 3.8 tho, I did the few links I found that seemed relevant, hopefully that helps, the answer may mean upgrading sdl for his own versions

Link to comment
Share on other sites

Right now the issue is sdl and openal. I can get around sdl with a shell script that adds the exe directory to the path (which a t3d compile slaps a few sdl .so files into). Setting static sdl in cmake didn't work, it always forces dynamic. The magic that unity/Godot use, is what I want: I compile the game on my dev machine and distribute that to the user. I don't know how those engines do it but if it's something that can be done for t3d with a little effort, then would someone kindly point me to the documentation, please? Thanks for the replies.

Link to comment
Share on other sites

Not sure about Unity, but Godot does it by including precompiled binaries for each supported platform as part of an "export template" package. When you 'compile' your game Godot just pulls out the corresponding binary from the export template and renames it for you. We could do something similar in Torque but it'd only be useful for people that work exclusively in TorqueScript. As soon as you modify the engine you have to recompile for (and on) every platform you want to support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...