Documentation
¶
Index ¶
- func AssembleISO(_ context.Context, esdPath string, cfg AssembleConfig) error
- func FetchWindowsISO(ctx context.Context, cfg FetchConfig) (string, error)
- func SummarizeSkipped(files map[string]File, keepExt string) string
- type APIError
- type AssembleConfig
- type Build
- type BuildsResponse
- type Client
- func (c *Client) FindLatestARM64(ctx context.Context) (*Build, error)
- func (c *Client) GetPackage(ctx context.Context, uuid, lang string, editions []string) (*PackageResponse, error)
- func (c *Client) ListBuilds(ctx context.Context, search string) ([]Build, error)
- func (c *Client) ListEditions(ctx context.Context, uuid, lang string) (*EditionsResponse, error)
- func (c *Client) ListLanguages(ctx context.Context, uuid string) (*DetailsResponse, error)
- type DetailsResponse
- type DownloadConfig
- type DownloadResult
- type EditionsResponse
- type FetchConfig
- type File
- type Option
- type PackageResponse
- type ProgressFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssembleISO ¶
func AssembleISO(_ context.Context, esdPath string, cfg AssembleConfig) error
AssembleISO converts an ESD file into a bootable Windows installer ISO.
UUP dump ESDs typically contain 3 images:
image 1: "Windows Setup Media" → extract to staging dir (boot files) image 2: "WinRE / WinPE" → export to boot.wim (boot environment) image 3: "Windows 11 Pro" (etc.) → export to install.wim (OS image)
boot.wim gets two images (matching CrystalFetch converter):
image 1: "Microsoft Windows PE" — WinPE recovery environment image 2: "Microsoft Windows Setup" — installer with setup.exe (bootable)
Traditional install ESDs may have 4+ images (images 2-3 boot, 4+ editions).
func FetchWindowsISO ¶
func FetchWindowsISO(ctx context.Context, cfg FetchConfig) (string, error)
func SummarizeSkipped ¶
SummarizeSkipped describes the files a fetch discarded, grouped by extension.
FetchWindowsISO downloads only `.esd` and drops the rest. That is consistent with what AssembleISO can consume — it turns an ESD into a bootable installer and speaks nothing else — but for the current ARM64 build it means discarding 45 of 65 files and 4.2 GB, *more than it keeps*: the cumulative update, the WSL2 prerequisite (HyperV-OptionalFeature-VirtualMachinePlatform), .NET 4.8.1, WebView2, and the FoD metadata cabs.
The decision is defensible; being silent about it is not. Without this line a build produces an image missing those payloads and says nothing, so the gap surfaces hours later inside a guest as `0x80070002 — cannot find the file specified`, which reads like a missing file path rather than a payload that was never downloaded.
Types ¶
type AssembleConfig ¶
type BuildsResponse ¶
func (*BuildsResponse) UnmarshalJSON ¶
func (br *BuildsResponse) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) FindLatestARM64 ¶
func (*Client) GetPackage ¶
func (*Client) ListBuilds ¶
func (*Client) ListEditions ¶
func (*Client) ListLanguages ¶
type DetailsResponse ¶
type DownloadConfig ¶
type DownloadConfig struct {
Dir string
Concurrency int
OnProgress ProgressFunc
HTTPClient *http.Client
}
type DownloadResult ¶
func DownloadFiles ¶
func DownloadFiles(ctx context.Context, files map[string]File, cfg DownloadConfig) ([]DownloadResult, error)
type EditionsResponse ¶
type FetchConfig ¶
type File ¶
type File struct {
SHA1 string `json:"sha1"`
SHA256 string `json:"sha256,omitempty"`
Size int64 `json:"-"`
URL string `json:"url"`
UUID string `json:"uuid"`
Expire int64 `json:"expire"`
Debug string `json:"debug,omitempty"`
}