Skip to content

Commit

Permalink
projects: add support for Visual Studio 17 (2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
snir committed Feb 13, 2022
1 parent 96f85a0 commit 04f9e63
Show file tree
Hide file tree
Showing 13 changed files with 5,831 additions and 4 deletions.
5 changes: 5 additions & 0 deletions projects/Windows/VC17/.gitignore
@@ -0,0 +1,5 @@
/*.opendb
/*.opensdf
/*.sdf
/*.vc.db
/.vs
298 changes: 298 additions & 0 deletions projects/Windows/VC17/curl-all.sln

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions projects/Windows/VC17/lib/.gitignore
@@ -0,0 +1,6 @@
/*.opensdf
/*.sdf
/*.user
/*.vc.db
/*.vcxproj
/.vs
181 changes: 181 additions & 0 deletions projects/Windows/VC17/lib/libcurl.sln

Large diffs are not rendered by default.

2,381 changes: 2,381 additions & 0 deletions projects/Windows/VC17/lib/libcurl.tmpl

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions projects/Windows/VC17/lib/libcurl.vcxproj.filters
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions projects/Windows/VC17/src/.gitignore
@@ -0,0 +1,6 @@
/*.opensdf
/*.sdf
/*.user
/*.vc.db
/*.vcxproj
/.vs
181 changes: 181 additions & 0 deletions projects/Windows/VC17/src/curl.sln

Large diffs are not rendered by default.

2,671 changes: 2,671 additions & 0 deletions projects/Windows/VC17/src/curl.tmpl

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions projects/Windows/VC17/src/curl.vcxproj.filters
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
</Project>
24 changes: 23 additions & 1 deletion projects/build-openssl.bat
Expand Up @@ -44,7 +44,12 @@ rem ***************************************************************************
set OS_PLATFORM=x86
)
if defined PROGRAMFILES(x86) (
set "PF=%PROGRAMFILES(x86)%"
rem Visual Studio was x86-only prior to 14.3
if /i "%~1" == "vc14.3" (
set "PF=%PROGRAMFILES%"
) else (
set "PF=%PROGRAMFILES(x86)%"
)
set OS_PLATFORM=x64
)

Expand Down Expand Up @@ -112,6 +117,19 @@ rem ***************************************************************************
) else (
set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"
)
) else if /i "%~1" == "vc14.3" (
set VC_VER=14.3
set VC_DESC=VC14.3

rem Determine the VC14.3 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2022\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2022\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2022\Community\VC"
)
) else if /i "%~1%" == "x86" (
set BUILD_PLATFORM=x86
) else if /i "%~1%" == "x64" (
Expand Down Expand Up @@ -220,6 +238,7 @@ rem ***************************************************************************
if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.3" set VCVARS_PLATFORM=amd64
)

if exist "%START_DIR%\ms\do_ms.bat" (
Expand All @@ -242,6 +261,8 @@ rem ***************************************************************************
call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.2" (
call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.3" (
call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else (
call "%ABS_VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
)
Expand Down Expand Up @@ -667,6 +688,7 @@ rem
echo vc14 - Use Visual Studio 2015
echo vc14.1 - Use Visual Studio 2017
echo vc14.2 - Use Visual Studio 2019
echo vc14.3 - Use Visual Studio 2022
echo.
echo Platform:
echo.
Expand Down
25 changes: 24 additions & 1 deletion projects/build-wolfssl.bat
Expand Up @@ -39,7 +39,12 @@ rem ***************************************************************************
set OS_PLATFORM=x86
)
if defined PROGRAMFILES(x86) (
set "PF=%PROGRAMFILES(x86)%"
rem Visual Studio was x86-only prior to 14.3
if /i "%~1" == "vc14.3" (
set "PF=%PROGRAMFILES%"
) else (
set "PF=%PROGRAMFILES(x86)%"
)
set OS_PLATFORM=x64
)

Expand Down Expand Up @@ -97,6 +102,20 @@ rem ***************************************************************************
) else (
set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"
)
) else if /i "%~1" == "vc14.3" (
set VC_VER=14.3
set VC_DESC=VC14.3
set VC_TOOLSET=v143

rem Determine the VC14.3 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2022\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2022\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2022\Community\VC"
)
) else if /i "%~1" == "x86" (
set BUILD_PLATFORM=x86
) else if /i "%~1" == "x64" (
Expand Down Expand Up @@ -149,6 +168,7 @@ rem ***************************************************************************
if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.3" set VCVARS_PLATFORM=amd64
)

:start
Expand All @@ -159,6 +179,8 @@ rem ***************************************************************************
call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.2" (
call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.3" (
call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else (
call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
)
Expand Down Expand Up @@ -328,6 +350,7 @@ rem ***************************************************************************
echo vc14 - Use Visual Studio 2015
echo vc14.1 - Use Visual Studio 2017
echo vc14.2 - Use Visual Studio 2019
echo vc14.3 - Use Visual Studio 2022
echo.
echo.
echo Platform:
Expand Down
23 changes: 21 additions & 2 deletions projects/generate.bat
Expand Up @@ -64,6 +64,8 @@ rem ***************************************************************************
set VERSION=VC14
) else if /i "%~1" == "vc15" (
set VERSION=VC15
) else if /i "%~1" == "vc17" (
set VERSION=VC17
) else if /i "%~1" == "-clean" (
set MODE=CLEAN
) else if /i "%~1" == "-?" (
Expand Down Expand Up @@ -99,6 +101,7 @@ rem ***************************************************************************
if "%VERSION%" == "VC12" goto vc12
if "%VERSION%" == "VC14" goto vc14
if "%VERSION%" == "VC15" goto vc15
if "%VERSION%" == "VC17" goto vc17

:vc6
echo.
Expand Down Expand Up @@ -248,12 +251,27 @@ rem ***************************************************************************
call :clean Windows\VC15\lib\libcurl.vcxproj
)

if not "%VERSION%" == "ALL" goto success

:vc17
echo.

if "%MODE%" == "GENERATE" (
echo Generating VC17 project files
call :generate vcxproj Windows\VC17\src\curl.tmpl Windows\VC17\src\curl.vcxproj
call :generate vcxproj Windows\VC17\lib\libcurl.tmpl Windows\VC17\lib\libcurl.vcxproj
) else (
echo Removing VC17 project files
call :clean Windows\VC17\src\curl.vcxproj
call :clean Windows\VC17\lib\libcurl.vcxproj
)

goto success

rem Main generate function.
rem
rem %1 - Project Type (dsp for VC6, vcproj1 for VC7 and VC7.1, vcproj2 for VC8 and VC9
rem or vcxproj for VC10, VC11, VC12, VC14 and VC15)
rem or vcxproj for VC10, VC11, VC12, VC14, VC15 and VC17)
rem %2 - Input template file
rem %3 - Output project file
rem
Expand Down Expand Up @@ -332,7 +350,7 @@ rem
rem Generates a single file xml element.
rem
rem %1 - Project Type (dsp for VC6, vcproj1 for VC7 and VC7.1, vcproj2 for VC8 and VC9
rem or vcxproj for VC10, VC11, VC12, VC14 and VC15)
rem or vcxproj for VC10, VC11, VC12, VC14, VC15 and VC17)
rem %2 - Directory (src, lib, lib\vauth, lib\vquic, lib\vssh, lib\vtls)
rem %3 - Source filename
rem %4 - Output project file
Expand Down Expand Up @@ -433,6 +451,7 @@ rem
echo vc12 - Use Visual Studio 2013
echo vc14 - Use Visual Studio 2015
echo vc15 - Use Visual Studio 2017
echo vc17 - Use Visual Studio 2022
echo.
echo -clean - Removes the project files
goto error
Expand Down

0 comments on commit 04f9e63

Please sign in to comment.