Skip to content

Commit

Permalink
Merge pull request #4409 from maron2000/mingw_debug
Browse files Browse the repository at this point in the history
Enable debugger function for MinGW builds
  • Loading branch information
joncampbell123 committed Aug 11, 2023
2 parents a70d406 + 7151454 commit 1a5961c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Next
- Fix memory limits on expand-down segment descriptors (cimarronm)
- Bump tinyfiledialog to ver 3.13.3 (maron2000)
- Fix mouse column limit on text mode (issue #4353) (maron2000)
- Fix Blocek launching failure (issue #4385) (maron2000)
- Bump in-tree FreeType library to ver 2.13.1 (maron2000)
- Enable debugger function for MinGW builds (maron2000)
2023.05.01
- IMGMAKE will choose LBA partition types for 2GB or larger disk
images, but the user can also use -chs and -lba options to override
Expand Down
10 changes: 7 additions & 3 deletions build-mingw
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ CXXFLAGS="${new}${CXXFLAGS}"
INTERNAL_FREETYPE=1
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE

pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null
#pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null

CXXFLAGS="$CXXFLAGS -DNCURSES_STATIC "
CPPFLAGS="$CPPFLAGS -DNCURSES_STATIC "
CFLAGS="$CFLAGS -DNCURSES_STATIC "
export CFLAGS CPPFLAGS CXXFLAGS

# now compile ourself
echo "Compiling DOSBox-X"
chmod +x configure
# FIXME: I would like MinGW builds to enable the debugger, eventually
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "${@}" || exit 1
./configure --enable-debug --disable-avcodec --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "${@}" || exit 1
make -j3 || exit 1
14 changes: 9 additions & 5 deletions build-mingw-sdl2
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
x=$(which sdl2-config)
if test -z "${x}" ; then
echo "Compiling our internal SDL 2.x"
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
echo "Compiling our internal SDL 2.x"
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
fi

# prefer to compile against our own copy of SDLnet 1.x
Expand Down Expand Up @@ -60,11 +60,15 @@ CXXFLAGS="${new}${CXXFLAGS}"
INTERNAL_FREETYPE=1
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE

pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null
# pacman -S --needed --noconfirm mingw-w64-x86_64-libslirp &>/dev/null

CXXFLAGS="$CXXFLAGS -DNCURSES_STATIC "
CPPFLAGS="$CPPFLAGS -DNCURSES_STATIC "
CFLAGS="$CFLAGS -DNCURSES_STATIC "
export CFLAGS CPPFLAGS CXXFLAGS

# now compile ourself
echo "Compiling DOSBox-X"
chmod +x configure
# FIXME: I would like MinGW builds to enable the debugger, eventually
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr --enable-sdl2 "${@}" || exit 1
./configure --enable-debug --disable-avcodec --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --enable-sdl2 --prefix=/usr "${@}" || exit 1
make -j3 || exit 1
4 changes: 3 additions & 1 deletion src/gui/sdlmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8712,7 +8712,9 @@ int main(int argc, char* argv[]) SDL_MAIN_NOEXCEPT {
sdl_version.major, sdl_version.minor, sdl_version.patch,
SDL_GetCurrentVideoDriver(), SDL_GetCurrentAudioDriver());
#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.");
#endif
/* -- -- decide whether to show menu in GUI */
if (control->opt_nogui || menu.compatible)
menu.gui=false;
Expand Down

0 comments on commit 1a5961c

Please sign in to comment.