diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7150411..56b96c5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,3 +88,41 @@ jobs: make -j "$(sysctl -n hw.physicalcpu)" 2>&1 | tee build.log - name: "Summarize warnings" run: python3 ./scripts/count-warnings.py build.log + + build_msvc_debug: + name: "MSVC 14 Debug (win-2019)" + runs-on: windows-2019 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + shell: pwsh + run: | + vcpkg install libpng sdl1 sdl1-net + vcpkg integrate install + - name: "Build" + shell: pwsh + env: + PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64' + run: | + # build steps + cd visualc_net + MSBuild -m dosbox.sln -p:Configuration=Debug + + build_msvc_release: + name: "MSVC 14 Release (win-2019)" + runs-on: windows-2019 + steps: + - uses: actions/checkout@v1 + - name: "Install packages" + shell: pwsh + run: | + vcpkg install libpng sdl1 sdl1-net + vcpkg integrate install + - name: "Build" + shell: pwsh + env: + PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64' + run: | + # build steps + cd visualc_net + MSBuild -m dosbox.sln -p:Configuration=Release diff --git a/INSTALL b/INSTALL index 3fa05e9d..21c2e084 100644 --- a/INSTALL +++ b/INSTALL @@ -100,6 +100,21 @@ NOTE: If capslock and numlock appear to be broken. open src/ints/bios_keyboard.cpp and go to line 30 and read there how to fix it. -Build instructions for VC++6 -Don't use VC++ 6: it creates faulty code in core_normal.cpp -Later Visual Studio versions work fine (vs2003/.net up to vs2010) +Build instructions for Visual Studio + +Solution files included with the project are compatible with Visual Studio 2019. +They were tested using Community Edition and Enterprise Edition. + +First, you need to install vcpkg to install build dependencies. +See https://github.com/microsoft/vcpkg for details. + +Once vcpkg is installed and bootstrapped, open PowerShell, and run: + + PS> .\vcpkg integrate install + PS> .\vcpkg install libpng sdl1 sdl1-net + +These two steps will ensure, that MSVC will be able to find and link +dependency libraries. + +Start Visual Studio, open file: visualc_net\dosbox.sln +and build all projects (Ctrl + Shift + B). diff --git a/src/platform/visualc/begin_code.h b/src/platform/visualc/begin_code.h new file mode 100644 index 00000000..794ed755 --- /dev/null +++ b/src/platform/visualc/begin_code.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/src/platform/visualc/close_code.h b/src/platform/visualc/close_code.h new file mode 100644 index 00000000..cde52646 --- /dev/null +++ b/src/platform/visualc/close_code.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/src/platform/visualc/config.h b/src/platform/visualc/config.h index 8b7bab26..c71dcec9 100644 --- a/src/platform/visualc/config.h +++ b/src/platform/visualc/config.h @@ -1,10 +1,10 @@ -#define VERSION "SVN" +#define VERSION "staging" /* Define to 1 to enable internal debugger, requires libcurses */ #define C_DEBUG 0 /* Define to 1 to enable output=ddraw */ -#define C_DDRAW 1 +#define C_DDRAW 1 /* Define to 1 to enable screenshots, requires libpng */ #define C_SSHOT 1 diff --git a/src/platform/visualc/sdl.h b/src/platform/visualc/sdl.h new file mode 100644 index 00000000..977b87ec --- /dev/null +++ b/src/platform/visualc/sdl.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/src/platform/visualc/sdl_endian.h b/src/platform/visualc/sdl_endian.h new file mode 100644 index 00000000..9e8368df --- /dev/null +++ b/src/platform/visualc/sdl_endian.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/src/platform/visualc/sdl_opengl.h b/src/platform/visualc/sdl_opengl.h new file mode 100644 index 00000000..8e303e88 --- /dev/null +++ b/src/platform/visualc/sdl_opengl.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/src/platform/visualc/sdl_thread.h b/src/platform/visualc/sdl_thread.h new file mode 100644 index 00000000..0774b736 --- /dev/null +++ b/src/platform/visualc/sdl_thread.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/src/platform/visualc/sdl_version.h b/src/platform/visualc/sdl_version.h new file mode 100644 index 00000000..1c3083c1 --- /dev/null +++ b/src/platform/visualc/sdl_version.h @@ -0,0 +1,4 @@ +// This file exists only for MSVC builds. +// It's needed because vcpkg does not set SDL subdirectory in includes list +// for projects that do not use cmake. +#include diff --git a/visualc_net/.gitignore b/visualc_net/.gitignore index d2c259ff..73d781f1 100644 --- a/visualc_net/.gitignore +++ b/visualc_net/.gitignore @@ -1,11 +1,16 @@ -# svn:ignore -Release +# Visual Studio +.vs Debug +Release +*.vcxproj.filters +*.vcxproj.user +*.ncb +*.suo + +# DOSBox +*.conf + +# autoconf .deps Makefile Makefile.in -*.ncb -*.suo -*.conf -.vs - diff --git a/visualc_net/Makefile.am b/visualc_net/Makefile.am index 6d1c6dd6..4820a135 100644 --- a/visualc_net/Makefile.am +++ b/visualc_net/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = dosbox.sln dosbox.vcproj \ No newline at end of file +EXTRA_DIST = dosbox.sln dosbox.vcxproj diff --git a/visualc_net/dosbox.sln b/visualc_net/dosbox.sln index 5f2be4c3..e2f16cab 100644 --- a/visualc_net/dosbox.sln +++ b/visualc_net/dosbox.sln @@ -1,21 +1,24 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dosbox", "dosbox.vcproj", "{7FCFFB9B-8629-4D51-849C-8490CECF8AB7}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29324.140 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dosbox", "dosbox.vcxproj", "{7FCFFB9B-8629-4D51-849C-8490CECF8AB7}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Debug.ActiveCfg = Debug|Win32 - {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Debug.Build.0 = Debug|Win32 - {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Release.ActiveCfg = Release|Win32 - {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Release.Build.0 = Release|Win32 + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Debug|x86.ActiveCfg = Debug|Win32 + {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Debug|x86.Build.0 = Debug|Win32 + {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Release|x86.ActiveCfg = Release|Win32 + {7FCFFB9B-8629-4D51-849C-8490CECF8AB7}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + SolutionGuid = {1EA069D9-1083-4929-A0BE-3AEB891D8BA2} EndGlobalSection EndGlobal diff --git a/visualc_net/dosbox.vcproj b/visualc_net/dosbox.vcproj deleted file mode 100644 index 5a1bac18..00000000 --- a/visualc_net/dosbox.vcproj +++ /dev/null @@ -1,920 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/visualc_net/dosbox.vcxproj b/visualc_net/dosbox.vcxproj new file mode 100644 index 00000000..0b2203e0 --- /dev/null +++ b/visualc_net/dosbox.vcxproj @@ -0,0 +1,370 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + {7FCFFB9B-8629-4D51-849C-8490CECF8AB7} + + + + Application + v142 + false + MultiByte + + + Application + v142 + false + MultiByte + + + + + + + + + + + + + <_ProjectFileVersion>16.0.29311.71 + + + .\Debug\ + .\Debug\ + + + .\Release\ + .\Release\ + false + + + + Disabled + ..\include;..\src\platform\visualc;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + true + .\Debug\dosbox.pch + .\Debug\ + .\Debug\ + .\Debug\ + true + Level3 + true + EditAndContinue + Default + + + opengl32.lib;sdl_net.lib;winmm.lib;libpng16d.lib;sdlmaind.lib;sdl.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) + .\Debug\dosbox.exe + true + true + .\Debug\dosbox.pdb + Console + MachineX86 + false + msvcrt.lib + + + .\Debug/dosbox.tlb + + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + Full + AnySuitable + true + Speed + true + ..\include;..\src\platform\visualc;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + true + true + .\Release\dosbox.pch + AssemblyAndSourceCode + .\Release\ + .\Release\ + .\Release\ + true + Level3 + true + None + Default + true + + + opengl32.lib;winmm.lib;libpng16.lib;sdl_net.lib;sdl.lib;sdlmain.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) + .\Release/dosbox.exe + true + true + + true + Console + MachineX86 + false + + + .\Release/dosbox.tlb + + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file