git-lfs/script/windows-installer
Johannes Schindelin 0a0311d771 installer: let it work on 32-bit Windows again
As reported in https://github.com/git-lfs/git-lfs/issues/5231, there was
a regression in running the Git LFS installer on 32-bit Windows.
Concretely, it throws a Runtime error:

	Internal error: Cannot expand `commonp64` constant on this
	version of Windows.

The reason is that we introduced code in 865d6eee (installer: handle
`BashOnly` Git for Windows gracefully, 2022-06-16) that unconditionally
expands `commonpf64`. However, the documentation at
https://jrsoftware.org/ishelp/topic_consts.htm is very clear:

	{commonpf64}

	    64-bit Windows only: 64-bit Program Files. The path of the
	    system's 64-bit Program Files directory, typically
	    "C:\Program Files". An exception will be raised if an
	    attempt is made to expand this constant on 32-bit Windows.

The idea is to figure out whether a given path starts with either the
32-bit or the 64-bit version of `Program Files`. But if the latter is
not even available, we cannot search for it.

Let's just re-use the value of the `commonpf32` constant. (Using an
empty value for `PFiles64` would not work, as that variable is used to
match a certain prefix, and the empty string would match, but we don't
want that.)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-01-27 13:16:26 +00:00
..
git-lfs-logo.bmp Convert the logo from 16 bits per pixel to 24 bits per pixel 2016-10-12 21:25:06 +02:00
git-lfs-logo.ico Add icons to the Windows installer 2016-09-06 19:56:10 +02:00
git-lfs-wizard-image.bmp Also add a (large) wizard image to the Windows installer 2016-10-12 21:25:06 +02:00
inno-setup-git-lfs-installer.iss installer: let it work on 32-bit Windows again 2023-01-27 13:16:26 +00:00