diff --git a/.github/workflows/hxdos.yml b/.github/workflows/hxdos.yml index af2eb27f9..1d735abcb 100644 --- a/.github/workflows/hxdos.yml +++ b/.github/workflows/hxdos.yml @@ -77,6 +77,10 @@ jobs: cp build-scripts/mingw/bin/msys.bat mingw-get/msys/1.0 cp build-scripts/mingw/bin/runbuild.sh mingw-get/msys/1.0 cp build-scripts/mingw/bin/gawk.exe mingw-get/msys/1.0/bin + vs/tool/unzip.exe $top/build-scripts/mingw/bin/d3d9.zip -d d3d9 + cp d3d9/*.inl mingw-get/include + cp d3d9/*.h mingw-get/include + cp d3d9/*.a mingw-get/lib - name: Build MinGW lowend shell: pwsh run: | diff --git a/build-mingw b/build-mingw index 85395a0dc..9638e89ea 100644 --- a/build-mingw +++ b/build-mingw @@ -12,6 +12,8 @@ if test -z "$top" ; then exit 1; fi # fix chmod +x vs/sdl/build-scripts/strip_fPIC.sh +sed -i 's/^#define ENABLE_IM_EVENT 1$/\/\/#define ENABLE_IM_EVENT 1/g' vs/sdl/include/SDL_platform.h + # prefer to compile against our own copy of SDL 1.x echo Compiling our internal SDL 1.x (cd vs/sdl && ./build-dosbox.sh) || exit 1 @@ -20,10 +22,8 @@ echo Compiling our internal SDL 1.x echo Compiling our internal SDLnet 1.x (cd vs/sdlnet && ./build-dosbox.sh) || exit 1 -# MinGW cannot compile SDL_net, configure goes off trying to autogen -# prefer to compile against our own copy of SDLnet 1.x -echo Compiling our internal SDLnet 1.x -(cd vs/sdlnet && ./build-dosbox.sh) || exit 1 +sed -i 's/^\/\/#define ENABLE_IM_EVENT 1$/#define ENABLE_IM_EVENT 1/g' vs/sdl/include/SDL_platform.h +(cd vs/sdl && ./build-dosbox.sh) || exit 1 # NTS: MinGW provides zlib for us if false; then diff --git a/build-scripts/mingw/bin/d3d9.zip b/build-scripts/mingw/bin/d3d9.zip new file mode 100644 index 000000000..a7f0da611 Binary files /dev/null and b/build-scripts/mingw/bin/d3d9.zip differ diff --git a/build-scripts/mingw/bin/runbuild.sh b/build-scripts/mingw/bin/runbuild.sh index 6da7755b4..17d4ea79a 100644 --- a/build-scripts/mingw/bin/runbuild.sh +++ b/build-scripts/mingw/bin/runbuild.sh @@ -1,4 +1,4 @@ #!/bin/sh repodir=`cat /mingw/msys/1.0/pwd.txt` cd $repodir -./$1 \ No newline at end of file +./$1 diff --git a/vs/sdl/include/SDL_platform.h b/vs/sdl/include/SDL_platform.h index f40f4db46..a00fac781 100644 --- a/vs/sdl/include/SDL_platform.h +++ b/vs/sdl/include/SDL_platform.h @@ -106,8 +106,13 @@ #if defined(WIN32) || defined(_WIN32) #undef __WIN32__ #define __WIN32__ 1 -#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR) +#if !defined(__MINGW32__) #define ENABLE_IM_EVENT 1 +#else +#include <_mingw.h> +#if defined(__MINGW64_VERSION_MAJOR) +#define ENABLE_IM_EVENT 1 +#endif #endif #endif