summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/vs-setup.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /taskcluster/scripts/misc/vs-setup.sh
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/scripts/misc/vs-setup.sh')
-rw-r--r--taskcluster/scripts/misc/vs-setup.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/vs-setup.sh b/taskcluster/scripts/misc/vs-setup.sh
new file mode 100644
index 0000000000..05eb219794
--- /dev/null
+++ b/taskcluster/scripts/misc/vs-setup.sh
@@ -0,0 +1,42 @@
+VSDIR=vs
+VSPATH="${MOZ_FETCHES_DIR}/${VSDIR}"
+UNIX_VSPATH="$(cd ${MOZ_FETCHES_DIR} && pwd)/${VSDIR}"
+VCDIR=VC/Tools/MSVC/14.16.27023
+if [ ! -d "${VSPATH}/${VCDIR}" ]; then
+ VCDIR=VC/Tools/MSVC/14.29.30133
+fi
+if [ ! -d "${VSPATH}/${VCDIR}" ]; then
+ VCDIR=VC/Tools/MSVC/14.38.33130
+fi
+SDKDIR="Windows Kits/10"
+SDK_VERSION=10.0.17134.0
+if [ ! -d "${VSPATH}/${SDKDIR}/Lib/${SDK_VERSION}" ]; then
+ SDK_VERSION=10.0.19041.0
+fi
+if [ ! -d "${VSPATH}/${SDKDIR}/Lib/${SDK_VERSION}" ]; then
+ SDK_VERSION=10.0.22621.0
+fi
+
+case "$TARGET" in
+aarch64-pc-windows-msvc)
+ SDK_CPU=arm64
+ ;;
+i686-pc-windows-msvc)
+ SDK_CPU=x86
+ ;;
+*)
+ SDK_CPU=x64
+ ;;
+esac
+
+CRT_DIR="microsoft.vc141.crt"
+if [ ! -d "${UNIX_VSPATH}/redist/${SDK_CPU}/$CRT_DIR" ]; then
+ CRT_DIR="microsoft.vc142.crt"
+fi
+if [ ! -d "${UNIX_VSPATH}/redist/${SDK_CPU}/$CRT_DIR" ]; then
+ CRT_DIR="microsoft.vc143.crt"
+fi
+
+export INCLUDE="${VSPATH}/${VCDIR}/include;${VSPATH}/${VCDIR}/atlmfc/include;${VSPATH}/${SDKDIR}/Include/${SDK_VERSION}/ucrt;${VSPATH}/${SDKDIR}/Include/${SDK_VERSION}/shared;${VSPATH}/${SDKDIR}/Include/${SDK_VERSION}/um;${VSPATH}/${SDKDIR}/Include/${SDK_VERSION}/winrt;${VSPATH}/dia sdk/include"
+export LIB="${VSPATH}/${VCDIR}/lib/${SDK_CPU};${VSPATH}/${VCDIR}/atlmfc/lib/${SDK_CPU};${VSPATH}/${SDKDIR}/Lib/${SDK_VERSION}/um/${SDK_CPU};${VSPATH}/${SDKDIR}/Lib/${SDK_VERSION}/ucrt/${SDK_CPU};${VSPATH}/dia sdk/lib/amd64"
+export PATH="${UNIX_VSPATH}/${VCDIR}/bin/hostx64/${SDK_CPU}:${UNIX_VSPATH}/${VCDIR}/bin/hostx86/x86:${UNIX_VSPATH}/${SDKDIR}/bin/${SDK_VERSION}/${SDK_CPU}:${UNIX_VSPATH}/redist/${SDK_CPU}/$CRT_DIR:${UNIX_VSPATH}/${SDKDIR}/redist/ucrt/dlls/${SDK_CPU}:${UNIX_VSPATH}/dia sdk/bin/amd64:$PATH"