From 9fa14e88eace245250df55133e47ca00b01eec4b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 3 Apr 2025 17:25:55 +0200 Subject: [PATCH] fixup! release: create initial Windows installer build workflow As pointed out in https://github.com/microsoft/git/issues/739, the VS registry settings are added only if the autoupdater feature is enabled. This was unintentional; Just like the corresponding part in the uninstaller, these two things should be apart. So let's decouple the VS registry settings from the autoupdater. Let's do that by ensuring that we put the function calls _outside_ of the autoupdater blocks. For good measure, we add checks to verify that both calls _were_ added, i.e. that the expected patterns were found. Signed-off-by: Johannes Schindelin --- .github/workflows/build-git-installers.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-git-installers.yml b/.github/workflows/build-git-installers.yml index 65193e54af323c..ddad1453b119a5 100644 --- a/.github/workflows/build-git-installers.yml +++ b/.github/workflows/build-git-installers.yml @@ -272,11 +272,16 @@ jobs: b=/usr/src/build-extra && - sed -i -e '/^ *InstallAutoUpdater();$/a\ - CustomPostInstall();' \ - -e '/^ *UninstallAutoUpdater();$/a\ - CustomPostUninstall();' \ - $b/installer/install.iss && + sed -i "# First, find the autoupdater parts in the install/uninstall steps + /if IsComponentInstalled('autoupdate')/{ + # slurp in the next two lines, where the call to InstallAutoUpdater()/UninstallAutoUpdater() happens + N + N + # insert the corresponding CustomPostInstall()/CustomPostUninstall() call before that block + s/^\\([ \t]*\\)\(.*\\)\\(Install\\|Uninstall\\)\\(AutoUpdater\\)/\\1CustomPost\\3();\\n\\1\\2\\3\\4/ + }" $b/installer/install.iss && + grep CustomPostInstall $b/installer/install.iss && + grep CustomPostUninstall $b/installer/install.iss && cat >>$b/installer/helpers.inc.iss <<\EOF