Commit 9e588060d93da064ca288db021def3d81fa13790

Edward Thomson 2018-07-14T13:03:16

ci: scripts to setup mingw build environment

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)