From ed41df332a207d7cf558a9ace9c7637d39c0c049 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Sat, 3 May 2014 10:58:10 +0000 Subject: [PATCH] Support for compiling plugin version of Bochs with MSVC nmake now complete. - embedding combined manifest makes BOCHS.EXE usable - list of DLL plugins now depends on the pci and debugger options - 'make clean' now removes the generated manifest files - renamed variable for external rules - documentation update --- bochs/CHANGES | 3 ++- bochs/Makefile.in | 3 ++- bochs/configure.in | 14 +++++++++++--- bochs/doc/docbook/user/user.dbk | 5 +++-- bochs/gui/Makefile.in | 2 +- bochs/iodev/Makefile.in | 6 +++--- bochs/iodev/display/Makefile.in | 2 +- bochs/iodev/hdimage/Makefile.in | 2 +- bochs/iodev/network/Makefile.in | 2 +- bochs/iodev/sound/Makefile.in | 2 +- bochs/iodev/usb/Makefile.in | 2 +- 11 files changed, 27 insertions(+), 16 deletions(-) diff --git a/bochs/CHANGES b/bochs/CHANGES index 9c8c098b6..e8c0a1675 100644 --- a/bochs/CHANGES +++ b/bochs/CHANGES @@ -1,4 +1,4 @@ -Changes after 2.6.2 (updated Apr 1, 2014): +Changes after 2.6.2 (updated May 3, 2014): - CPU - Bugfixes for CPU emulation correctness (critical fixes for XSAVE, VMX, TBM/BMI and RDRAND instructions) @@ -31,6 +31,7 @@ Changes after 2.6.2 (updated Apr 1, 2014): - configure and compilation fixes for Cygwin and Visual Studio environment - configure option --enable-cdrom now only controls the presence of platform-specific code for device access + - building plugin version with MSVC nmake now supported - Config interface - Added global sound control option for the driver and wave input/output diff --git a/bochs/Makefile.in b/bochs/Makefile.in index bb0002250..a21bf4437 100644 --- a/bochs/Makefile.in +++ b/bochs/Makefile.in @@ -191,6 +191,7 @@ bochs@EXE@: @IODEV_LIB_VAR@ @DISPLAY_LIB_VAR@ @HDIMAGE_LIB_VAR@ @USB_LIB_VAR@ @N $(READLINE_LIB) \ $(EXTRA_LINK_OPTS) \ $(LIBS) + @MANIFEST_LINE@ # Special make target for cygwin/mingw using dlltool instead of # libtool. This creates a .DEF file, and exports file, an import library, @@ -541,7 +542,7 @@ clean: @RMCOMMAND@ niclist.exe @RMCOMMAND@ bochs.out @RMCOMMAND@ bochsout.txt - @RMCOMMAND@ bochs.exp + @RMCOMMAND@ *.exp *.lib *.exe.manifest @RMCOMMAND@ bochs.def @RMCOMMAND@ bochs.scpt @RMCOMMAND@ -rf bochs.app diff --git a/bochs/configure.in b/bochs/configure.in index 9486c3b6a..bd3907d5b 100644 --- a/bochs/configure.in +++ b/bochs/configure.in @@ -2561,16 +2561,23 @@ case $target in LIBS="$LIBS advapi32.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib user32.lib" PLUGIN_TARGET_2=plugins_msvc LINK_VAR="_VCPP" - EXTRA_DLL_TARGET="!INCLUDE makeincl.vc" + EXT_IODEV_DLL_RULES="!INCLUDE makeincl.vc" echo -e "# DLL PLUGIN TEST\n" > iodev/makeincl.vc IODEV_DLL_TARGETS="" - DLL_LIST="acpi biosdev busmouse cmos dma extfpuirq harddrv ioapic iodebug parallel pci pci2isa pci_ide pic speaker unmapped" + DLL_LIST="biosdev busmouse cmos dma extfpuirq harddrv ioapic parallel pic speaker unmapped" + if test "$pci" = "1"; then + DLL_LIST="$DLL_LIST acpi pci pci2isa pci_ide" + fi + if test "$bx_debugger" = 1; then + DLL_LIST="$DLL_LIST iodebug" + fi for i in $DLL_LIST do echo -e "bx_$i.dll: $i.o" >> iodev/makeincl.vc echo -e "\tlink /dll /nologo /subsystem:console /incremental:no /out:\$@ $i.o \$(WIN32_DLL_IMPORT_LIBRARY)\n" >> iodev/makeincl.vc IODEV_DLL_TARGETS="$IODEV_DLL_TARGETS bx_$i.dll" done + MANIFEST_LINE="mt -manifest bochs.exe.manifest build\win32\bochs.manifest -outputresource:bochs.exe;1" else if test "$with_win32" != yes; then LIBS="$LIBS comctl32.lib" @@ -2959,8 +2966,9 @@ AC_SUBST(PLUGIN_LIB) AC_SUBST(PLUGIN_TARGET) AC_SUBST(PLUGIN_TARGET_2) AC_SUBST(IODEV_DLL_TARGETS) -AC_SUBST(EXTRA_DLL_TARGET) +AC_SUBST(EXT_IODEV_DLL_RULES) AC_SUBST(WIN32_DLL_IMPORT_LIB) +AC_SUBST(MANIFEST_LINE) AC_SUBST(INSTALL_PLUGINS_VAR) AC_PATH_PROG(GZIP, gzip) diff --git a/bochs/doc/docbook/user/user.dbk b/bochs/doc/docbook/user/user.dbk index e8c6caf38..0cf3af67e 100644 --- a/bochs/doc/docbook/user/user.dbk +++ b/bochs/doc/docbook/user/user.dbk @@ -533,7 +533,8 @@ currently work with. Plugins Yes Compiling gui and devices as plugins is supported on Linux, MacOS X, - Solaris, Cygwin, MinGW/MSYS and VS2008Ex (workspace provided). + Solaris, Cygwin, MinGW/MSYS, MSVC nmake and the VS2008Ex IDE (workspace provided). + PIC @@ -2230,7 +2231,7 @@ to explicitly turn it off. --enable-voodoo no Enable experimental 3dfx Voodoo Graphics emulation. Currently only - the Voodoo1 model can be emulated. + the Voodoo1 model is known to work (Voodoo2 is under construction). diff --git a/bochs/gui/Makefile.in b/bochs/gui/Makefile.in index 5f01757f8..d311ee7b2 100644 --- a/bochs/gui/Makefile.in +++ b/bochs/gui/Makefile.in @@ -179,7 +179,7 @@ bx_win32.dll: $(GUI_OBJS_WIN32) ##### end DLL section clean: - @RMCOMMAND@ -rf .libs *.la *.a *.lo *.o *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs *.la *.a *.lo *.o *.dll *.exp *.lib *.dll.manifest dist-clean: clean @RMCOMMAND@ Makefile diff --git a/bochs/iodev/Makefile.in b/bochs/iodev/Makefile.in index e3cdefefa..2659ea5b2 100644 --- a/bochs/iodev/Makefile.in +++ b/bochs/iodev/Makefile.in @@ -156,15 +156,15 @@ bx_serial.dll: serial.o serial_raw.o bx_floppy.dll: floppy.o @LINK_DLL@ floppy.o $(WIN32_DLL_IMPORT_LIBRARY) $(FDC_LINK_OPTS@LINK_VAR@) -@EXTRA_DLL_TARGET@ +@EXT_IODEV_DLL_RULES@ ##### end DLL section clean: - @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib *.dll.manifest dist-clean: clean - @RMCOMMAND@ Makefile + @RMCOMMAND@ Makefile makeincl.vc ########################################### # dependencies generated by diff --git a/bochs/iodev/display/Makefile.in b/bochs/iodev/display/Makefile.in index ca56337df..e905aced5 100644 --- a/bochs/iodev/display/Makefile.in +++ b/bochs/iodev/display/Makefile.in @@ -112,7 +112,7 @@ bx_voodoo.dll: voodoo.o ##### end DLL section clean: - @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib *.dll.manifest dist-clean: clean @RMCOMMAND@ Makefile diff --git a/bochs/iodev/hdimage/Makefile.in b/bochs/iodev/hdimage/Makefile.in index cd8943c50..b4abaa466 100644 --- a/bochs/iodev/hdimage/Makefile.in +++ b/bochs/iodev/hdimage/Makefile.in @@ -107,7 +107,7 @@ bx_hdimage.dll: hdimage.o $(HDIMAGE_EXTRA_OBJS) $(CDROM_OBJS) ##### end DLL section clean: - @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib *.dll.manifest dist-clean: clean @RMCOMMAND@ Makefile diff --git a/bochs/iodev/network/Makefile.in b/bochs/iodev/network/Makefile.in index f5d3c14e6..5f9b818c0 100644 --- a/bochs/iodev/network/Makefile.in +++ b/bochs/iodev/network/Makefile.in @@ -134,7 +134,7 @@ bx_ne2k.dll: ne2k.o ##### end DLL section clean: - @RMCOMMAND@ -rf .libs slirp@SLASH@.libs *.lo slirp@SLASH@*.lo *.o slirp@SLASH@*.o *.la *.a *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs slirp@SLASH@.libs *.lo slirp@SLASH@*.lo *.o slirp@SLASH@*.o *.la *.a *.dll *.exp *.lib *.dll.manifest dist-clean: clean @RMCOMMAND@ Makefile diff --git a/bochs/iodev/sound/Makefile.in b/bochs/iodev/sound/Makefile.in index d445f2423..848b8c1b8 100644 --- a/bochs/iodev/sound/Makefile.in +++ b/bochs/iodev/sound/Makefile.in @@ -113,7 +113,7 @@ bx_sb16.dll: sb16.o ##### end DLL section clean: - @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib *.dll.manifest dist-clean: clean @RMCOMMAND@ Makefile diff --git a/bochs/iodev/usb/Makefile.in b/bochs/iodev/usb/Makefile.in index 0a43b78e2..ed3c6628a 100644 --- a/bochs/iodev/usb/Makefile.in +++ b/bochs/iodev/usb/Makefile.in @@ -114,7 +114,7 @@ bx_usb_xhci.dll: usb_xhci.o ##### end DLL section clean: - @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib + @RMCOMMAND@ -rf .libs *.lo *.o *.la *.a *.dll *.exp *.lib *.dll.manifest dist-clean: clean @RMCOMMAND@ Makefile