1
+ function GetLibcurlArch ($arch , $version )
2
+ {
3
+ Invoke-WebRequest `
4
+ " https://bintray.com/artifact/download/vszakats/generic/curl-$version -$arch -mingw.zip" `
5
+ - OutFile " curl-$arch -mingw.zip"
6
+
7
+ Expand-Archive - Path " curl-$arch -mingw.zip" - DestinationPath " ."
8
+ Remove-Item " curl-$arch -mingw.zip"
9
+
10
+ if ($arch -eq " win32" )
11
+ {
12
+ $libcurlDll = " libcurl.dll"
13
+ }
14
+ else
15
+ {
16
+ $libcurlDll = " libcurl-x64.dll"
17
+ }
18
+
19
+ Copy-Item - Path " curl-$version -$arch -mingw\bin\$libcurlDll " - Destination " $arch \libcurl.dll"
20
+ Copy-Item - Path " curl-$version -$arch -mingw\bin\*.crt" - Destination " $arch \"
21
+ Remove-Item - Recurse " curl-$version -$arch -mingw"
22
+ }
23
+
24
+ function GetOpensslArch ($arch , $version )
25
+ {
26
+ Invoke-WebRequest `
27
+ " https://bintray.com/artifact/download/vszakats/generic/openssl-$version -$arch -mingw.zip" `
28
+ - OutFile " openssl-$arch -mingw.zip"
29
+
30
+ Expand-Archive - Path " openssl-$arch -mingw.zip" - DestinationPath " ."
31
+ Remove-Item " openssl-$arch -mingw.zip"
32
+ Copy-Item - Path " openssl-$version -$arch -mingw\*.dll" - Destination " $arch \"
33
+ Remove-Item - Recurse " openssl-$version -$arch -mingw"
34
+ }
35
+
36
+ New-Item - Name win64 - ItemType " directory"
37
+ New-Item - Name win32 - ItemType " directory"
38
+
39
+ GetLibcurlArch win64 " 7.69.1"
40
+ GetLibcurlArch win32 " 7.69.1"
41
+
42
+ GetOpensslArch win64 " 1.1.1f"
43
+ GetOpensslArch win32 " 1.1.1f"
44
+
45
+ $compress = @ {
46
+ Path = " win64" , " win32"
47
+ CompressionLevel = " Optimal"
48
+ DestinationPath = " Resources.zip"
49
+ }
50
+
51
+ Compress-Archive @compress
52
+
53
+ Remove-Item - Recurse win64
54
+ Remove-Item - Recurse win32
0 commit comments