From db6440a8597c81e2fb2f22260952bbe532b98ee8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 10 Sep 2026 11:39:18 +0100 Subject: [PATCH] Check that zip and msi contents match in build process --- .../scripts/make_package_win32.sh | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/util/buildscripts/scripts/make_package_win32.sh b/util/buildscripts/scripts/make_package_win32.sh index 7429074e8..7011e6c9b 100755 --- a/util/buildscripts/scripts/make_package_win32.sh +++ b/util/buildscripts/scripts/make_package_win32.sh @@ -154,6 +154,53 @@ rm -f dist/*.wixobj dist/*.wixpdb popd # $REPO_ROOT +# make zip manifests, excluding files we know are supposed to be zip-exclusive + +pushd "${REPO_ROOT}"/dist/Release32 +find . -type f -exec md5sum {} \; | grep -v './LICENSE.md' | grep -v './renderdocui.exe' > "${REPO_ROOT}"/dist/manifest_zip32.txt +popd + +pushd "${REPO_ROOT}"/dist/Release64 +find . -type f -exec md5sum {} \; | grep -v './LICENSE.md' | grep -v './renderdocui.exe' > "${REPO_ROOT}"/dist/manifest_zip64.txt +popd + +# extract the msi files + +msiexec -a $(native_path "${REPO_ROOT}"/dist/Installer32.msi) -qn TARGETDIR=$(native_path "${REPO_ROOT}"/dist/msi32) +msiexec -a $(native_path "${REPO_ROOT}"/dist/Installer64.msi) -qn TARGETDIR=$(native_path "${REPO_ROOT}"/dist/msi64) + +# make msi manifests as above + +pushd "${REPO_ROOT}"/dist/msi32/PFiles/RenderDoc +find . -type f -exec md5sum {} \; | grep -v './LICENSE.rtf' > "${REPO_ROOT}"/dist/manifest_msi32.txt +popd + +pushd "${REPO_ROOT}"/dist/msi64/PFiles/RenderDoc +find . -type f -exec md5sum {} \; | grep -v './LICENSE.rtf' > "${REPO_ROOT}"/dist/manifest_msi64.txt +popd + +diff "${REPO_ROOT}"/dist/manifest_msi32.txt "${REPO_ROOT}"/dist/manifest_zip32.txt + +if [ $? -ne 0 ]; then + if [[ "$STRICT" == "yes" ]]; then + echo "Manifest for 32-bit msi and zip did not match." + exit 1; + else + echo "WARNING: Manifest for 32-bit msi and zip did not match." + fi +fi + +diff "${REPO_ROOT}"/dist/manifest_msi64.txt "${REPO_ROOT}"/dist/manifest_zip64.txt + +if [ $? -ne 0 ]; then + if [[ "$STRICT" == "yes" ]]; then + echo "Manifest for 64-bit msi and zip did not match." + exit 1; + else + echo "WARNING: Manifest for 64-bit msi and zip did not match." + fi +fi + mkdir "${REPO_ROOT}"/package pushd "${REPO_ROOT}"/package