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

Create a portable, statically linked AppImage Linux package #248

Closed
Mikolaj opened this issue Apr 8, 2021 · 3 comments
Closed

Create a portable, statically linked AppImage Linux package #248

Mikolaj opened this issue Apr 8, 2021 · 3 comments

Comments

@Mikolaj
Copy link
Member

Mikolaj commented Apr 8, 2021

The game binary already incorporates all data files it needs, including fonts.

With some luck, we could link the game fully statically as at https://github.com/utdemir/ghc-musl and https://github.com/nh2/static-haskell-nix.

Then, if there is any value added in that, it could be packages as AppImage (https://docs.appimage.org/index.html).

Related: Windows binaries could be statically linked as well, perhaps, to avoid distributing all those dlls as separate files.

Edit: see the note at the end of Makefile.

@Mikolaj
Copy link
Member Author

Mikolaj commented Aug 3, 2021

A hint I overheard about how to create an appImage:

stack install hsinstall
hsinstall --mk-appimage packagename
https://gitlab.com/dpwiz/ld48/-/tree/main/util/resources/appimage
what's supposed to be in the share/hsinstall directory?
copy the files from the hsinstall repo to the right directory manually

but I'm no longer sure I'm willing to spend time wrestling with static linking after the ordeal of utdemir/ghc-musl#14

@Mikolaj Mikolaj added too hard and removed medium labels Aug 3, 2021
@Mikolaj
Copy link
Member Author

Mikolaj commented Aug 3, 2021

Closing until there's is a hardcore volunteer willing to move it forward or until I move from SDL2 to Vulkan or whatever video library permits (easy) static linking.

@Mikolaj Mikolaj closed this as completed Aug 3, 2021
Mikolaj added a commit that referenced this issue Aug 3, 2021
@nh2
Copy link

nh2 commented Aug 13, 2021

In static-haskell-nix,I have succeeded building SDL2 and associated libraries statically now, and also LambdaHack, with some overrides I still need to clean up.

But what needs research is how to make a static SDL2 find a graphics card or use software rendering via Mesa llvmpipe:

/nix/store/wydhcgwplw9grms8d3y8sdfm5srg8xgb-LambdaHack-0.10.2.0/bin/LambdaHack
LambdaHack: SDLCallFailed {sdlExceptionCaller = "SDL.Init.init", sdlFunction = "SDL_Init", sdlExceptionError = "No available video device"}

nh2/static-haskell-nix#108 (comment)

JamieFristrom pushed a commit to JamieFristrom/LambdaHack that referenced this issue Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants