1
0

build_vs_2019_openssl_64.cmd 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. @if not exist "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" goto missingVisualStudio2019x64
  2. @if not exist "c:\Program Files\7-Zip\7z.exe" goto missing7-Zip
  3. @if not exist "c:\Strawberry\perl\bin\perl.exe" goto missingPerl
  4. @if not exist "c:\Program Files\NASM\nasm.exe" goto missingNASM
  5. SET PATH=c:\Program Files\7-Zip\;c:\Strawberry\perl\bin\;c:\Program Files\NASM\;%PATH%
  6. @if not exist "c:\OpenSSL\" mkdir "c:\OpenSSL"
  7. SET OPENSSLFILENAME=openssl-1.0.1u.7z
  8. SET PLATFORM=x64
  9. SET OPENSSLFOLDER=openssl-1.0.1u
  10. call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
  11. @echo ************************************
  12. @echo * Build OpenSSL (%OPENSSLFILENAME%) Debug x64
  13. @echo ************************************
  14. @if exist %OPENSSLFOLDER%%PLATFORM% (
  15. @echo Delete temporary '%OPENSSLFOLDER%%PLATFORM%' folder
  16. @call rd /S /Q %OPENSSLFOLDER%%PLATFORM%
  17. )
  18. call 7z.exe x -y %OPENSSLFILENAME% -o%OPENSSLFOLDER%%PLATFORM%
  19. cd %OPENSSLFOLDER%%PLATFORM%
  20. cd %OPENSSLFOLDER%
  21. @ perl Configure debug-VC-WIN64A no-shared --prefix=c:\OpenSSL\Debug_x64_static
  22. call ms\do_nasm
  23. call ms\do_win64a
  24. nmake -f ms\nt.mak
  25. nmake -f ms\nt.mak install
  26. call xcopy /Y /D tmp32.dbg\lib.pdb c:\OpenSSL\Debug_x64_static\lib\
  27. @echo **************************************
  28. @echo * Build OpenSSL (%OPENSSLFILENAME%) Release x64
  29. @echo **************************************
  30. @if exist %OPENSSLFOLDER%%PLATFORM% (
  31. @echo Delete temporary '%OPENSSLFOLDER%%PLATFORM%' folder
  32. @call rd /S /Q %OPENSSLFOLDER%%PLATFORM%
  33. )
  34. call 7z.exe x -y %OPENSSLFILENAME% -o%OPENSSLFOLDER%%PLATFORM%
  35. cd %OPENSSLFOLDER%%PLATFORM%
  36. cd %OPENSSLFOLDER%
  37. @ perl Configure VC-WIN64A no-shared --prefix=c:\OpenSSL\Release_x64_static
  38. call ms\do_nasm
  39. call ms\do_win64a
  40. nmake -f ms\nt.mak
  41. nmake -f ms\nt.mak install
  42. call xcopy /Y /D tmp32\lib.pdb c:\OpenSSL\Release_x64_static\lib\
  43. @pause
  44. goto :exit
  45. :missing7-Zip
  46. @echo 7-Zip archive tool not detected
  47. @pause
  48. @exit
  49. goto :eof
  50. :missingPerl
  51. @echo Perl interpretator not detected
  52. @pause
  53. @exit
  54. goto :eof
  55. :missingVisualStudio2019x64
  56. @echo Microsoft Visual Studio 2019 for x64 configuration not detected
  57. @pause
  58. @exit
  59. goto :eof
  60. :missingNASM
  61. @echo Microsoft NASM assembler not detected
  62. @pause
  63. @exit
  64. goto :eof
  65. ::-----------------------------------------------------------------------------
  66. :: EXIT
  67. ::-----------------------------------------------------------------------------
  68. :exit
  69. endlocal & exit /b %rc%