windows

package
v3.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SupportedWindowsVersions = []string{
		"w11", "w10", "w8", "w7", "2k19", "2k12", "2k16",
		"2k22", "2k25", "2k3", "2k8", "xp", "2k12R2", "2k8R2", "w8.1",
	}

	LegacyWindowsVersions = []string{
		"2k8", "2k8R2", "2k3", "xp",
	}

	SupportedWindowsArchitectures = []string{
		"amd64", "ARM64", "x86",
	}
)
View Source
var Drivers = map[string]DriverInfo{
	"Balloon":   driverBalloon,
	"NetKVM":    driverNetKVM,
	"vioinput":  driverVioinput,
	"viorng":    driverViorng,
	"vioscsi":   driverVioscsi,
	"vioserial": driverVioserial,
	"viofs":     driverViofs,
	"viogpudo":  driverVioGPUDo,
	"viostor":   driverViostor,
	"viosock":   driverViosock,
}

Drivers contains all supported drivers.

Functions

func DetectWindowsArchitecture

func DetectWindowsArchitecture(desc string) string

func DetectWindowsVersion

func DetectWindowsVersion(desc string) string

func MatchClassGuid

func MatchClassGuid(r io.Reader) (classGuid string)

func ParseDriverClassGuid

func ParseDriverClassGuid(driverName, infPath string) (string, error)

Types

type Aliases

type Aliases map[string][]string

func (Aliases) MatchString

func (as Aliases) MatchString(desc string) string

type DriverInfo

type DriverInfo struct {
	PackageName           string
	SoftwareRegistry      string
	SystemRegistry        string
	SystemRegistryDrivers string
	SystemRegistryLegacy  string
	DriversRegistry       string
}

DriverInfo contains driver specific information.

type RepackUtil

type RepackUtil struct {
	// contains filtered or unexported fields
}

func NewRepackUtil

func NewRepackUtil(cacheDir string, ctx context.Context, logger *logrus.Logger) RepackUtil

NewRepackUtil returns a new RepackUtil object.

func (*RepackUtil) GetDriverVersion added in v3.4.0

func (r *RepackUtil) GetDriverVersion(infPath string) (string, error)

GetDriverVersion parses the inf file at the given path to produce a hex string representing the Version key at 'hklm/system/driverdatabase/driverpackages/<driver>'.

func (*RepackUtil) GetWimInfo

func (r *RepackUtil) GetWimInfo(wimFile string) (WimInfo, error)

GetWimInfo returns information about the specified wim file.

func (*RepackUtil) InjectDrivers

func (r *RepackUtil) InjectDrivers(windowsRootPath string, driverPath string) error

InjectDrivers injects drivers from driverPath into the windowsRootPath.

func (*RepackUtil) InjectDriversIntoWim

func (r *RepackUtil) InjectDriversIntoWim(wimFile string, info WimInfo, driverPath string) error

InjectDriversIntoWim will inject drivers into the specified wim file.

func (*RepackUtil) SetWindowsVersionArchitecture

func (r *RepackUtil) SetWindowsVersionArchitecture(windowsVersion string, windowsArchitecture string)

SetWindowsVersionArchitecture is a helper function for setting the specific Windows version and architecture.

type WimInfo

type WimInfo map[int]map[string]string

func ParseWimInfo

func ParseWimInfo(r io.Reader) (WimInfo, error)

func (WimInfo) Architecture

func (info WimInfo) Architecture(index int) string

func (WimInfo) ImageCount

func (info WimInfo) ImageCount() int

func (WimInfo) MajorVersion

func (info WimInfo) MajorVersion(index int) string

func (WimInfo) Name

func (info WimInfo) Name(index int) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL