From 83c1bd3ffd0e7a30c4dfe24c076bc69ce80f3aaf Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 13 Aug 2023 11:56:54 +0200 Subject: [PATCH] ci: bundle DLL hell with windows builds --- .github/workflows/c-cpp.yml | 1 + Makefile.port | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 996a3a856..86fe9c5c6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -33,6 +33,7 @@ jobs: run: | mkdir -p bin/data cp build/ntsc-final-port/pd.exe bin/ + cp /mingw32/bin/{SDL2.dll,zlib1.dll,libgcc_s_dw2-1.dll,libwinpthread-1.dll} bin/ touch bin/data/put_your_rom_here.txt - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/Makefile.port b/Makefile.port index a8eb2b3c1..10f6cea75 100644 --- a/Makefile.port +++ b/Makefile.port @@ -130,7 +130,7 @@ G_DIR := src/generated/$(ROMID) ifneq (,$(findstring windows,$(TARGET_PLATFORM))) TARGET_CFLAGS := $(shell pkg-config sdl2 --cflags-only-I) - TARGET_LDFLAGS := $(shell pkg-config sdl2 --libs) -lz -lopengl32 + TARGET_LDFLAGS := $(shell pkg-config sdl2 --libs) -lz -lopengl32 -static-libstdc++ # on windows/mingw we need this to be built with a 32-bit compiler so it finds the correct libs TOOLCHAIN := i686-w64-mingw32- else # TODO