diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5084925ced017..33ce15d1d4575 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -215,8 +215,16 @@ jobs: - name: Install dependencies (Linux) if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' && !matrix.wasm run: | + git clone https://github.com/libsdl-org/SDL.git --branch release-2.0.20 --depth 1 + cd SDL + mkdir build + cd build + ../configure + make -j$((`nproc`+0)) + sudo make install + cp ../LICENSE.txt ${{ github.workspace }}/LICENSE-SDL.txt sudo apt-get update - sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \ + sudo apt-get install libncursesw5-dev libsdl2-ttf-dev libsdl2-image-dev \ libsdl2-mixer-dev libpulse-dev ccache gettext parallel - name: Install Emscripten (WebAssembly) if: matrix.wasm diff --git a/Makefile b/Makefile index 3b15bf407e5c0..79a6a6b331fe6 100644 --- a/Makefile +++ b/Makefile @@ -895,6 +895,11 @@ endif ifeq ($(TARGETSYSTEM),LINUX) BINDIST_EXTRAS += cataclysm-launcher + ifneq ("$(wildcard LICENSE-SDL.txt)","") + SDL2_solib = $(shell ldd $(TARGET) | grep libSDL2-2\.0 | cut -d ' ' -f 3) + INSTALL_EXTRAS += $(SDL2_solib) + BINDIST_EXTRAS += LICENSE-SDL.txt + endif ifeq ($(BACKTRACE),1) # -rdynamic needed for symbols in backtraces LDFLAGS += -rdynamic @@ -1296,6 +1301,7 @@ endif # ifeq ($(NATIVE), osx) $(BINDIST): distclean version $(TARGET) $(L10N) $(BINDIST_EXTRAS) $(BINDIST_LOCALE) mkdir -p $(BINDIST_DIR) cp -R $(TARGET) $(BINDIST_EXTRAS) $(BINDIST_DIR) + $(foreach lib,$(INSTALL_EXTRAS), install --strip $(lib) $(BINDIST_DIR)) ifdef LANGUAGES cp -R --parents lang/mo $(BINDIST_DIR) endif diff --git a/cataclysm-launcher b/cataclysm-launcher index 96c01819a1553..5083bbdc282d2 100755 --- a/cataclysm-launcher +++ b/cataclysm-launcher @@ -45,7 +45,7 @@ fi if [ "$BIN" ] then - exec ./$BIN "$@" + env LD_LIBRARY_PATH="${DIR}:${LD_LIBRARY_PATH}" ./"${BIN}" "$@" else printerr "Couldn't find cataclysm game binary in '$DIR'/" exit 1