From 4437eccad94c97b19b6577a168e59417664f1979 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Tue, 24 Oct 2023 07:54:29 -0500 Subject: [PATCH] Moved sftp cache Wix Tools install from jenkins-vms to package-msi script Might as well move the knowledge as close to where it is needed to avoid trouble. Ticket: ENT-10801 Changelog: none --- build-scripts/package-msi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/build-scripts/package-msi b/build-scripts/package-msi index 09a98043f..c333f6e6c 100755 --- a/build-scripts/package-msi +++ b/build-scripts/package-msi @@ -7,6 +7,35 @@ WIXPATH="$HOME/wix" +# First see if wix tools are installed, if not, do so +if [ -f "$WIXPATH/candle.exe" ] && [ -f "$WIXPATH/light.exe" ]; then + echo "Wix Tools are installed at $WIXPATH" +else + ( + # Fetch some prerequisites + cd /tmp || exit + echo ' +get /export/images/windows/wix310-binaries.zip +get /export/images/windows/wine-folder.tar.xz +' | sftp -i ~/.ssh/build_artifacts_cache.id_rsa -b - jenkins_sftp_cache@build-artifacts-cache.cloud.cfengine.com + + # Install Wix tools + mkdir -p "$WIXPATH" + cd "$WIXPATH" || exit + unzip /tmp/wix310-binaries.zip + chown "$USER":"$USER" -R "$WIXPATH" + + # Extract pre-installed Wine .NET tree + # This file was generated by using a fresh Wine installation and running "winetricks dotnet45". + cd "$HOME" || exit + tar -xJf /tmp/wine-folder.tar.xz + chown "$USER":"$USER" -R "$HOME"/.wine + + # Prevent .exe files from auto launching with wine (breaks cross compile checks). + sudo update-binfmts --package wine --remove wine /usr/bin/wine + ) +fi + # Wine can handle these tools under the following conditions: # * You must use Wine 32-bit (wine:i386) # * The host must have run "winetricks dotnet45" and clicked through all the