mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.16k stars 1.52k forks source link

Embed Version Information in Windows Binary #1115

Open bloudraak opened 6 years ago

bloudraak commented 6 years ago

System

Testcase

The expectation is that it will contain the current version of the binary, which is 0.19.1.

Stacktrace

N/A

Trace-level log

N/A

Rationale

It seems that every web driver has its own custom way of displaying version information and that could change anytime, thus complicating tasks as simple as determining which version of which binary was deployed.

If the version information is embedded in the executable, it allows for the following scenarios:

More information: https://msdn.microsoft.com/en-us/library/windows/desktop/ms646981(v=vs.85).aspx

whimboo commented 6 years ago

I actually do not have an idea if Rust/Cargo supports that yet. Searching a bit I only found https://github.com/rust-lang/cargo/issues/2273.

@hoodie do you know something?

bloudraak commented 6 years ago

There are a couple of folks that do something similiar:

This seems to invoke the resource compiler on Windows, but makes it a NOP on other platforms. https://github.com/nabijaczleweli/cargo-update/blob/380bb1064090720c90a87254f1870a07fce1b72c/build.rs

And there is also https://github.com/nabijaczleweli/rust-embed-resource

I have not tried them myself (and never did anything useful in rust)