Rebrand project to vintner

Renamed the GitHub repo, Go module path, binary, and default install
directory from msvc-go-wine to vintner. Updated every user-facing
string (usage text, error prefixes, README, LICENSE, CI/release
workflow) and the embedded compatibility patches' own header text to
match; the VINTNER_LANG env var replaces VSMC_GO_WINE_LANG.

Also fixes a real bug found while re-verifying the rename end-to-end:
Microsoft.Cpp.WindowsSDK.props.patch had LF-only line endings in its
hunk body while the real Microsoft-shipped file it targets is CRLF,
so `git apply` silently failed on every real install and the SDK
detection fix it's meant to provide was never actually taking effect.
Restored matching CRLF endings in the hunk (checked against the other
five patches, which already had this right). Left the patch's
internal MsvcGoWine_ExtraSdkRoots MSBuild property name alone rather
than renaming it too - changing hunk content, even just an identifier,
breaks reverse-apply idempotency for anyone re-running download
against an already-patched tree, which the fix above depends on. Added
a .remove marker so an existing install's old-named props file gets
cleaned up on the next download.

Re-verified end-to-end after the rename: general MSBuild/cl/link
still work, and a real KMDF driver build (compile, link, INF stamping,
Inf2Cat signability check) still succeeds under the renamed binary.

