Skip to content
Prev 61493 / 63421 Next

Versioning Rtools ARP entries

On 3/13/23 17:57, Tomas Kalibera wrote:
Hi Daniel,

I've extended the version information in a testing version of an update 
of Rtools43, more below, but first with some explanation of how the 
versioning works.

A version of an installed program in Windows is stored in the registry 
as "Display version": this is shown, together with "Display name" in the 
"Add/Remove programs menu" and it is used by tools such as winget to 
determine the version of an installed application (so e.g. also in 
"winget list").

An installer in Windows has in its meta-data has a "Product version" and 
a "File version" - one can see them in the Windows explorer via 
"Properties/Details". This can be set also for other files, not only for 
.EXEs of installers.? The distinction for general files is that "File 
version" refers to the individual file and "Product version" (shared for 
many files) to the application. The distinction for installers is 
usually that "File version" refers to the installer, but "Product 
version" to the application.

A Windows installer may set the display version and display name for the 
application it is installing, usually at the end. Many installers, 
including that of Rtools, don't do that explicitly, and a "Product 
version" from the installer meta-data is used, instead, for the display 
version. A "Product name" is used for the display name. In Inno Setup, 
used by R and Rtools, "Product version" is given by "AppVersion", "File 
version" by "VersionInfoVersion", and "Product name" by 
"UninstallDisplayName" (there are also some rules to take these values 
from other entries when not specified, more in Inno Setup documentation).

Historically, Rtools installer used two-component product version, e.g. 
"4.2" or "4.0". Therefore, winget could offer an upgrade from say 
Rtools40 Rtools42, but not between individual version of Rtools40 or 
Rtool42. The changes in file version you referred to in [4] didn't make 
a difference, because the "product version" stayed the same.

In the testing version of Rtools43, I've added one more component to the 
product version, which is the version of the toolchain+libraries (e.g. 
4.3.5548). So, one can now see the version of the toolchain+libraries in 
the "Add/Remove programs" list, and winget could (be made to) support 
upgrades within say Rtools43. Winget registry is maintained 
independently of R/Rtools, so it is up to those maintainer if they do 
that or not, but it should now be easy since product version has the 
information.

I've also extended the file version to have four components, e.g. 
4.3.5550.5548, where the last component is the version of the scripts to 
build the installer. This corresponds to version in the file name, e.g. 
rtools43-5550-5548.exe. The original file name is now also part of the 
meta-data.

When one manually upgrades the toolchain+libraries in an existing 
Rtools43 installation, the version information stored in the registry 
should be updated and the documentation will say how to do that (how to 
change the registry accordingly).

Best
Tomas