windows

package
v0.0.0-...-6bc32b7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

	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,
}

Drivers contains all supported drivers.

Functions

func DetectWindowsArchitecture

func DetectWindowsArchitecture(desc string) (arch string)

func DetectWindowsVersion

func DetectWindowsVersion(desc string) (version string)

func ParseDriverClassGUID

func ParseDriverClassGUID(driverName, infPath string) (classGUID string, err error)

ParseDriverClassGUID retrieves the ClassGUID which is needed for the Windows registry entries.

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
	DriversRegistry  string
}

DriverInfo contains driver specific information.

type RepackUtil

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

RepackUtil is a helper struct for repacking Windows images.

func NewRepackUtil

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

NewRepackUtil returns a new RepackUtil object.

func (*RepackUtil) GetWimInfo

func (r *RepackUtil) GetWimInfo(wimFile string) (info WimInfo, err 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) (err 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) (info WimInfo, err 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