README also gets an accuracy pass: WDK support and the download/env
CLI flags it lists were out of date (WDK was previously listed under
"Known gaps" despite being implemented and verified), the full tool
list was missing mc/cmd/findstr, and the new command aliases and
VINTNER_LANG option are now documented.
This commit is contained in:
Cheviiot
2026-07-25 03:55:22 +10:00
parent 23ea620ce2
commit a1743e4435
28 changed files with 183 additions and 160 deletions
+53 -30
View File
@@ -1,4 +1,4 @@
# msvc-go-wine
# vintner
Cross compile with MSVC on Linux, using Wine — a single-binary Go tool
inspired by [mstorsjo/msvc-wine](https://github.com/mstorsjo/msvc-wine)'s
@@ -6,13 +6,14 @@ approach (download the real MSVC/WinSDK, wrap the compiler under Wine),
implemented independently.
Once installed, you invoke the real Microsoft toolchain exactly like on
Windows: `cl`, `link`, `lib`, `rc`, `midl`, `mt`, `dumpbin`, `msbuild`,
`nmake`, `ml`, `ml64`, `armasm`, `armasm64` all just work from your `PATH`.
Windows: `cl`, `link`, `lib`, `rc`, `midl`, `mc`, `mt`, `dumpbin`, `msbuild`,
`nmake`, `ml`, `ml64`, `armasm`, `armasm64`, plus trivial `cmd`/`findstr`
shims, all just work from your `PATH`.
## How it works
`msvc-go-wine` is one Go binary that behaves differently depending on the
name it's invoked as (a "multi-call binary", like busybox):
`vintner` is one Go binary that behaves differently depending on the name
it's invoked as (a "multi-call binary", like busybox):
- Invoked as `cl`, `link`, `lib`, ... → it loads a small per-architecture
`env.json`, builds the `INCLUDE`/`LIB`/`WINEPATH` environment Wine needs,
@@ -21,22 +22,23 @@ name it's invoked as (a "multi-call binary", like busybox):
runs the real `.exe` under `wine`/`wine64`, and rewrites the tool's output
back from `z:\...` paths to plain unix paths so your build system's error
parsing keeps working.
- Invoked as `msvc-go-wine` → it exposes the `download`, `install`, `env` and
`version` management subcommands described below.
- Invoked as `vintner` → it exposes the `download`, `install`, `env` and
`version` management subcommands described below (each also has a short
alias: `dl`, `i`, `e`, `v`; `help`/`h` prints usage).
## Quick start
```bash
# 1. Download and unpack MSVC + Windows SDK into ~/.msvc-go-wine (requires
# 1. Download and unpack MSVC + Windows SDK into ~/.vintner (requires
# accepting Microsoft's Visual Studio Build Tools license, and msitools
# for unpacking .msi payloads). Pass --dest <dir> for a different location.
msvc-go-wine download --accept-license
vintner download --accept-license
# 2. Wire up the tool wrappers
msvc-go-wine install
vintner install
# 3. Add the toolchain to PATH and build
export PATH=~/.msvc-go-wine/bin/x64:$PATH
export PATH=~/.vintner/bin/x64:$PATH
cl /nologo /EHsc hello.cpp
```
@@ -56,20 +58,23 @@ pkcon install wine msitools
## Commands
```
msvc-go-wine download --accept-license [--dest <dir>] [options] fetch and unpack MSVC/WinSDK
msvc-go-wine install [dir] wire up wrappers for a downloaded MSVC
msvc-go-wine env --bin <dir>/bin/<arch> print INCLUDE/LIB for native clang-cl/lld-link use
msvc-go-wine version print the version
vintner download (dl) --accept-license [--dest <dir>] [options] fetch and unpack MSVC/WinSDK/WDK
vintner install (i) [dir] wire up wrappers for a downloaded MSVC
vintner env (e) --bin <dir>/bin/<arch> print INCLUDE/LIB for native clang-cl/lld-link use
vintner version (v) print the version
vintner help (h) print usage
```
`--dest`/`[dir]` both default to `~/.msvc-go-wine` when omitted.
`--dest`/`[dir]` both default to `~/.vintner` when omitted.
`download` supports `--msvc-version`, `--sdk-version`, `--architecture`,
`--host-arch`, `--with-*` component toggles, `--ignore`, `--only-download`,
`--only-unpack`, `--keep-unpack`, `--cache`, `--language`,
`--include-optional`, `--skip-recommended`, `--major`, `--preview`,
`--manifest`, `--list-workloads`, `--list-components`, `--print-deps-tree`.
Run `msvc-go-wine download -h` for the full list.
`download`'s main options: `--msvc-version`, `--sdk-version`,
`--architecture`, `--host-arch`, `--only-host`, `--with-wdk` (also fetch the
Windows Driver Kit, for building KMDF/UMDF drivers), `--ignore`,
`--only-download`, `--only-unpack`, `--keep-unpack`, `--skip-patch`,
`--cache`, `--language`, `--include-optional`, `--skip-recommended`,
`--major`, `--preview`, `--manifest`, `--list-workloads`,
`--list-components`, `--print-deps-tree`. Run `vintner download -h` for the
full list with descriptions.
`--list-workloads`/`--list-components` print every workload/component id
(with its human-readable title) available in the fetched manifest and exit
@@ -78,13 +83,31 @@ package id or via `--with-*`. `--print-deps-tree` prints the dependency tree
of whatever would actually be selected (honoring every other flag), also
without downloading.
### Building drivers (WDK)
`vintner download --with-wdk` additionally fetches the Windows Driver Kit
(headers, import libs, and the MSBuild `WindowsKernelModeDriver10.0`/
`WindowsUserModeDriver10.0` PlatformToolsets) so `msbuild` can build real
KMDF/UMDF drivers - compiling, linking, INF stamping and the `Inf2Cat`
signability check (with `SignMode=off`) all work under Wine. Verified
end-to-end against a real sample driver from
[microsoft/Windows-driver-samples](https://github.com/microsoft/Windows-driver-samples).
Only x64 and arm64 targets have a WDK package upstream (no x86/arm).
### Language
CLI messages (usage text, progress lines, prompts) are in English by
default. Set `VINTNER_LANG=ru` (or have a `ru`-prefixed `LC_ALL`/
`LC_MESSAGES`/`LANG`, e.g. `ru_RU.UTF-8`) for Russian. Deeper error text
bubbled up from internal packages stays in English.
### Using clang-cl/lld-link instead of Wine
You don't need Wine at all if you drive the (nonredistributable) MSVC/WinSDK
headers and libraries with Clang/LLD in MSVC-compatible mode:
```bash
eval "$(msvc-go-wine env --bin ~/.msvc-go-wine/bin/x64)"
eval "$(vintner env --bin ~/.vintner/bin/x64)"
clang-cl -c hello.c
lld-link hello.obj -out:hello.exe
```
@@ -92,7 +115,7 @@ lld-link hello.obj -out:hello.exe
## Building from source
```bash
go build -o msvc-go-wine ./cmd/msvc-go-wine
go build -o vintner ./cmd/vintner
```
Go 1.23+ is all you need to build it; `wine`/`msitools` are only needed at
@@ -124,14 +147,14 @@ telemetry, and don't hard-fail devcmd setup when an optional component
## Known gaps
- `download` doesn't yet support installing the Windows Driver Kit via
`--with-wdk-installers`; the core selection/download/unpack/install
pipeline, dependency tree printing, and workload/component listing are all
fully implemented.
None currently tracked. Download/select/unpack/install, general MSBuild
projects, WDK driver builds, dependency-tree printing, and
workload/component listing are all implemented and verified against real
projects.
## License
MIT, see [LICENSE.txt](LICENSE.txt) - covers msvc-go-wine's own source only.
The MSVC Build Tools / Windows SDK that `download` fetches remain governed
MIT, see [LICENSE.txt](LICENSE.txt) - covers vintner's own source only. The
MSVC Build Tools / Windows SDK / WDK that `download` fetches remain governed
by Microsoft's own license (accepted via `--accept-license`), same as with
any other way of obtaining them.