mirror of
https://github.com/Cheviiot/Vintner.git
synced 2026-08-03 15:57:24 +00:00
Add DirectX SDK (D3DX9) download support
download --with-dxsdk fetches the DirectX SDK (June 2010) - the last standalone release of D3DX9/10/11, XInput and XAudio2, dropped from the Windows SDK entirely once D3DX was deprecated, but still needed by plenty of legacy code. Like the WDK, it isn't part of the VS installer manifest, so this is its own self-contained fetch+unpack path: the installer is a self-extracting CAB, unpacked directly via cabextract (already a prerequisite for the WinSDK .msi payloads) with its -F filter restricting extraction to just Include/ and Lib/ - about 21MB out of the installer's 1.2GB uncompressed payload. Verified against the real installer: real d3dx9.h and d3dx9.lib (x86 and x64) extracted correctly and linked into an actual legacy game client build.
This commit is contained in:
@@ -35,6 +35,7 @@ func runDownload(args []string) int {
|
||||
listComponents := fs.Bool("list-components", false, "list available components from the manifest and exit, without downloading anything")
|
||||
printDepsTree := fs.Bool("print-deps-tree", false, "print the dependency tree of the selected packages and exit, without downloading anything")
|
||||
withWDK := fs.Bool("with-wdk", false, "also fetch and install the Windows Driver Kit (headers, libs and MSBuild driver PlatformToolsets, for building KMDF/UMDF drivers)")
|
||||
withDXSDK := fs.Bool("with-dxsdk", false, "also fetch and install the DirectX SDK (June 2010): real D3DX9/10/11, XInput and XAudio2 headers and import libs, dropped from the modern Windows SDK")
|
||||
var archsFlag stringList
|
||||
fs.Var(&archsFlag, "architecture", "target architecture to include (x86, x64, arm, arm64, host); repeatable")
|
||||
var ignoreFlag stringList
|
||||
@@ -219,6 +220,13 @@ func runDownload(args []string) int {
|
||||
}
|
||||
}
|
||||
|
||||
if *withDXSDK && !*onlyUnpack {
|
||||
if err := downloadDXSDK(cache, destAbs); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "vintner download:", err)
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println(i18n.T("download.done", destAbs))
|
||||
return 0
|
||||
}
|
||||
@@ -255,6 +263,18 @@ func downloadWDK(opts *download.Options, selected []*download.Package, cache, de
|
||||
return nil
|
||||
}
|
||||
|
||||
// downloadDXSDK fetches and unpacks the DirectX SDK (June 2010) into
|
||||
// destAbs/DXSDK. See internal/download/dxsdk.go for why this is a separate
|
||||
// download path from the rest of ExpandSelection/FetchPayloads/Unpack.
|
||||
func downloadDXSDK(cache, destAbs string) error {
|
||||
dxsdkDir, err := download.DownloadDXSDK(cache, destAbs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Print(i18n.T("download.dxsdk_installed", dxsdkDir))
|
||||
return nil
|
||||
}
|
||||
|
||||
func contains(list []string, v string) bool {
|
||||
for _, s := range list {
|
||||
if s == v {
|
||||
|
||||
Reference in New Issue
Block a user