mctcatalog

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Win11CatalogURL = "https://go.microsoft.com/fwlink?linkid=2156292"
	WorProjectURL   = "https://worproject.com/dldserv/esd/getversions.php"
)

Variables

This section is empty.

Functions

func AssembleMCTISO

func AssembleMCTISO(_ context.Context, esdPath string, cfg AssembleConfig) error

AssembleMCTISO converts a self-contained MCT ESD into a bootable Windows ISO.

MCT ESD image layout (differs from UUP dump):

image 1: boot files          → extract to staging dir
image 2: WinPE               → export to boot.wim (image 1)
image 3: Windows Setup       → export to boot.wim (image 2, marked bootable)
image 4+: editions (Pro etc) → export to install.wim

No --ref / resource references needed — MCT ESDs are self-contained.

func FetchWindowsISO

func FetchWindowsISO(ctx context.Context, cfg FetchConfig) (string, error)

FetchWindowsISO downloads a self-contained Windows 11 ARM64 ESD from Microsoft's CDN via the MCT catalog and assembles it into a bootable ISO.

MCT ESDs have a different image layout than UUP dump ESDs:

image 1: boot files          → extract to staging dir
image 2: WinPE               → export to boot.wim (image 1)
image 3: Windows Setup       → export to boot.wim (image 2, marked bootable)
image 4+: editions (Pro etc) → export to install.wim

Types

type AssembleConfig

type AssembleConfig struct {
	WorkDir string
	ISOPath string
	Label   string
	LogFunc func(format string, args ...any)
}

type Client

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

func NewClient

func NewClient(opts ...Option) *Client

func (*Client) FindARM64ESD

func (c *Client) FindARM64ESD(ctx context.Context, language, edition string) (*ESDFile, error)

FindARM64ESD fetches the MCT catalog and returns the ESD entry matching the given language and edition for ARM64.

type ESDFile

type ESDFile struct {
	FileName     string
	LanguageCode string
	Edition      string
	Architecture string
	Size         int64
	SHA1         string
	FilePath     string // Microsoft CDN download URL
}

type FetchConfig

type FetchConfig struct {
	CacheDir   string
	Language   string
	Edition    string
	LogFunc    func(format string, args ...any)
	OnProgress func(filename string, bytesDownloaded, totalBytes int64)
}

type Option

type Option func(*Client)

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

func WithLogFunc

func WithLogFunc(f func(string, ...any)) Option

Jump to

Keyboard shortcuts

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