Skip to content

Commit

Permalink
Merge pull request #885 from gibmat/fix-win11-24h2-driver-injection
Browse files Browse the repository at this point in the history
Fixes for Windows 11 24H2 driver injection
  • Loading branch information
stgraber authored Oct 26, 2024
2 parents 0544a2d + d28bd23 commit bf4232a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions distrobuilder/main_repack-windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func (c *cmdRepackWindows) injectDrivers(infDir, driversDir, filerepositoryDir,
softwareRegistry := "Windows Registry Editor Version 5.00"
for driverName, driverInfo := range windows.Drivers {
logger.WithField("driver", driverName).Debug("Injecting driver")
infFilename := fmt.Sprintf("oem%d.inf", i)
infFilename := fmt.Sprintf("oem-virtio-incus%d.inf", i)
sourceDir := filepath.Join(driverPath, driverName, c.flagWindowsVersion, c.flagWindowsArchitecture)
targetBaseDir := filepath.Join(filerepositoryDir, driverInfo.PackageName)
if !incus.PathExists(targetBaseDir) {
Expand All @@ -500,7 +500,7 @@ func (c *cmdRepackWindows) injectDrivers(infDir, driversDir, filerepositoryDir,
}
}

for ext, dir := range map[string]string{"inf": infDir, "cat": driversDir, "dll": driversDir, "sys": driversDir} {
for ext, dir := range map[string]string{"inf": infDir, "cat": driversDir, "dll": driversDir, "exe": driversDir, "sys": driversDir} {
sourceMatches, err := shared.FindAllMatches(sourceDir, fmt.Sprintf("*.%s", ext))
if err != nil {
logger.Debugf("failed to find first match %q %q", driverName, ext)
Expand All @@ -514,7 +514,7 @@ func (c *cmdRepackWindows) injectDrivers(infDir, driversDir, filerepositoryDir,
return err
}

if ext == "cat" {
if ext == "cat" || ext == "exe" {
continue
} else if ext == "inf" {
targetName = infFilename
Expand Down

0 comments on commit bf4232a

Please sign in to comment.