From 76d84969130c0f6910c1c8523091e3b26036c646 Mon Sep 17 00:00:00 2001 From: wch510719826 Date: Sat, 27 Feb 2021 18:24:57 +0800 Subject: [PATCH] Add Visual Studio 2019 support (#2875) --- .github/workflows/vs2019_pull_request.yml | 27 ++ README.md | 2 +- VisualStudio/Debug.props | 1 + appveyor.yml | 3 + fheroes2-vs2015.vcxproj | 186 ++++++++ fheroes2-vs2019.vcxproj | 198 ++++++++ fheroes2.vcxproj | 542 ---------------------- 7 files changed, 416 insertions(+), 543 deletions(-) create mode 100644 .github/workflows/vs2019_pull_request.yml create mode 100644 fheroes2-vs2015.vcxproj create mode 100644 fheroes2-vs2019.vcxproj delete mode 100644 fheroes2.vcxproj diff --git a/.github/workflows/vs2019_pull_request.yml b/.github/workflows/vs2019_pull_request.yml new file mode 100644 index 00000000000..74c919cf038 --- /dev/null +++ b/.github/workflows/vs2019_pull_request.yml @@ -0,0 +1,27 @@ +name: VS2019 + +on: + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + config-type: [Release-SDL1, Release-SDL2] + platform-type: [x86, x64] + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 50 + - name: install packages + run: | + cd script/windows + ./install_packages.bat + cd ../.. + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + - name: compile + run: MSBuild.exe fheroes2-vs2019.vcxproj /property:Configuration=${{ matrix.config-type }} /property:Platform=${{ matrix.platform-type }} diff --git a/README.md b/README.md index 7ebcc0805a1..6b6b2f86891 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Windows - **Optional step**: Install **7-zip** archiver at its default location as `C:\Program Files\7-Zip\7z.exe` or otherwise, you will need to manually extract each downloaded package (follow the instructions shown by batch scripts mentioned below). - open `script/windows` directory and run **install_packages.bat** file. It installs necessary packages for Visual Studio build. - open `script/demo` directory and run **demo_windows.bat** file. It downloads a demo version of the game which is needed for minimum development. -- open **fheroes.vcxproj** by Visual Studio and compile the project. +- open **fheroes2-vs2015.vcxproj** or **fheroes2-vs2019.vcxproj** file depending on your Visual Studio and compile the project. MacOS and Linux ------------------- diff --git a/VisualStudio/Debug.props b/VisualStudio/Debug.props index a0d70e2be32..0d46a8afa31 100644 --- a/VisualStudio/Debug.props +++ b/VisualStudio/Debug.props @@ -5,6 +5,7 @@ + true Disabled WITH_DEBUG;_DEBUG;%(PreprocessorDefinitions) diff --git a/appveyor.yml b/appveyor.yml index dee2d6c2692..415e815f816 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,6 +45,9 @@ install: - if not exist C:\projects\packages call install_packages.bat - cd C:\projects\fheroes2 +build: + project: fheroes2-vs2015.vcxproj + after_build: - cmd: cd C:\projects\fheroes2\build\%platform%\%configuration% - cmd: if "%platform%" == "x86" xcopy /Y /s /Q "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvcp140.dll" "." diff --git a/fheroes2-vs2015.vcxproj b/fheroes2-vs2015.vcxproj new file mode 100644 index 00000000000..ea31b780788 --- /dev/null +++ b/fheroes2-vs2015.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug-SDL1 + Win32 + + + Debug-SDL2 + Win32 + + + Debug-SDL2 + x64 + + + Release-SDL1 + Win32 + + + Debug-SDL1 + x64 + + + Release-SDL1 + x64 + + + Release-SDL2 + Win32 + + + Release-SDL2 + x64 + + + + {DD8F214C-C405-4951-8F98-66B969BA8E08} + Win32Proj + fheroes2 + + + + Application + true + v140 + MultiByte + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + Application + false + v140 + true + MultiByte + + + Application + true + v140 + MultiByte + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + Application + false + v140 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MultiThreadedDebug + + + + + MultiThreadedDebug + + + + + + + MultiThreaded + + + + + MultiThreaded + + + + + + + + + + + + + + + + + diff --git a/fheroes2-vs2019.vcxproj b/fheroes2-vs2019.vcxproj new file mode 100644 index 00000000000..28696e18f39 --- /dev/null +++ b/fheroes2-vs2019.vcxproj @@ -0,0 +1,198 @@ + + + + + Debug-SDL1 + Win32 + + + Debug-SDL2 + Win32 + + + Debug-SDL2 + x64 + + + Release-SDL1 + Win32 + + + Debug-SDL1 + x64 + + + Release-SDL1 + x64 + + + Release-SDL2 + Win32 + + + Release-SDL2 + x64 + + + + {DD8F214C-C405-4951-8F98-66B969BA8E08} + Win32Proj + fheroes2 + 10.0 + + + + Application + true + v142 + MultiByte + + + Application + true + v142 + MultiByte + + + Application + false + v142 + true + MultiByte + + + Application + false + v142 + true + MultiByte + + + Application + true + v142 + MultiByte + + + Application + true + v142 + MultiByte + + + Application + false + v142 + true + MultiByte + + + Application + false + v142 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fheroes2 + + + fheroes2 + + + fheroes2 + + + fheroes2 + + + + + + MultiThreadedDebug + + + + + MultiThreadedDebug + + + + + + + MultiThreaded + + + + + MultiThreaded + + + + + + + + + + + + + + + + + diff --git a/fheroes2.vcxproj b/fheroes2.vcxproj deleted file mode 100644 index 9ddf22cb3ea..00000000000 --- a/fheroes2.vcxproj +++ /dev/null @@ -1,542 +0,0 @@ - - - - - Debug-SDL1 - Win32 - - - Debug-SDL2 - Win32 - - - Debug-SDL2 - x64 - - - Release-SDL1 - Win32 - - - Debug-SDL1 - x64 - - - Release-SDL1 - x64 - - - Release-SDL2 - Win32 - - - Release-SDL2 - x64 - - - - {DD8F214C-C405-4951-8F98-66B969BA8E08} - Win32Proj - fheroes2 - - - - Application - true - v140 - MultiByte - - - Application - true - v140 - MultiByte - - - Application - false - v140 - true - MultiByte - - - Application - false - v140 - true - MultiByte - - - Application - true - v140 - MultiByte - - - Application - true - v140 - MultiByte - - - Application - false - v140 - true - MultiByte - - - Application - false - v140 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MultiThreadedDebug - - - - - MultiThreadedDebug - - - - - - - MultiThreaded - - - - - MultiThreaded - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file