ci: scripts to setup mingw build environment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/ci/setup-mingw-amd64.ps1 b/ci/setup-mingw-amd64.ps1
new file mode 100644
index 0000000..eaa6709
--- /dev/null
+++ b/ci/setup-mingw-amd64.ps1
@@ -0,0 +1,20 @@
+Set-StrictMode -Version Latest
+
+$ErrorActionPreference = "Stop"
+$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
+
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+
+[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
+
+Write-Host "##############################################################################"
+Write-Host "## Downloading mingw"
+Write-Host "##############################################################################"
+
+$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip"
+$platform = "x86_64"
+
+$wc = New-Object net.webclient
+$wc.Downloadfile($mingw_uri, "${Env:TEMP}/mingw-${platform}.zip")
+
+[System.IO.Compression.ZipFile]::ExtractToDirectory("${Env:TEMP}/mingw-${platform}.zip", $Env:TEMP)
diff --git a/ci/setup-mingw-x86.ps1 b/ci/setup-mingw-x86.ps1
new file mode 100644
index 0000000..832c0f5
--- /dev/null
+++ b/ci/setup-mingw-x86.ps1
@@ -0,0 +1,20 @@
+Set-StrictMode -Version Latest
+
+$ErrorActionPreference = "Stop"
+$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
+
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+
+[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
+
+Write-Host "##############################################################################"
+Write-Host "## Downloading mingw"
+Write-Host "##############################################################################"
+
+$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip"
+$platform = "x86"
+
+$wc = New-Object net.webclient
+$wc.Downloadfile($mingw_uri, "${Env:TEMP}/mingw-${platform}.zip")
+
+[System.IO.Compression.ZipFile]::ExtractToDirectory("${Env:TEMP}/mingw-${platform}.zip", $Env:TEMP)