gecko-dev/taskcluster/scripts/misc/build-mingw32-nsis.sh
Mike Hommey b0f3ca8044 Bug 1490573 - Use fetches for nsis and wine toolchain tasks. r=froydnj
These toolchain tasks are the last ones using the historical
download-tools script from build/unix/build-gcc, which invokes gpg to
validate the downloaded tarballs. The consequence is that gpg-agent is
spawned and stays running, preventing a cleanup script from doing its
job, making the tasks fail.

Fetches are the new way to download sources, and can also do gpg
validation without those caveats.

The download-tools.sh script can then be removed as it's not used
anymore.

Differential Revision: https://phabricator.services.mozilla.com/D22682

--HG--
extra : moz-landing-system : lando
2019-03-11 01:38:46 +00:00

52 lines
1.8 KiB
Bash
Executable file

#!/bin/bash
set -x -e -v
# We set the INSTALL_DIR to match the directory that it will run in exactly,
# otherwise we get an NSIS error of the form:
# checking for NSIS version...
# DEBUG: Executing: `/home/worker/workspace/build/src/mingw32/
# DEBUG: The command returned non-zero exit status 1.
# DEBUG: Its error output was:
# DEBUG: | Error: opening stub "/home/worker/workspace/mingw32/
# DEBUG: | Error initalizing CEXEBuild: error setting
# ERROR: Failed to get nsis version.
WORKSPACE=$HOME/workspace
HOME_DIR=$WORKSPACE/build
INSTALL_DIR=$WORKSPACE/build/src/mingw32
TOOLTOOL_DIR=$WORKSPACE/build/src
UPLOAD_DIR=$HOME/artifacts
mkdir -p $INSTALL_DIR
cd $TOOLTOOL_DIR
. taskcluster/scripts/misc/tooltool-download.sh
# After tooltool runs, we move the stuff we just downloaded.
# As explained above, we have to build nsis to the directory it
# will eventually be run from, which is the same place we just
# installed our compiler. But at the end of the script we want
# to package up what we just built. If we don't move the compiler,
# we will package up the compiler we downloaded along with the
# stuff we just built.
mv mingw32 mingw32-gcc
export PATH="$TOOLTOOL_DIR/mingw32-gcc/bin:$PATH"
cd $HOME_DIR
# --------------
cd zlib-1.2.11
make -f win32/Makefile.gcc PREFIX=i686-w64-mingw32-
cd ../nsis-3.01-src
# I don't know how to make the version work with the environment variables/config flags the way the author appears to
sed -i "s/'VERSION', 'Version of NSIS', cvs_version/'VERSION', 'Version of NSIS', '3.01'/" SConstruct
scons XGCC_W32_PREFIX=i686-w64-mingw32- ZLIB_W32=../zlib-1.2.11 SKIPUTILS="NSIS Menu" PREFIX=$INSTALL_DIR/ install
# --------------
cd $WORKSPACE/build/src
tar caf nsis.tar.xz mingw32
mkdir -p $UPLOAD_DIR
cp nsis.tar.* $UPLOAD_DIR