From 6e3fae1ac478af7892d937c3dee37fd5411c1a7f Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Thu, 30 May 2024 22:24:00 +0900 Subject: [PATCH 1/4] Test to fix MinGW CI build failure --- build-mingw | 1 + 1 file changed, 1 insertion(+) diff --git a/build-mingw b/build-mingw index 275eba95502..68389ef4c81 100755 --- a/build-mingw +++ b/build-mingw @@ -29,6 +29,7 @@ sed -i 's/^#define ENABLE_IM_EVENT 1$/\/\/#define ENABLE_IM_EVENT 1/g' vs/sdl/in # prefer to compile against our own copy of SDL 1.x echo "Compiling our internal SDL 1.x" +sed -i 's/^make -j3/sed -i '"'"'s\/\^CFLAGS\.\*\/CFLAGS = -g -O2 -Wno-error=incompatible-pointer-types\/g'"'"' \.\/Makefile\nmake -j3/g' vs/sdl/build-dosbox.sh (cd vs/sdl && ./build-dosbox.sh) || exit 1 # prefer to compile against our own copy of SDLnet 1.x From dcceac34e55afa4d14d7e9c7c54e0adaaf9e2253 Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Thu, 30 May 2024 22:51:36 +0900 Subject: [PATCH 2/4] Undo build-dosbox,sh changes for MinGW builds --- build-mingw | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-mingw b/build-mingw index 68389ef4c81..2d859f07a32 100755 --- a/build-mingw +++ b/build-mingw @@ -29,6 +29,7 @@ sed -i 's/^#define ENABLE_IM_EVENT 1$/\/\/#define ENABLE_IM_EVENT 1/g' vs/sdl/in # prefer to compile against our own copy of SDL 1.x echo "Compiling our internal SDL 1.x" +cp vs/sdl/build-dosbox.sh vs/sdl/build-dosbox.bak sed -i 's/^make -j3/sed -i '"'"'s\/\^CFLAGS\.\*\/CFLAGS = -g -O2 -Wno-error=incompatible-pointer-types\/g'"'"' \.\/Makefile\nmake -j3/g' vs/sdl/build-dosbox.sh (cd vs/sdl && ./build-dosbox.sh) || exit 1 @@ -38,6 +39,9 @@ echo "Compiling our internal SDLnet 1.x" 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 +rm vs/sdl/build-dosbox.sh +mv vs/sdl/build-dosbox.bak vs/sdl/build-dosbox.sh +chmod +x vs/sdl/build-dosbox.sh # NTS: MinGW provides zlib for us if false; then From 6d6fbb4c2819437468bdc0919242f4f080df9d40 Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Thu, 30 May 2024 22:55:06 +0900 Subject: [PATCH 3/4] Add missing prototype (fluid_seqbind.c) --- src/libs/fluidsynth/fluid_seqbind.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/fluidsynth/fluid_seqbind.c b/src/libs/fluidsynth/fluid_seqbind.c index df3fc409de5..476d8d5b527 100644 --- a/src/libs/fluidsynth/fluid_seqbind.c +++ b/src/libs/fluidsynth/fluid_seqbind.c @@ -51,6 +51,7 @@ typedef struct _fluid_seqbind_t fluid_seqbind_t; int fluid_seqbind_timer_callback(void* data, unsigned int msec); void fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* event, fluid_sequencer_t* seq, void* data); +void fluid_event_key_pressure(fluid_event_t* evt, int channel, short key, short val); /* Proper cleanup of the seqbind struct. */ void From 3cf8a99c602276049626c3006ed271be48962a3e Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Fri, 31 May 2024 23:25:23 +0900 Subject: [PATCH 4/4] Temporarily disable libslirp support for MinGW builds --- .github/workflows/mingw32.yml | 2 +- .github/workflows/mingw64.yml | 2 +- .github/workflows/windows-installers.yml | 4 ++-- src/gui/sdlmain.cpp | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mingw32.yml b/.github/workflows/mingw32.yml index e047ca4446e..73415790c14 100644 --- a/.github/workflows/mingw32.yml +++ b/.github/workflows/mingw32.yml @@ -26,7 +26,7 @@ jobs: with: msystem: MINGW32 update: true - install: git make base-devel mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-ncurses mingw-w64-i686-binutils mingw-w64-i686-libslirp + install: git make base-devel mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-ncurses mingw-w64-i686-binutils - name: Install libslirp if: false run: | diff --git a/.github/workflows/mingw64.yml b/.github/workflows/mingw64.yml index e661bc53b6d..47c32e6081a 100644 --- a/.github/workflows/mingw64.yml +++ b/.github/workflows/mingw64.yml @@ -26,7 +26,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-libslirp mingw-w64-x86_64-libtool mingw-w64-x86_64-nasm autoconf automake + install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-nasm autoconf automake - name: Update build info shell: bash run: | diff --git a/.github/workflows/windows-installers.yml b/.github/workflows/windows-installers.yml index 9d999a23917..e987fce2d1c 100644 --- a/.github/workflows/windows-installers.yml +++ b/.github/workflows/windows-installers.yml @@ -179,7 +179,7 @@ jobs: with: msystem: MINGW32 update: true - install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-libslirp + install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake - name: Update build info shell: bash run: | @@ -239,7 +239,7 @@ jobs: with: msystem: MINGW64 update: true - install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-libslirp mingw-w64-x86_64-libtool mingw-w64-x86_64-nasm autoconf automake + install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-nasm autoconf automake - name: Update build info shell: bash run: | diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index ca4b0141b72..5f72374bda7 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -8740,6 +8740,7 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT { #endif //defined (C_SDL2) #if defined(__MINGW32__) && defined(C_DEBUG) LOG_MSG("EXPERIMENTAL: Debugger enabled for MinGW build, DOSBox-X crashes depending on the terminal software you use. Launching from command prompt (cmd.exe) is recommended."); + LOG_MSG("NOTICE: libslirp support disabled due to a bug in recent libslirp release"); #endif /* -- -- decide whether to show menu in GUI */ if (control->opt_nogui || menu.compatible)