You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this question has been answered before, but what's the preferred method of distributing runnable games?
The readme suggests that you can statically link the sdl2 dependencies into a single runnable binary, but from some of the previously raised issues, it looks like this isn't currently possible? 👀
# Bundled doesn't yet support gfx, image, ttf, mixer.
CI_BUILD_FEATURES: "bundled"
RUST_TEST_THREADS: 1
My goal is for mac/linux, and maybe windows, users to be able to run the game entirely from a single directory with all of its dependencies provided either in a single binary, or with the libraries sitting beside the main binary - whichever is easiest! Any direction would be appreciated 👍
The text was updated successfully, but these errors were encountered:
While the bundled feature doesn't support those additional libraries, they aren't needed to use sdl. If those libraries in particular are really needed, the use-vcpkg mode of build can be considered which supports building them from source and will also produce static libraries linked into your executable.
In either case, even if these libraries are built in statically, more work would need to be considered for whether or not you wish to distribute with a static CRT or be dependent upon a distributed one. This is beyond being an SDL or even a rust issue however. Just to see, I tried compiling my rust-sdl2 dependent project just now with crt-static and the build failed in different ways on Windows and Linux.
waych mentioned different possibilities, but the most trust worthy way of installing and distributing SDL2 is simply downloading it from the SDL2 website itself and putting it next to your binary. It takes about 2 minutes per .dll and it's really well explained in the README https://github.com/Rust-SDL2/rust-sdl2#windows-msvc .
Sorry if this question has been answered before, but what's the preferred method of distributing runnable games?
The readme suggests that you can statically link the sdl2 dependencies into a single runnable binary, but from some of the previously raised issues, it looks like this isn't currently possible? 👀
bundled
#851The CI scripts suggest the same:
rust-sdl2/.github/workflows/CI.yml
Lines 43 to 50 in 35ffdc2
My goal is for mac/linux, and maybe windows, users to be able to run the game entirely from a single directory with all of its dependencies provided either in a single binary, or with the libraries sitting beside the main binary - whichever is easiest! Any direction would be appreciated 👍
The text was updated successfully, but these errors were encountered: