Removed the crashdump code from the Dev branch and added the -R/--crashdump parameter to activate it, and also made the makefiles not build pcap_if.exe by default.

This commit is contained in:
OBattler
2020-04-17 02:20:02 +02:00
parent 4bc41197b9
commit 13a9477b6d
6 changed files with 14 additions and 33 deletions

View File

@@ -120,6 +120,7 @@ extern int hdd_format_type; /* (C) hard disk file format */
#ifdef USE_DISCORD #ifdef USE_DISCORD
extern int enable_discord; /* (C) enable Discord integration */ extern int enable_discord; /* (C) enable Discord integration */
#endif #endif
extern int enable_crashdump; /* (C) enable crash dump */
extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out, extern int is_pentium; /* TODO: Move back to cpu/cpu.h when it's figured out,
how to remove that hack from the ET4000/W32p. */ how to remove that hack from the ET4000/W32p. */

View File

@@ -90,9 +90,7 @@ extern WCHAR wopenfilestring[512];
extern uint8_t filterindex; extern uint8_t filterindex;
#ifdef USE_CRASHDUMP
extern void InitCrashDump(void); extern void InitCrashDump(void);
#endif
extern HICON LoadIconEx(PCTSTR pszIconName); extern HICON LoadIconEx(PCTSTR pszIconName);

View File

@@ -131,6 +131,7 @@ int time_sync = 0; /* (C) enable time sync */
#ifdef USE_DISCORD #ifdef USE_DISCORD
int enable_discord = 0; /* (C) enable Discord integration */ int enable_discord = 0; /* (C) enable Discord integration */
#endif #endif
int enable_crashdump = 0; /* (C) enable crash dump */
/* Statistics. */ /* Statistics. */
extern int extern int
@@ -354,6 +355,7 @@ usage:
#ifdef _WIN32 #ifdef _WIN32
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n"); printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
#endif #endif
printf("-R or --crashdump - enables crashdump on exception\n");
printf("\nA config file can be specified. If none is, the default file will be used.\n"); printf("\nA config file can be specified. If none is, the default file will be used.\n");
return(0); return(0);
} else if (!wcscasecmp(argv[c], L"--dumpcfg") || } else if (!wcscasecmp(argv[c], L"--dumpcfg") ||
@@ -383,6 +385,9 @@ usage:
} else if (!wcscasecmp(argv[c], L"--noconfirm") || } else if (!wcscasecmp(argv[c], L"--noconfirm") ||
!wcscasecmp(argv[c], L"-N")) { !wcscasecmp(argv[c], L"-N")) {
no_quit_confirm = 1; no_quit_confirm = 1;
} else if (!wcscasecmp(argv[c], L"--crashdump") ||
!wcscasecmp(argv[c], L"-R")) {
enable_crashdump = 1;
#ifdef _WIN32 #ifdef _WIN32
} else if (!wcscasecmp(argv[c], L"--hwnd") || } else if (!wcscasecmp(argv[c], L"--hwnd") ||
!wcscasecmp(argv[c], L"-H")) { !wcscasecmp(argv[c], L"-H")) {

View File

@@ -44,9 +44,6 @@ ifeq ($(DEV_BUILD), y)
ifndef CL5422 ifndef CL5422
CL5422 := y CL5422 := y
endif endif
ifndef CRASHDUMP
CRASHDUMP := y
endif
ifndef LASERXT ifndef LASERXT
LASERXT := y LASERXT := y
endif endif
@@ -105,9 +102,6 @@ else
ifndef CL5422 ifndef CL5422
CL5422 := n CL5422 := n
endif endif
ifndef CRASHDUMP
CRASHDUMP := n
endif
ifndef LASERXT ifndef LASERXT
LASERXT := n LASERXT := n
endif endif
@@ -421,11 +415,6 @@ ifeq ($(CL5422), y)
OPTS += -DUSE_CL5422 OPTS += -DUSE_CL5422
endif endif
ifeq ($(CRASHDUMPOBJ), y)
OPTS += -DUSE_CRASHDUMP
DEVBROBJ += win_crashdump.o
endif
ifeq ($(LASERXT), y) ifeq ($(LASERXT), y)
OPTS += -DUSE_LASERXT OPTS += -DUSE_LASERXT
DEVBROBJ += m_xt_laserxt.o DEVBROBJ += m_xt_laserxt.o
@@ -674,7 +663,7 @@ VIDOBJ := video.o \
PLATOBJ := win.o \ PLATOBJ := win.o \
win_dynld.o win_thread.o \ win_dynld.o win_thread.o \
win_cdrom.o win_keyboard.o \ win_cdrom.o win_keyboard.o \
win_midi.o \ win_crashdump.o win_midi.o \
win_mouse.o win_mouse.o
ifeq ($(DINPUT), y) ifeq ($(DINPUT), y)
@@ -704,7 +693,7 @@ endif
ifneq ($(WX), n) ifneq ($(WX), n)
LIBS += $(WX_LIBS) -lm LIBS += $(WX_LIBS) -lm
endif endif
LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++ LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lpsapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++
ifneq ($(X64), y) ifneq ($(X64), y)
LIBS += -Wl,--large-address-aware LIBS += -Wl,--large-address-aware
endif endif
@@ -754,7 +743,7 @@ else
endif endif
all: $(PROG).exe pcap_if.exe all: $(PROG).exe
86Box.res: 86Box.rc 86Box.res: 86Box.rc

View File

@@ -44,9 +44,6 @@ ifeq ($(DEV_BUILD), y)
ifndef CL5422 ifndef CL5422
CL5422 := y CL5422 := y
endif endif
ifndef CRASHDUMP
CRASHDUMP := y
endif
ifndef LASERXT ifndef LASERXT
LASERXT := y LASERXT := y
endif endif
@@ -105,9 +102,6 @@ else
ifndef CL5422 ifndef CL5422
CL5422 := n CL5422 := n
endif endif
ifndef CRASHDUMP
CRASHDUMP := n
endif
ifndef LASERXT ifndef LASERXT
LASERXT := n LASERXT := n
endif endif
@@ -430,11 +424,6 @@ ifeq ($(CL5422), y)
OPTS += -DUSE_CL5422 OPTS += -DUSE_CL5422
endif endif
ifeq ($(CRASHDUMPOBJ), y)
OPTS += -DUSE_CRASHDUMP
DEVBROBJ += win_crashdump.o
endif
ifeq ($(LASERXT), y) ifeq ($(LASERXT), y)
OPTS += -DUSE_LASERXT OPTS += -DUSE_LASERXT
DEVBROBJ += m_xt_laserxt.o DEVBROBJ += m_xt_laserxt.o
@@ -678,7 +667,7 @@ VIDOBJ := video.o \
PLATOBJ := win.o \ PLATOBJ := win.o \
win_dynld.o win_thread.o \ win_dynld.o win_thread.o \
win_cdrom.o win_keyboard.o \ win_cdrom.o win_keyboard.o \
win_midi.o \ win_crashdump.o win_midi.o \
win_mouse.o win_mouse.o
ifeq ($(DINPUT), y) ifeq ($(DINPUT), y)
@@ -705,7 +694,7 @@ endif
ifneq ($(WX), n) ifneq ($(WX), n)
LIBS += $(WX_LIBS) -lm LIBS += $(WX_LIBS) -lm
endif endif
LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++ LIBS += -lpng -lz -lwsock32 -lshell32 -liphlpapi -lpsapi -lSDL2 -limm32 -lhid -lsetupapi -loleaut32 -lversion -lwinmm -static -lstdc++
ifneq ($(X64), y) ifneq ($(X64), y)
LIBS += -Wl,--large-address-aware LIBS += -Wl,--large-address-aware
endif endif
@@ -755,7 +744,7 @@ else
endif endif
all: $(PROG).exe pcap_if.exe all: $(PROG).exe
86Box.res: 86Box.rc 86Box.res: 86Box.rc

View File

@@ -354,10 +354,9 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow)
/* Set the application version ID string. */ /* Set the application version ID string. */
sprintf(emu_version, "%s v%s", EMU_NAME, EMU_VERSION); sprintf(emu_version, "%s v%s", EMU_NAME, EMU_VERSION);
#ifdef USE_CRASHDUMP
/* Enable crash dump services. */ /* Enable crash dump services. */
InitCrashDump(); if (enable_crashdump)
#endif InitCrashDump();
/* First, set our (default) language. */ /* First, set our (default) language. */
set_language(0x0409); set_language(0x0409);