about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-10-07 14:01:18 +0200
committerPietro Albini <pietro@pietroalbini.org>2019-10-25 16:03:10 +0200
commit6dd074a8f6bbf126492e15ea2eadaed54ac3d887 (patch)
treed10b5f9a9f28babf740da25afe656671c6d83235 /src/ci/scripts
parent1c0d76404939f401536271f8053dd999c5f254c9 (diff)
downloadrust-6dd074a8f6bbf126492e15ea2eadaed54ac3d887.tar.gz
rust-6dd074a8f6bbf126492e15ea2eadaed54ac3d887.zip
ci: extract parts of windows-build-deps into scripts
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/install-innosetup.sh18
-rwxr-xr-xsrc/ci/scripts/install-wix.sh17
-rwxr-xr-xsrc/ci/scripts/windows-symlink-build-dir.sh15
3 files changed, 50 insertions, 0 deletions
diff --git a/src/ci/scripts/install-innosetup.sh b/src/ci/scripts/install-innosetup.sh
new file mode 100755
index 00000000000..c410bb9b4ff
--- /dev/null
+++ b/src/ci/scripts/install-innosetup.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# We use InnoSetup and its `iscc` program to also create combined installers.
+# Honestly at this point WIX above and `iscc` are just holdovers from
+# oh-so-long-ago and are required for creating installers on Windows. I think
+# one is MSI installers and one is EXE, but they're not used so frequently at
+# this point anyway so perhaps it's a wash!
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+if isWindows; then
+    curl.exe -o is-install.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-08-22-is.exe
+    is-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
+
+    ciCommandAddPath "C:\\Program Files (x86)\\Inno Setup 5"
+fi
diff --git a/src/ci/scripts/install-wix.sh b/src/ci/scripts/install-wix.sh
new file mode 100755
index 00000000000..b0b22b347e0
--- /dev/null
+++ b/src/ci/scripts/install-wix.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# We use the WIX toolset to create combined installers for Windows, and these
+# binaries are downloaded from https://github.com/wixtoolset/wix3 originally
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+if isWindows; then
+    curl -O https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/wix311-binaries.zip
+    mkdir -p wix/bin
+    cd wix/bin
+    7z x ../../wix311-binaries.zip
+
+    ciCommandSetEnv WIX "$(pwd)/wix"
+fi
diff --git a/src/ci/scripts/windows-symlink-build-dir.sh b/src/ci/scripts/windows-symlink-build-dir.sh
new file mode 100755
index 00000000000..e57128c70f5
--- /dev/null
+++ b/src/ci/scripts/windows-symlink-build-dir.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# We've had issues with the default drive in use running out of space during a
+# build, and it looks like the `C:` drive has more space than the default `D:`
+# drive. We should probably confirm this with the azure pipelines team at some
+# point, but this seems to fix our "disk space full" problems.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
+
+if isWindows; then
+    cmd //c "mkdir c:\\MORE_SPACE"
+    cmd //c "mklink /J build c:\\MORE_SPACE"
+fi