Odd setup.ini and version.ini content on Windows

Stephan Bergmann stephan.bergmann at allotropia.de
Mon Jan 15 08:41:30 UTC 2024


As described in the commit message of 
<https://git.libreoffice.org/core/+/a31f334d36b5735ba6fc8d0f89e834a73bdcc561%5E!/> 
"Windows MAR update issues with program/{setup,version}.ini":

"At least on Windows, our MSI install sets differ from our archive 
install sets in that their program/setup.ini and program/version.ini 
files have differing content:  For one, they have ProductCode, 
UpdateCode, and MsiProductVersion (the latter only in version.ini) lines 
that have empty values in archive install sets and non-empty values in 
MSI install sets.  For another, setup.ini in MSI install sets has 
additional ALLUSERS, BASISINSTALLLOCATION, FINDPRODUCT, INSTALLLOCATION, 
OFFICEINSTALLLOCATION, and UREINSTALLLOCATION lines that are completely 
missing in archive install sets.

"This is a problem when building MAR updates with create-partial-info: 
Both ini files contain the buildid, so will always change between 
builds, so will always be recorded in MAR updates.  But when they are 
recorded as "patch", actually applying the MAR update file (generated 
from archive install sets) to an installation (originating from an MSI 
install set) will fail, as the size of the ini file in the installation 
doesn't match the expected size recorded in the MAR update file.

"I naively but strongly assume that those differences in ini file 
content are historic junk by now that have no practical consequences 
(i.e., I assume that no code actually makes use of those ini file 
entries). [...]"

That is, the relevant differences between archive and msi installations 
look something like

> diff -ur archive/program/setup.ini msi/program/setup.ini
> --- archive/program/setup.ini
> +++ msi/program/setup.ini
> @@ -1,4 +1,10 @@
>  [Bootstrap]
>  buildid=6cab3ad405ff471d781912d802fa9618d76cd903
> -ProductCode=
> -UpgradeCode=
> +ProductCode={23148CC7-F971-4DBB-80E8-23639AA1581A}
> +UpgradeCode={4B17E523-5D91-4E69-BD96-7FD81CFA81BB}
> +ALLUSERS=1
> +BASISINSTALLLOCATION=C:\Program Files\LibreOffice\
> +FINDPRODUCT=Software\LibreOffice\Layers\LibreOffice\24.8
> +INSTALLLOCATION=C:\Program Files\LibreOffice\
> +OFFICEINSTALLLOCATION=C:\Program Files\LibreOffice\
> +UREINSTALLLOCATION=C:\Program Files\LibreOffice\URE\\
> diff -ur archive/program/version.ini msi/program/version.ini
> --- archive/program/version.ini
> +++ msi/program/version.ini
> @@ -2,12 +2,12 @@
>  AllLanguages=en-US de fi
>  buildid=6cab3ad405ff471d781912d802fa9618d76cd903
>  ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update
> -MsiProductVersion=<msiproductversion>
> -ProductCode=
> +MsiProductVersion=24.8.0.0.alpha0
> +ProductCode={23148CC7-F971-4DBB-80E8-23639AA1581A}
>  ReferenceOOoMajorMinor=4.1
>  UpdateChannel=LOOnlineUpdater
>  UpdateID=LibreOffice_24_en-US_de_fi
>  UpdateURL=https://update.libreoffice.org/check.php
> -UpgradeCode=
> +UpgradeCode={4B17E523-5D91-4E69-BD96-7FD81CFA81BB}
>  UpdateUserAgent=<PRODUCT> (${buildid}; ${_OS}; ${_ARCH}; <OPTIONAL_OS_HW_DATA>)
>  Vendor=steph

I would like to get rid of these differences, and created four Gerrit 
changes that would simply remove all of these problematic ini-file 
entries, see

* <https://gerrit.libreoffice.org/c/core/+/161978/> "Remove 
(Windows-only) MsiProductVersion from version.ini"
* <https://gerrit.libreoffice.org/c/core/+/161979/> "Remove 
(Windows-only) ProductCode from setup.ini and version.ini"
* <https://gerrit.libreoffice.org/c/core/+/161980/> "Remove 
(Windows-only) UpgradeCode from setup.ini and version.ini"
* <https://gerrit.libreoffice.org/c/core/+/161981/> "Remove 
(Windows-only) INIFILETABLE entries from setup.ini"

It very much looks to me like all of those entries are unused anyway (as 
detailed in the Gerrit changes' commit messages), but I may easily have 
missed something, of course.  Therefore:

Does anybody know if any of those ini-file entries would still be needed 
today?


More information about the LibreOffice mailing list