Skip to content

Commit aa12a2e

Browse files
authored
build-git-installers: decouple the VS registry settings from the autoupdater (#740)
As pointed out in #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. This fixes #739
2 parents cf4e1f9 + 9fa14e8 commit aa12a2e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,16 @@ jobs:
272272
273273
b=/usr/src/build-extra &&
274274
275-
sed -i -e '/^ *InstallAutoUpdater();$/a\
276-
CustomPostInstall();' \
277-
-e '/^ *UninstallAutoUpdater();$/a\
278-
CustomPostUninstall();' \
279-
$b/installer/install.iss &&
275+
sed -i "# First, find the autoupdater parts in the install/uninstall steps
276+
/if IsComponentInstalled('autoupdate')/{
277+
# slurp in the next two lines, where the call to InstallAutoUpdater()/UninstallAutoUpdater() happens
278+
N
279+
N
280+
# insert the corresponding CustomPostInstall()/CustomPostUninstall() call before that block
281+
s/^\\([ \t]*\\)\(.*\\)\\(Install\\|Uninstall\\)\\(AutoUpdater\\)/\\1CustomPost\\3();\\n\\1\\2\\3\\4/
282+
}" $b/installer/install.iss &&
283+
grep CustomPostInstall $b/installer/install.iss &&
284+
grep CustomPostUninstall $b/installer/install.iss &&
280285
281286
cat >>$b/installer/helpers.inc.iss <<\EOF
282287

0 commit comments

Comments
 (0)