spring / pr-downloader

console downloader for spring maps/games written in c++
GNU General Public License v2.0
23 stars 27 forks source link

Statically link libcurl #110

Closed gajop closed 6 years ago

gajop commented 6 years ago

Libcurl being a dynamically loaded library is causing two big issues:

  1. It's difficult to distribute spring games as users need to manually install it first.
  2. Libcurl is now in the process of upgrading from 3 to 4, causing issues with distributions that choose to use a different libcurl version from Spring.

I think this is mainly a Linux issue, but a pretty big one atm.

abma commented 6 years ago

IMHO the main reason why libcurl is not statically linked because it depends on openssl which is often updated.

also statically linking curl is a pita, it depends on a lot of other libs.

IMHO this can be only solved by distributing spring as flatpak.

gajop commented 6 years ago

I use pr-downloader without Spring (to download engines, maps, games, etc.), as a tool for bootstrapping the whole install. I think it's OK to use a fixed version and only updated from time to time (as Spring or pr-downloader has new builds).

Statically linking CURL is indeed difficult, I agree with you there. If you want to try, migrating to a package manager like hunter might help us out: here's how libcurl can be added: https://docs.hunter.sh/en/latest/packages/pkg/CURL.html (hunter statically links everything by default IIRC).

Flatpak, AppImage or whatever isn't a bad idea - my current version of the Spring Launcher electron app uses AppImage for Linux, but I'm not sure if it solves this issue, as I'd want pr-downloader only, and not entire Spring

abma commented 6 years ago

spring version 104.0.1-1221-g0f1e4e3 develop has static linked pr-downloader included.

maybe also see https://springrts.com/mantis/view.php?id=6051

gajop commented 6 years ago

That's amazing. I'll try it when I get back home.

gajop commented 6 years ago

Works great, thanks!