OpenVPN / tap-windows6

Windows TAP driver (NDIS 6)
Other
788 stars 237 forks source link

Add build version to the installer #25

Closed mattock closed 7 years ago

mattock commented 7 years ago

This allows distinguishing between installers that share the same driver code, but which have different installers, documentation or such.

Signed-off-by: Samuli Seppänen samuli@openvpn.net

mattock commented 7 years ago

Prior to this change the installer file would be named as tap-windows-9.21.2.exe. With this PR the file will be called tap-windows-9.21.2-I001 instead. This is in line with how openvpn-build/windows-nsis works.

selvanair commented 7 years ago

I do not have a setup to test the build, but these changes look sane. ACK.

mattock commented 7 years ago

@selvanair : there's a test installer here if you want to have a look.

One question, though: right now PRODUCT_TAP_WIN_BUILD is set to 001. As discussed here our tap-windows driver naming scheme is confusing enough as-is. I think we should consider making the default build number 601 to match the numbering scheme in OpenVPN installers. Does that sound ok? If yes, I will squash the commits, change the build number and merge this PR.

selvanair commented 7 years ago

@mattock: you know best about the numbering scheme so leave it your judgement.. 601 instead of 001 looks OK to me. The driver version numbers (9.9 vs 9.21 which shows up as 9.0.0.21) are indeed totally confusing.

mattock commented 7 years ago

I squashed the commits and made build number default to "601" and will now merge this PR.

@selvanair : Can you think of any why we could not change PRODUCT_VERSION_RESOURCE to 9.21.2.601 in version.m4?

selvanair commented 7 years ago

You mean 9,21,2,601, right? The version resource is supposed to be major,minor,build,revision -- at least major and minor are consistently interpreted (9 and 21 in our case) tap sources and openvpn. As for 2 I am not sure whether its build or revision.

External programs gets the version from the driver using an IOCTL and that returns three numbers: major (9), minor (21) and 0 or 1 depending debug is enabled or not, in that order. So that is consistent with 9.21.x.x as well.

That said I think this definition of PRODUCT_VERSION_RESOURCE is not used anywhere. The driver gets its version number most likely from this line in the OemVista.inf.in

DriverVer=@PRODUCT_TAP_WIN_RELDATE@,@PRODUCT_TAP_WIN_MAJOR@.00.00.@PRODUCT_TAP_WIN_MINOR@

Also src/resource.rc has

define VER_PRODUCTVERSION PRODUCT_TAP_WIN_MAJOR,00,00,PRODUCT_TAP_WIN_MINOR

I think changing these to major,minor,x,y along with a updated release date should be safe. If you generate one I can test it.