Skip to content

Commit

Permalink
Merge pull request #1331 from cfengine/ENT-10801/3.21
Browse files Browse the repository at this point in the history
ENT-10801: Moved sftp cache Wix Tools install from jenkins-vms to package-msi script (3.21)
  • Loading branch information
craigcomstock authored Oct 31, 2023
2 parents 5b92fa7 + 224e61d commit 2f86236
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions build-scripts/package-msi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,40 @@

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 -b - [email protected]

# check checksums
sha256sum -c - <<EOF || exit 42
493145b3fac22bdf8c55142a9f96ef8136d56b38d78a2322f13f1ba11f9cf2f8 wix310-binaries.zip
3510fd8c4ecb4a9c479dfe43849183c666f9e41b019fc7135dc8735d0032d16e wine-folder.tar.xz
EOF
# 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
Expand Down

0 comments on commit 2f86236

Please sign in to comment.