@@ -15,9 +15,10 @@ Function ThrowIfError($exitCode, $module)
15
15
16
16
# $ErrorActionPreference = "Stop"
17
17
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
21
22
22
23
$x64Dir = If ($x64 ) { " \x64" } Else { " " }
23
24
$distname = If ($x64 ) { " win64" } Else { " win32" }
@@ -63,30 +64,28 @@ Set-Location ..\..
63
64
64
65
# openssl
65
66
$sslTarget = If ($x64 ) { " VC-WIN64A" } Else { " VC-WIN32" }
66
- $sslDo = If ($x64 ) { " do_win64a.bat" } Else { " do_ms.bat" }
67
67
68
68
Set-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
72
71
ThrowIfError $p.ExitCode " openssl"
73
72
74
- $sslLib = Join-Path (pwd) " out32 "
75
- $sslInc = Join-Path (pwd) " inc32 "
73
+ $sslLib = Join-Path (pwd).Path
74
+ $sslInc = Join-Path (pwd) " include "
76
75
Set-Location ..
77
76
78
77
# xmlsec
79
78
Set-Location .\xmlsec\win32
80
79
cscript 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
81
80
nmake 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"
84
83
$xmlsecLib = Join-Path (pwd) binaries
85
84
$xmlsecInc = Join-Path (pwd) ..\include
86
85
Set-Location ../ ..
87
86
88
87
# Pushed by Import-VisualStudioVars
89
- # Pop-EnvironmentBlock
88
+ Pop-EnvironmentBlock
90
89
91
90
# Bundle releases
92
91
Function BundleRelease ($name , $lib , $inc )
@@ -101,8 +100,8 @@ Function BundleRelease($name, $lib, $inc)
101
100
Copy-Item - Recurse $inc .\dist\$name \include
102
101
Get-ChildItem - File - Recurse .\dist\$name \include | Where {$_.Name -NotMatch " .h$" } | Remove-Item
103
102
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
106
105
Remove-Item - Recurse - Path .\dist\$name
107
106
}
108
107
@@ -116,5 +115,5 @@ BundleRelease "iconv-1.16.$distname" (dir $iconvLib\iconv_a*) (dir $iconvInc\*)
116
115
BundleRelease " libxml2-2.9.10.$distname " (dir $xmlLib \* ) (Get-Item $xmlInc \libxml)
117
116
BundleRelease " libxslt-1.1.34.$distname " (dir .\libxslt\win32\bin.msvc\* ) (Get-Item .\libxslt\libxslt, .\libxslt\libexslt)
118
117
BundleRelease " 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)
120
119
BundleRelease " xmlsec-1.2.31.$distname " (dir $xmlsecLib \* ) (Get-Item $xmlsecInc \xmlsec)
0 commit comments