From 378ecdd8597aa9056ec525e3135c9b3f0f3d0153 Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 10 Jan 2023 15:08:30 +0000 Subject: [PATCH 1/4] Rename VS2010 directory to VS2013 and update Makefiles etc Signed-off-by: Dave Rodgman --- .../everest/{vs2010 => vs2013}/Hacl_Curve25519.h | 0 .../include/everest/{vs2010 => vs2013}/inttypes.h | 0 .../include/everest/{vs2010 => vs2013}/stdbool.h | 0 Makefile | 14 +++++++------- ...emplate.vcxproj => vs2013-app-template.vcxproj} | 0 ...mplate.vcxproj => vs2013-main-template.vcxproj} | 0 ...10-sln-template.sln => vs2013-sln-template.sln} | 0 scripts/generate_visualc_files.pl | 10 +++++----- scripts/windows_msbuild.bat | 2 +- tests/scripts/check-generated-files.sh | 2 +- visualc/{VS2010 => VS2013}/.gitignore | 0 11 files changed, 14 insertions(+), 14 deletions(-) rename 3rdparty/everest/include/everest/{vs2010 => vs2013}/Hacl_Curve25519.h (100%) rename 3rdparty/everest/include/everest/{vs2010 => vs2013}/inttypes.h (100%) rename 3rdparty/everest/include/everest/{vs2010 => vs2013}/stdbool.h (100%) rename scripts/data_files/{vs2010-app-template.vcxproj => vs2013-app-template.vcxproj} (100%) rename scripts/data_files/{vs2010-main-template.vcxproj => vs2013-main-template.vcxproj} (100%) rename scripts/data_files/{vs2010-sln-template.sln => vs2013-sln-template.sln} (100%) rename visualc/{VS2010 => VS2013}/.gitignore (100%) diff --git a/3rdparty/everest/include/everest/vs2010/Hacl_Curve25519.h b/3rdparty/everest/include/everest/vs2013/Hacl_Curve25519.h similarity index 100% rename from 3rdparty/everest/include/everest/vs2010/Hacl_Curve25519.h rename to 3rdparty/everest/include/everest/vs2013/Hacl_Curve25519.h diff --git a/3rdparty/everest/include/everest/vs2010/inttypes.h b/3rdparty/everest/include/everest/vs2013/inttypes.h similarity index 100% rename from 3rdparty/everest/include/everest/vs2010/inttypes.h rename to 3rdparty/everest/include/everest/vs2013/inttypes.h diff --git a/3rdparty/everest/include/everest/vs2010/stdbool.h b/3rdparty/everest/include/everest/vs2013/stdbool.h similarity index 100% rename from 3rdparty/everest/include/everest/vs2010/stdbool.h rename to 3rdparty/everest/include/everest/vs2013/stdbool.h diff --git a/Makefile b/Makefile index 2f1be6528..1f36a06c9 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ generated_files: tests/generated_files generated_files: visualc_files .PHONY: visualc_files -VISUALC_FILES = visualc/VS2010/mbedTLS.sln visualc/VS2010/mbedTLS.vcxproj +VISUALC_FILES = visualc/VS2013/mbedTLS.sln visualc/VS2013/mbedTLS.vcxproj # TODO: $(app).vcxproj for each $(app) in programs/ visualc_files: $(VISUALC_FILES) @@ -46,9 +46,9 @@ visualc_files: $(VISUALC_FILES) # they just need to be present. $(VISUALC_FILES): | library/generated_files $(VISUALC_FILES): scripts/generate_visualc_files.pl -$(VISUALC_FILES): scripts/data_files/vs2010-app-template.vcxproj -$(VISUALC_FILES): scripts/data_files/vs2010-main-template.vcxproj -$(VISUALC_FILES): scripts/data_files/vs2010-sln-template.sln +$(VISUALC_FILES): scripts/data_files/vs2013-app-template.vcxproj +$(VISUALC_FILES): scripts/data_files/vs2013-main-template.vcxproj +$(VISUALC_FILES): scripts/data_files/vs2013-sln-template.sln # TODO: also the list of .c and .h source files, but not their content $(VISUALC_FILES): echo " Gen $@ ..." @@ -124,10 +124,10 @@ neat: clean_more_on_top $(MAKE) -C programs neat $(MAKE) -C tests neat ifndef WINDOWS - rm -f visualc/VS2010/*.vcxproj visualc/VS2010/mbedTLS.sln + rm -f visualc/VS2013/*.vcxproj visualc/VS2013/mbedTLS.sln else - if exist visualc\VS2010\*.vcxproj del /Q /F visualc\VS2010\*.vcxproj - if exist visualc\VS2010\mbedTLS.sln del /Q /F visualc\VS2010\mbedTLS.sln + if exist visualc\VS2013\*.vcxproj del /Q /F visualc\VS2013\*.vcxproj + if exist visualc\VS2013\mbedTLS.sln del /Q /F visualc\VS2013\mbedTLS.sln endif check: lib tests diff --git a/scripts/data_files/vs2010-app-template.vcxproj b/scripts/data_files/vs2013-app-template.vcxproj similarity index 100% rename from scripts/data_files/vs2010-app-template.vcxproj rename to scripts/data_files/vs2013-app-template.vcxproj diff --git a/scripts/data_files/vs2010-main-template.vcxproj b/scripts/data_files/vs2013-main-template.vcxproj similarity index 100% rename from scripts/data_files/vs2010-main-template.vcxproj rename to scripts/data_files/vs2013-main-template.vcxproj diff --git a/scripts/data_files/vs2010-sln-template.sln b/scripts/data_files/vs2013-sln-template.sln similarity index 100% rename from scripts/data_files/vs2010-sln-template.sln rename to scripts/data_files/vs2013-sln-template.sln diff --git a/scripts/generate_visualc_files.pl b/scripts/generate_visualc_files.pl index 5500c6fad..e4092c01d 100755 --- a/scripts/generate_visualc_files.pl +++ b/scripts/generate_visualc_files.pl @@ -25,12 +25,12 @@ use warnings; use strict; use Digest::MD5 'md5_hex'; -my $vsx_dir = "visualc/VS2010"; +my $vsx_dir = "visualc/VS2013"; my $vsx_ext = "vcxproj"; -my $vsx_app_tpl_file = "scripts/data_files/vs2010-app-template.$vsx_ext"; -my $vsx_main_tpl_file = "scripts/data_files/vs2010-main-template.$vsx_ext"; +my $vsx_app_tpl_file = "scripts/data_files/vs2013-app-template.$vsx_ext"; +my $vsx_main_tpl_file = "scripts/data_files/vs2013-main-template.$vsx_ext"; my $vsx_main_file = "$vsx_dir/mbedTLS.$vsx_ext"; -my $vsx_sln_tpl_file = "scripts/data_files/vs2010-sln-template.sln"; +my $vsx_sln_tpl_file = "scripts/data_files/vs2013-sln-template.sln"; my $vsx_sln_file = "$vsx_dir/mbedTLS.sln"; my $programs_dir = 'programs'; @@ -58,7 +58,7 @@ my @include_directories = qw( include 3rdparty/everest/include/ 3rdparty/everest/include/everest - 3rdparty/everest/include/everest/vs2010 + 3rdparty/everest/include/everest/vs2013 3rdparty/everest/include/everest/kremlib tests/include ); diff --git a/scripts/windows_msbuild.bat b/scripts/windows_msbuild.bat index e41993101..ff2b9f2d1 100644 --- a/scripts/windows_msbuild.bat +++ b/scripts/windows_msbuild.bat @@ -14,7 +14,7 @@ if not "%~1"=="" set "retarget=,PlatformToolset=%1" @rem vcvarsall.bat will silently change the directory to that directory. @rem Setting the VSCMD_START_DIR environment variable causes it to change @rem to that directory instead. -set "VSCMD_START_DIR=%~dp0\..\visualc\VS2010" +set "VSCMD_START_DIR=%~dp0\..\visualc\VS2013" "%vcvarsall%" x64 && ^ msbuild /t:Rebuild /p:Configuration=%cfg%%retarget% /m mbedTLS.sln diff --git a/tests/scripts/check-generated-files.sh b/tests/scripts/check-generated-files.sh index 946794c1d..2bb9fea7c 100755 --- a/tests/scripts/check-generated-files.sh +++ b/tests/scripts/check-generated-files.sh @@ -134,7 +134,7 @@ check scripts/generate_ssl_debug_helpers.py library/ssl_debug_helpers_generated. # generate_visualc_files enumerates source files (library/*.c). It doesn't # care about their content, but the files must exist. So it must run after # the step that creates or updates these files. -check scripts/generate_visualc_files.pl visualc/VS2010 +check scripts/generate_visualc_files.pl visualc/VS2013 check scripts/generate_psa_constants.py programs/psa/psa_constant_names_generated.c check tests/scripts/generate_bignum_tests.py $(tests/scripts/generate_bignum_tests.py --list) check tests/scripts/generate_psa_tests.py $(tests/scripts/generate_psa_tests.py --list) diff --git a/visualc/VS2010/.gitignore b/visualc/VS2013/.gitignore similarity index 100% rename from visualc/VS2010/.gitignore rename to visualc/VS2013/.gitignore From 0f459d75b868af0dfa290bebee2c10e35920582f Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 10 Jan 2023 15:09:19 +0000 Subject: [PATCH 2/4] Update some comments & error messages Signed-off-by: Dave Rodgman --- scripts/generate_visualc_files.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_visualc_files.pl b/scripts/generate_visualc_files.pl index e4092c01d..4fad322a6 100755 --- a/scripts/generate_visualc_files.pl +++ b/scripts/generate_visualc_files.pl @@ -1,9 +1,9 @@ #!/usr/bin/env perl -# Generate main file, individual apps and solution files for MS Visual Studio -# 2010 +# Generate main file, individual apps and solution files for +# MS Visual Studio 2013 # -# Must be run from mbedTLS root or scripts directory. +# Must be run from Mbed TLS root or scripts directory. # Takes no argument. # # Copyright The Mbed TLS Contributors @@ -256,7 +256,7 @@ sub del_vsx_files { sub main { if( ! check_dirs() ) { chdir '..' or die; - check_dirs or die "Must but run from mbedTLS root or scripts dir\n"; + check_dirs or die "Must be run from Mbed TLS root or scripts dir\n"; } # Remove old files to ensure that, for example, project files from deleted From 05bdb13be3993e8c3f374ee3ed448b31c5443fb4 Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 10 Jan 2023 15:09:36 +0000 Subject: [PATCH 3/4] Update README and add changelog entry Signed-off-by: Dave Rodgman --- ChangeLog.d/vs2013.txt | 4 ++++ README.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 ChangeLog.d/vs2013.txt diff --git a/ChangeLog.d/vs2013.txt b/ChangeLog.d/vs2013.txt new file mode 100644 index 000000000..6fe7a5e7f --- /dev/null +++ b/ChangeLog.d/vs2013.txt @@ -0,0 +1,4 @@ +Changes + * Visual Studio: Rename the directory containing Visual Studio files from + visualc/VS2010 to visualc/VS2013 as we do not support building with versions + older than 2013. Update the solution file to specify VS2013 as a minimum. diff --git a/README.md b/README.md index cc70f5610..7b45a1f15 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ subproject. ### Microsoft Visual Studio -The build files for Microsoft Visual Studio are generated for Visual Studio 2010. +The build files for Microsoft Visual Studio are generated for Visual Studio 2013. The solution file `mbedTLS.sln` contains all the basic projects needed to build the library and all the programs. The files in tests are not generated and compiled, as these need Python and perl environments as well. However, the selftest program in `programs/test/` is still available. From 7a75d222749d08d10699a9bb9c4f97a99557b8cc Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 10 Jan 2023 15:10:35 +0000 Subject: [PATCH 4/4] Update solution template to require VS2013 Signed-off-by: Dave Rodgman --- scripts/data_files/vs2013-sln-template.sln | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/data_files/vs2013-sln-template.sln b/scripts/data_files/vs2013-sln-template.sln index fc65a0be5..615ce0423 100644 --- a/scripts/data_files/vs2013-sln-template.sln +++ b/scripts/data_files/vs2013-sln-template.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbedTLS", "mbedTLS.vcxproj", "{46CF2D25-6A36-4189-B59C-E4815388E554}" EndProject APP_ENTRIES