Revision: 7923 https://osdn.net/projects/ttssh2/scm/svn/commits/7923 Author: yutakapon Date: 2019-08-08 22:10:31 +0900 (Thu, 08 Aug 2019) Log Message: ----------- libresslを使いビルドできるようにした。 お試しのため、VS2019のプロジェクトファイルのみ修正。 チケット #36876 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/36876 Modified Paths: -------------- branches/libressl_basedon_openssl111/TTProxy/TTProxy.v16.vcxproj branches/libressl_basedon_openssl111/libs/buildall.bat branches/libressl_basedon_openssl111/ttssh2/ttxssh/ttxssh.v16.vcxproj Added Paths: ----------- branches/libressl_basedon_openssl111/libs/buildlibressl.bat -------------- next part -------------- Modified: branches/libressl_basedon_openssl111/TTProxy/TTProxy.v16.vcxproj =================================================================== --- branches/libressl_basedon_openssl111/TTProxy/TTProxy.v16.vcxproj 2019-08-08 11:59:14 UTC (rev 7922) +++ branches/libressl_basedon_openssl111/TTProxy/TTProxy.v16.vcxproj 2019-08-08 13:10:31 UTC (rev 7923) @@ -68,7 +68,7 @@ <ClCompile> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> - <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\teraterm\common;YCL\include;$(SolutionDir)..\libs\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\teraterm\common;YCL\include;$(SolutionDir)..\libs\libressl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;TTX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -107,7 +107,7 @@ </Midl> <ClCompile> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\teraterm\common;YCL\include;$(SolutionDir)..\libs\openssl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\teraterm\common;YCL\include;$(SolutionDir)..\libs\libressl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;TTX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> Modified: branches/libressl_basedon_openssl111/libs/buildall.bat =================================================================== --- branches/libressl_basedon_openssl111/libs/buildall.bat 2019-08-08 11:59:14 UTC (rev 7922) +++ branches/libressl_basedon_openssl111/libs/buildall.bat 2019-08-08 13:10:31 UTC (rev 7923) @@ -1,4 +1,4 @@ CALL buildoniguruma6.bat CALL buildzlib.bat -CALL buildopenssl.bat +CALL buildlibressl.bat CALL buildSFMT.bat Added: branches/libressl_basedon_openssl111/libs/buildlibressl.bat =================================================================== --- branches/libressl_basedon_openssl111/libs/buildlibressl.bat (rev 0) +++ branches/libressl_basedon_openssl111/libs/buildlibressl.bat 2019-08-08 13:10:31 UTC (rev 7923) @@ -0,0 +1,86 @@ +pushd libressl + +SET LIBRESSL_BUILD=FALSE + +IF NOT EXIST crypto\Debug\crypto.lib SET LIBRESSL_BUILD=TRUE +IF NOT EXIST crypto\Release\crypto.lib SET LIBRESSL_BUILD=TRUE + +IF %LIBRESSL_BUILD%==FALSE GOTO build_end + + +if not "%VSINSTALLDIR%" == "" goto vsinstdir + +:check_2013 +if "%VS120COMNTOOLS%" == "" goto check_2015 +if not exist "%VS120COMNTOOLS%\VsDevCmd.bat" goto check_2015 +call "%VS120COMNTOOLS%\VsDevCmd.bat" +goto vs2013 + +:check_2015 +if "%VS140COMNTOOLS%" == "" goto check_2017 +if not exist "%VS140COMNTOOLS%\VsDevCmd.bat" goto check_2017 +call "%VS140COMNTOOLS%\VsDevCmd.bat" +goto vs2015 + +:check_2017 +if "%VS150COMNTOOLS%" == "" goto check_2019 +if not exist "%VS150COMNTOOLS%\VsDevCmd.bat" goto check_2019 +call "%VS150COMNTOOLS%\VsDevCmd.bat" +goto vs2017 + +:check_2019 +if "%VS160COMNTOOLS%" == "" goto novs +if not exist "%VS160COMNTOOLS%\VsDevCmd.bat" goto novs +call "%VS160COMNTOOLS%\VsDevCmd.bat" +goto vs2019 + +:novs +echo "Can't find Visual Studio" +exit /b + +:vsinstdir +rem Visual Studio\x82̃o\x81[\x83W\x83\x87\x83\x93\x94\xBB\x95\xCA +set VSCMNDIR="%VSINSTALLDIR%\Common7\Tools\" +set VSCMNDIR=%VSCMNDIR:\\=\% + +if /I %VSCMNDIR% EQU "%VS120COMNTOOLS%" goto vs2013 +if /I %VSCMNDIR% EQU "%VS140COMNTOOLS%" goto vs2015 +if /I %VSCMNDIR% EQU "%VS150COMNTOOLS%" goto vs2017 +if /I %VSCMNDIR% EQU "%VS160COMNTOOLS%" goto vs2019 + +echo Unknown Visual Studio version +exit /b + +:vs2013 +set CMAKE_GENERATOR=Visual Studio 12 2013 +goto vsend + +:vs2015 +set CMAKE_GENERATOR=Visual Studio 14 2015 +goto vsend + +:vs2017 +set CMAKE_GENERATOR=Visual Studio 15 2016 +goto vsend + +:vs2019 +set CMAKE_GENERATOR=Visual Studio 16 2019 +goto vsend + +:vsend + + +cmake -G "%CMAKE_GENERATOR%" -A Win32 +perl -pi.bak -e "s/MD/MT/g" CMakeCache.txt +cmake -G "%CMAKE_GENERATOR%" -A Win32 + +:build_debug +IF EXIST crypto\Debug\crypto.lib GOTO build_release +devenv /build Debug LibreSSL.sln /project crypto /projectconfig Debug + +:build_release +IF EXIST crypto\Release\crypto.lib GOTO build_end +devenv /build Release LibreSSL.sln /project crypto /projectconfig Release + +:build_end +popd Modified: branches/libressl_basedon_openssl111/ttssh2/ttxssh/ttxssh.v16.vcxproj =================================================================== --- branches/libressl_basedon_openssl111/ttssh2/ttxssh/ttxssh.v16.vcxproj 2019-08-08 11:59:14 UTC (rev 7922) +++ branches/libressl_basedon_openssl111/ttssh2/ttxssh/ttxssh.v16.vcxproj 2019-08-08 13:10:31 UTC (rev 7923) @@ -65,7 +65,7 @@ <ClCompile> <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\openssl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\libressl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> @@ -82,9 +82,9 @@ <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>odbc32.lib;odbccp32.lib;ws2_32.lib;libcrypto.lib;zlibd.lib;ttpcmn.lib;dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>odbc32.lib;odbccp32.lib;ws2_32.lib;crypto.lib;zlibd.lib;ttpcmn.lib;dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <SuppressStartupBanner>true</SuppressStartupBanner> - <AdditionalLibraryDirectories>$(SolutionDir)..\libs\openssl\out32.dbg;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>$(SolutionDir)..\libs\libressl\crypto\Debug;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile> <DelayLoadDLLs>dnsapi.dll;user32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> @@ -112,7 +112,7 @@ <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> - <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\openssl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\libs\libressl\include;$(SolutionDir)..\teraterm\teraterm;$(SolutionDir)..\libs\zlib;$(SolutionDir)matcher;$(SolutionDir)putty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> @@ -128,9 +128,9 @@ <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>odbc32.lib;odbccp32.lib;ws2_32.lib;libcrypto.lib;zlib.lib;ttpcmn.lib;dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>odbc32.lib;odbccp32.lib;ws2_32.lib;crypto.lib;zlib.lib;ttpcmn.lib;dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <SuppressStartupBanner>true</SuppressStartupBanner> - <AdditionalLibraryDirectories>$(SolutionDir)..\libs\openssl\out32;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>$(SolutionDir)..\libs\libressl\crypto\Release;$(SolutionDir)..\libs\zlib;$(SolutionDir)..\teraterm\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile> <DelayLoadDLLs>dnsapi.dll;user32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation>