Commit Graph

29 Commits

Author SHA1 Message Date
Simon Rozman
7dffa4be72 vs: move shared configuration to wintun.props and upgrade
Remember to rename wintun.vcxproj.user file in your local working folder
to wintun.props.user manually.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-07-28 20:22:18 +02:00
Simon Rozman
7de5d2e6c8 driver: workaround SDV failure with code analysis
SDV is using own CL.EXE which returns error code 2 when code analysis
is turned on. However, we need code analysis results for DVL.

While we could use a new "ReleaseSDV" configuration, we don't really
require limited code analysis in Release builds, as long as we address
all full code analysis warnings in Debug builds.

To make DVL happier, an intermediate Release build was injected with
code analysis turned on.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-07-27 12:22:26 +02:00
Simon Rozman
a6fa9c1b67 project: add support for intermediate versioning
While the Wintun driver is typically released only at <major>.<minor>
milestones, the wintun.dll did see some intermediate releases.

To make MSI logic correctly decide to upgrade local wintun.dll file, the
version inscribed in wintun.dll file resources should increment in those
intermediate releases. MSI ignores file timestamps. One could use
REINSTALLMODE=emus Installer property to force copying wintun.dll when
its version doesn't change. But REINSTALLMODE applies to all files in
the MSI session and would be an additional requirement when authoring
MSI packages with wintun.dll.

Bumping only the final ZIP filename version is not sufficient.

Therefore, a <major>.<minor> or <major>.<minor>.<build> versioning is
introduced. Furthermore, we no longer distinguish between WintunVersion
and WintunVersionStr. All our releases used strictly numeric
<major>.<minor> notation, making WintunVersion and WintunVersionStr
always the same.

When the driver didn't change, just bump the version in wintun.proj and
run `msbuild wintun.proj /t:Zip` to rebuild the wintun.dll and make the
new ZIP file.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-03-19 11:52:11 +01:00
Jason A. Donenfeld
ce83279187 project: license prebuilt binaries more permissively
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-12-16 18:23:41 +01:00
Jason A. Donenfeld
3f843c9aab proj: use less scary caps for zip license file
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-06 10:44:32 +01:00
Simon Rozman
a00c8ca685 driver: move to subfolder
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-11-06 07:29:47 +01:00
Jason A. Donenfeld
c891e84259 api: include arm64 in amd64
ARM64 will still run AMD64 apps.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-05 16:58:43 +01:00
Simon Rozman
77459a130a Add ARM driver compilation
This adds the ARM driver to the list of Wintun drivers we compile for
future deployment. Since we're not in position to test it in the real
world, any feedback is greatly appreciated.

Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-31 10:41:48 +01:00
Simon Rozman
1170f56446 api: move files from root to wintun folder within Zip
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-31 10:15:15 +01:00
Simon Rozman
8fd98b6ca3 api: allow Debug build packaging
The ARM64 platform has no WHQL/Attestation driver available yet and the
Release build of the wintun.dll was explicitly designed to include WHQL/
Attn signed ARM64 driver only: There are no Windows on ARM64 before
Windows 10. This prevented alpha testing of the wintun.dll on ARM64.

Debug build includes EV signed ARM64 driver.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +01:00
Simon Rozman
10caab8813 api: upgrade Zip building to output SHA256
This allows following the Zip file integrity from immediately after it
is built.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +01:00
Simon Rozman
52738e17b1 api: installer: switch from MSM to ZIP distribution
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:01 +01:00
Simon Rozman
b79703bba8 vcxproj: swap configuration and platform subfolder hierarchy
This should allow wintun.dll to simplify referencing same configuration
but different platform wintun.dll for WoW64 support.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00
Simon Rozman
5925f914e4 api: add support for WoW64
Some functions of SetupAPI only work when invoked from a native process.
Registry and filesystem reflection makes them fail on WoW64. For WoW64
processes, a minimum set of rundll32 functions are provided.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:50:59 +01:00
Simon Rozman
9b0c400511 Enable ARM64 MSM building
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:50:58 +01:00
Simon Rozman
fa715c4863 Use WiX directly rather than via WiX's MSBuild
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-05 17:14:27 +02:00
Simon Rozman
810d2ac73a Unify XML empty-element spacing
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-05 09:45:52 +02:00
Jason A. Donenfeld
47a2a980a8 Do not rebuild driver on installer library build
This commit is in many ways wrong, but when we're dealing with whql
imports, there's often a large gap in time, and it's useful to be able
to just restore everything exactly how it was prior and then build only
installer.dll and the msm.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-08-02 09:43:32 +00:00
Simon Rozman
ac3576a57e Unify driver input file list
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-02 09:43:32 +00:00
Simon Rozman
afdbc75bf9 Resolve SDV reported "defect"
NdisMGetDeviceProperty() should always return non-NULL
FunctionalDeviceObject according to _Outptr_opt_. An explicit
FunctionalDeviceObject NULL check has been added to keep the SDV happy
and not calling our driver "defective".

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-02 09:43:32 +00:00
Simon Rozman
b666f587d5 Add SDVView target
This invokes SDV GUI for easier review of SDV reported defects.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-02 09:43:32 +00:00
Jason A. Donenfeld
28ba2d4600 Separate out atomic helpers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-08-02 09:43:32 +00:00
Jason A. Donenfeld
22e2da002d Rewrite installer logic in C
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-08-02 09:43:32 +00:00
Jason A. Donenfeld
5239d53db0 Add handle closing ioctl
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-07-31 13:59:54 +00:00
Simon Rozman
5094737f8c Split driver setup to EV signed (<Win10) and WHQL signed (>=Win10)
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-26 13:44:44 +02:00
Simon Rozman
eb16ea534d De-haiku wintun.proj
No need for breaking every XML tag with attributes into lines - besides,
we're imposing 2-space indentation on .proj files making lines even
shorter and indentation combined with excessive line breaking harder to
follow visually.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-23 13:32:19 +02:00
Simon Rozman
56424d52f7 Extend MSBuild project to build all supported platforms at once
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-23 13:32:18 +02:00
Simon Rozman
13183d8ac6 Add missing dependencies
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-19 21:24:08 +02:00
Simon Rozman
9f31f27840 Switch from NMake to MSBuild
This allows common version and other configuration in wintun.props.

- MSM packaging migrated to WiX MSBuild project and extended to support
  digital signing
- Building supports single Platform|Configuration per run - again :(
- wintun.vcxproj cleanup

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-19 15:25:44 +02:00