@@ -15,9 +15,10 @@ Function ThrowIfError($exitCode, $module)
1515
1616# $ErrorActionPreference = "Stop"
1717
18- echo $env: Path
19- Get-Command nmake
20- Get-Command link
18+ # Get-VSSetupInstance
19+ # Get-InstalledModule -Name "VSSetup"
20+
21+ Import-VisualStudioVars - VisualStudioVersion 160 - Architecture $vcvarsarch
2122
2223$x64Dir = If ($x64 ) { " \x64" } Else { " " }
2324$distname = If ($x64 ) { " win64" } Else { " win32" }
@@ -63,30 +64,28 @@ Set-Location ..\..
6364
6465# openssl
6566$sslTarget = If ($x64 ) { " VC-WIN64A" } Else { " VC-WIN32" }
66- $sslDo = If ($x64 ) { " do_win64a.bat" } Else { " do_ms.bat" }
6767
6868Set-Location .\openssl
69- Start-Process - NoNewWindow - Wait perl " Configure no-asm enable-static-engine $sslTarget "
70- Start-Process - NoNewWindow - Wait .\ms\$sslDo
71- $p = Start-Process - NoNewWindow - Wait - PassThru nmake " -f .\ms\nt.mak init lib"
69+ Start-Process - NoNewWindow - Wait perl " Configure no-asm no-shared $sslTarget "
70+ $p = Start-Process - NoNewWindow - Wait - PassThru nmake
7271ThrowIfError $p.ExitCode " openssl"
7372
74- $sslLib = Join-Path (pwd) " out32 "
75- $sslInc = Join-Path (pwd) " inc32 "
73+ $sslLib = Join-Path (pwd).Path
74+ $sslInc = Join-Path (pwd) " include "
7675Set-Location ..
7776
7877# xmlsec
7978Set-Location .\xmlsec\win32
8079cscript configure.js lib= " $zlibLib ;$iconvLib ;$xmlLib ;$sslLib ;$xsltLib " include= " $zlibInc ;$iconvInc ;$xmlInc ;$sslInc ;$xsltInc " iconv= yes xslt= yes unicode= yes static = yes with- dl= no
8180nmake xmlseca
82- $p = Start-Process - NoNewWindow - Wait - PassThru nmake xmlseca
83- ThrowIfError $p.ExitCode " xmlsec"
81+ # $p = Start-Process -NoNewWindow -Wait -PassThru nmake xmlseca
82+ # ThrowIfError $p.ExitCode "xmlsec"
8483$xmlsecLib = Join-Path (pwd) binaries
8584$xmlsecInc = Join-Path (pwd) ..\include
8685Set-Location ../ ..
8786
8887# Pushed by Import-VisualStudioVars
89- # Pop-EnvironmentBlock
88+ Pop-EnvironmentBlock
9089
9190# Bundle releases
9291Function BundleRelease ($name , $lib , $inc )
@@ -101,8 +100,8 @@ Function BundleRelease($name, $lib, $inc)
101100 Copy-Item - Recurse $inc .\dist\$name \include
102101 Get-ChildItem - File - Recurse .\dist\$name \include | Where {$_.Name -NotMatch " .h$" } | Remove-Item
103102
104- # Write-Zip .\dist\$name .\dist\$name.zip
105- Compress-Archive - Path .\dist\$name - DestinationPath .\dist\$name.zip
103+ Write-Zip .\dist\$name .\dist\$name.zip
104+ # Compress-Archive -Path .\dist\$name -DestinationPath .\dist\$name.zip
106105 Remove-Item - Recurse - Path .\dist\$name
107106}
108107
@@ -116,5 +115,5 @@ BundleRelease "iconv-1.16.$distname" (dir $iconvLib\iconv_a*) (dir $iconvInc\*)
116115BundleRelease " libxml2-2.9.10.$distname " (dir $xmlLib \* ) (Get-Item $xmlInc \libxml)
117116BundleRelease " libxslt-1.1.34.$distname " (dir .\libxslt\win32\bin.msvc\* ) (Get-Item .\libxslt\libxslt, .\libxslt\libexslt)
118117BundleRelease " zlib-1.2.11.$distname " (Get-Item .\zlib\* .* ) (Get-Item .\zlib\zconf.h, .\zlib\zlib.h)
119- BundleRelease " openssl-1.0.2k .$distname " (dir $sslLib \* ) (Get-Item $sslInc \openssl)
118+ # BundleRelease "openssl-1.1.1i .$distname" (dir $sslLib\*) (Get-Item $sslInc\openssl)
120119BundleRelease " xmlsec-1.2.31.$distname " (dir $xmlsecLib \* ) (Get-Item $xmlsecInc \xmlsec)
0 commit comments