Documentation
¶
Overview ¶
Package releaseplan plans and formats `nsgo build` release invocations and credits checks shared by `cmd/game release` and the scene editor's Export panel.
Index ¶
- Constants
- Variables
- func ApplyEnv(baseEnv, overrides []string) []string
- func Args(dir string, opts Options, settings Settings, nsgo NSGoSettings) ([]string, error)
- func DecodePlist(data []byte) (any, error)
- func DefaultPrivacyManifestXML() []byte
- func DesktopTargets(targets []string) []string
- func EncodePlist(v any) []byte
- func ExperimentalDocsURL(lang string) string
- func FindDesktopBinaries(plan *Plan) []string
- func FormatExperimentalWarning(info ExperimentalInfo) string
- func FormatSkippedTarget(s SkippedTarget) string
- func FormatUnsignedNote(u UnsignedTarget) string
- func GOFLAGSWithReleaseTag(existing string) string
- func GenerateTouchLayout(f *project.File) (input.TouchLayout, bool)
- func HasNSGoPrivacy(cfg NSGoPrivacyConfig) bool
- func IsExperimental(targetOrPlatform string) bool
- func MergeGOFLAGS(base, extra string) string
- func MergePrivacyManifest(existingXML []byte, cfg NSGoPrivacyConfig) ([]byte, error)
- func OutputDir(dir string, opts Options, settings Settings, nsgo NSGoSettings) (string, error)
- func PlatformOf(target string) string
- func ReleaseEnv() []string
- func ResolveTargets(opts Options, settings Settings, nsgo NSGoSettings) ([]string, error)
- func ShellQuote(args []string) string
- func ValidateNSGoPrivacy(cfg NSGoPrivacyConfig) error
- func ValidateResourcePrivacy(manifest map[string]any) error
- func VerifyBinary(path string) error
- func VerifyDesktopRelease(plan *Plan) error
- func WithReleaseEnv(baseEnv []string) []string
- func WriteDryRun(w io.Writer, p *Plan)
- type ExperimentalInfo
- type ExperimentalTargetsError
- type Host
- type NSGoAppleConfig
- type NSGoIconConfig
- type NSGoPrivacyConfig
- type NSGoSettings
- type NSGoSignConfig
- type Options
- type Plan
- type ReadinessItem
- type ReadinessStatus
- type Settings
- type SkippedTarget
- type UnavailableTargetsError
- type UnsignedTarget
Constants ¶
const DefaultOutput = "dist"
DefaultOutput is the directory nsgo build writes to when nsgo.yaml's build.output is empty, from NSGo v0.3.0's cmd/nsgo/project.go.
const DefaultTouchLayoutRelPath = "controls.touch.yaml"
DefaultTouchLayoutRelPath is the project-relative touch layout file written when generating touch controls from game.yaml actions.
const NoCreditsNote = "game release: note: game.yaml has no assets section, so no " + credits.FileName + " is written; credit the assets the game ships yourself"
NoCreditsNote is what game release prints when game.yaml has no assets section, and so no credits file is written.
const PlatformSupportURL = "https://game.nsgo.dev/docs/platforms/#experimental-targets"
PlatformSupportURL is the English documentation anchor describing experimental targets and per-feature platform support.
const PlatformSupportURLZH = "https://game.nsgo.dev/zh/docs/platforms/#实验性目标平台"
PlatformSupportURLZH is the Simplified Chinese documentation anchor describing experimental targets and per-feature platform support.
const PrivacyManifestName = "PrivacyInfo.xcprivacy"
PrivacyManifestName is the Apple privacy manifest file name at a bundle's resource root.
const PrivacyManifestRelPath = "resources/" + PrivacyManifestName
PrivacyManifestRelPath is the project-relative path NSGo packages into every Apple bundle and merges with NSGo's defaults and nsgo.yaml's apple.privacy.
const ReleaseTag = "release"
ReleaseTag is the Go build tag passed to nsgo build so development-only code (pkg/tooling/gamedebug, pkg/tooling/hotreload, pkg/tooling/devstate, and physics/AI debug drawing) compiles its release stubs. Native release-only build tags in nsgo.yaml are tracked upstream in https://github.com/nsgo-dev/nsgo/issues/2695.
Variables ¶
var ( // ErrMissingReleaseTag is wrapped when a built desktop release binary's Go build info does not record the release build tag. ErrMissingReleaseTag = errors.New("release binary missing release build tag") // ErrDebugSymbolLinked is wrapped when a built desktop release binary links a development-only symbol that should be compiled out under -tags release. ErrDebugSymbolLinked = errors.New("release binary links development-only debug symbol") // ErrNoDesktopBinary is wrapped when a release build requested desktop targets but no desktop executable was found in the output directory. ErrNoDesktopBinary = errors.New("no built desktop binary found to verify") )
var Channels = []string{"direct", "store", "steam", "none"}
Channels are the distribution channels nsgo build accepts for -channel.
var DefaultPlatforms = []string{"macos", "windows", "linux", "web", "ios", "android"}
DefaultPlatforms are what game release builds when neither -target nor game.yaml's export presets say otherwise, as nsgo build -target names them: macos, windows, linux and android expand to their architectures, and ios and web are one target each.
var ErrExperimentalTarget = errors.New("experimental target platform")
ErrExperimentalTarget is wrapped when Options.Strict refuses one or more experimental target platforms.
ErrHostUnavailableTarget is wrapped when an explicitly requested -target cannot be built on Options.Host.
var ErrInvalidTarget = errors.New("invalid target")
ErrInvalidTarget is wrapped when Options.Targets contains an empty target entry.
var ErrNoBuildableTargets = errors.New("no buildable targets on this host")
ErrNoBuildableTargets is wrapped when every resolved preset or default target is skipped on Options.Host.
var Experimental = map[string]ExperimentalInfo{
"tvos": {
Platform: "tvos",
Missing: "no audio, no GPU view, and not tested in CI",
IssueURL: "https://github.com/nsgo-dev/nsgo/issues/1317",
},
"watchos": {
Platform: "watchos",
Missing: "no audio, no GPU view, no gamepad, and not tested in CI",
IssueURL: "https://github.com/nsgo-dev/nsgo/issues/1318",
},
"harmonyos": {
Platform: "harmonyos",
Missing: "no audio, no GPU view, no gamepad, and not tested in CI",
IssueURL: "https://github.com/nsgo-dev/nsgo/issues/1521",
},
"miniprogram": {
Platform: "miniprogram",
Missing: "no audio, no GPU view, no gamepad, and not tested in CI",
IssueURL: "https://github.com/nsgo-dev/nsgo/issues/1505",
},
}
Experimental is the single source of truth for NSGo platforms accepted as experimental by game.yaml export presets, game release, and the scene editor. None of these platforms are built or vetted in CI, and NSGo disables audio and GPU views on all four. When NSGo enables audio and a GPU view on one of them, remove it from this set and add it to .github/workflows/check.yml in the same pull request.
var ForbiddenDebugSymbols = []string{
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).sceneInspectorView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).aiInspectorView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).netInspectorView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).gcSummaryView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).drawStatsView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).profilerScopesView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Overlay).memorySummaryView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.overlayPanelStyle",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.buildAITreeView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.buildAIMachineView",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*ShapeOverlay).strokeWidth",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.drawSpriteBounds",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.drawingScale",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Console).execHelp",
"github.com/nsgo-dev/game/pkg/tooling/gamedebug.(*Console).execSet",
"github.com/nsgo-dev/game/pkg/tooling/hotreload.(*Watcher).loop",
"github.com/nsgo-dev/game/pkg/tooling/hotreload.(*Watcher).poll",
"github.com/nsgo-dev/game/pkg/tooling/devstate.(*Store).writeRaw",
"github.com/nsgo-dev/game/pkg/tooling/devstate.(*Hook).saveUnlocked",
"github.com/nsgo-dev/game/pkg/physics.resolveDebugStyle",
"github.com/nsgo-dev/game/pkg/physics3d.resolveDebugStyle",
"github.com/nsgo-dev/game/pkg/ai.clampGridIndex",
}
ForbiddenDebugSymbols lists Go symbols that exist only in //go:build !release files across the game packages and must never appear in a release binary.
var NSGoPrivacyReasons = map[string][]string{
"NSPrivacyAccessedAPICategoryUserDefaults": {"CA92.1"},
"NSPrivacyAccessedAPICategoryFileTimestamp": {"C617.1"},
"NSPrivacyAccessedAPICategorySystemBootTime": {"35F9.1"},
}
NSGoPrivacyReasons mirrors NSGo v0.3.4's required-reason API declarations (cmd/nsgo/privacy.go) written into every Apple bundle's PrivacyInfo.xcprivacy.
var SteamPlatforms = []string{"macos", "windows", "linux"}
SteamPlatforms are what game release builds by default for the steam channel, whose depots nsgo build makes only of desktop targets.
Functions ¶
func ApplyEnv ¶
ApplyEnv returns a copy of baseEnv with overrides ("KEY=VALUE") applied. When baseEnv is nil, os.Environ() is used. A GOFLAGS override is merged into any existing GOFLAGS entry via MergeGOFLAGS so caller flags such as -mod=mod or custom build tags are preserved.
func Args ¶
Args returns the arguments of the go command that builds the project in dir: go -C dir tool nsgo build with the targets and output resolved from opts, then game.yaml's settings, then the defaults, the channel coming from opts, then nsgo.yaml. nsgo.yaml's build.targets is not a default: it holds the portable cross-host list for a plain nsgo build, while game.yaml's export presets hold the full release list (including macOS and iOS). Paths in opts are relative to the working directory, and game.yaml's output to dir.
func DecodePlist ¶
DecodePlist parses an Apple XML property list into Go maps, slices, booleans, numbers, bytes, and strings, matching NSGo's cmd/nsgo/sign.go decoder.
func DefaultPrivacyManifestXML ¶
func DefaultPrivacyManifestXML() []byte
DefaultPrivacyManifestXML returns a deterministic, store-valid PrivacyInfo.xcprivacy XML plist containing NSGo's required-reason API declarations, suitable for resources/PrivacyInfo.xcprivacy so authors can add app-specific entries and NSGo merges it cleanly without duplicates.
func DesktopTargets ¶
DesktopTargets expands targets to the concrete NSGo desktop target names they include (macOS, Windows, and Linux), preserving order and omitting non-desktop targets such as web, ios, and android.
func EncodePlist ¶
EncodePlist writes v as a deterministic Apple XML property list with sorted dictionary keys, matching NSGo's cmd/nsgo/sign.go encoder.
func ExperimentalDocsURL ¶
ExperimentalDocsURL returns the platform support documentation URL for lang ("zh" for Simplified Chinese, English otherwise).
func FindDesktopBinaries ¶
FindDesktopBinaries returns the paths to built desktop executables under plan.OutputDir for the desktop targets in plan.Targets.
func FormatExperimentalWarning ¶
func FormatExperimentalWarning(info ExperimentalInfo) string
FormatExperimentalWarning formats the single-line warning printed by game release and the editor's export log for an experimental platform.
func FormatSkippedTarget ¶
func FormatSkippedTarget(s SkippedTarget) string
FormatSkippedTarget formats the single-line message printed when game release skips an unavailable preset or default target.
func FormatUnsignedNote ¶
func FormatUnsignedNote(u UnsignedTarget) string
FormatUnsignedNote formats the single-line note printed when a release target such as ios builds unsigned because nsgo.yaml lacks signing configuration.
func GOFLAGSWithReleaseTag ¶
GOFLAGSWithReleaseTag returns a GOFLAGS value equivalent to existing with ReleaseTag merged into its -tags setting. Non-tag flags and any existing tags are preserved without duplicating ReleaseTag.
func GenerateTouchLayout ¶
func GenerateTouchLayout(f *project.File) (input.TouchLayout, bool)
GenerateTouchLayout builds a canonical input.TouchLayout from the actions and axes already declared in game.yaml (f.Input). It returns false when f declares no actions or axes to bind, so callers never invent placeholder actions that game code does not read.
func HasNSGoPrivacy ¶
func HasNSGoPrivacy(cfg NSGoPrivacyConfig) bool
HasNSGoPrivacy reports whether cfg declares any app-specific privacy fields in nsgo.yaml's apple.privacy.
func IsExperimental ¶
IsExperimental reports whether targetOrPlatform belongs to an experimental platform.
func MergeGOFLAGS ¶
MergeGOFLAGS combines base and extra GOFLAGS values, keeping all non-tag flags and merging the effective -tags lists of both without duplicates. Within each input, a later -tags= replaces an earlier one, matching Go's own GOFLAGS parsing.
func MergePrivacyManifest ¶
func MergePrivacyManifest(existingXML []byte, cfg NSGoPrivacyConfig) ([]byte, error)
MergePrivacyManifest merges existingXML (a resources/PrivacyInfo.xcprivacy plist, or nil) with NSGo's required-reason APIs and nsgo.yaml's apple.privacy, validating both inputs and the merged result with NSGo's store-privacy rules and returning deterministic Apple XML plist bytes.
func OutputDir ¶
OutputDir returns the absolute directory nsgo build writes the release to, as Args passes it and nsgo resolves it: -output, relative to the working directory, else game.yaml's export.output, else nsgo.yaml's build.output, else dist, these relative to dir.
func PlatformOf ¶
PlatformOf returns the NSGo platform name that target belongs to (the segment before the first underscore, or target itself when there is none).
func ReleaseEnv ¶
func ReleaseEnv() []string
ReleaseEnv returns the default environment overrides applied to release invocations of nsgo build.
func ResolveTargets ¶
func ResolveTargets(opts Options, settings Settings, nsgo NSGoSettings) ([]string, error)
ResolveTargets resolves the ordered list of nsgo build targets from opts, settings, and nsgo.
func ShellQuote ¶
ShellQuote writes args as one line a POSIX shell reads back as the same arguments.
func ValidateNSGoPrivacy ¶
func ValidateNSGoPrivacy(cfg NSGoPrivacyConfig) error
ValidateNSGoPrivacy checks nsgo.yaml's apple.privacy declarations against NSGo's store-privacy rules.
func ValidateResourcePrivacy ¶
ValidateResourcePrivacy checks a decoded resources/PrivacyInfo.xcprivacy plist dictionary against NSGo's store-privacy rules.
func VerifyBinary ¶
VerifyBinary verifies that the Go executable at path was compiled with ReleaseTag (checked via Go build info, equivalent to `go version -m`) and links none of ForbiddenDebugSymbols (checked via Go function/symbol tables, working on both unstripped and `-s -w` stripped binaries).
func VerifyDesktopRelease ¶
VerifyDesktopRelease locates the desktop executable(s) produced by plan in plan.OutputDir and verifies that each carries the release build tag in its Go build info and links no development-only debug symbol. Plans with no desktop targets (for example web-only or mobile-only builds) succeed without inspecting binaries.
func WithReleaseEnv ¶
WithReleaseEnv returns a copy of baseEnv with GOFLAGS updated so nsgo build compiles with ReleaseTag. When baseEnv is nil, os.Environ() is used.
func WriteDryRun ¶
WriteDryRun writes the exact dry-run lines printed by `game release -dry-run` for p.
Types ¶
type ExperimentalInfo ¶
type ExperimentalInfo struct {
// Platform is the canonical NSGo platform name (such as "tvos", "watchos", "harmonyos", or "miniprogram").
Platform string
// Missing summarizes the core game capabilities unavailable on this platform in the current NSGo release.
Missing string
// IssueURL is the upstream nsgo-dev/nsgo tracking issue for this platform.
IssueURL string
}
ExperimentalInfo describes why an NSGo platform is marked experimental and where its support status and upstream tracking issue are documented.
func ExperimentalInfoFor ¶
func ExperimentalInfoFor(targetOrPlatform string) (ExperimentalInfo, bool)
ExperimentalInfoFor returns the experimental metadata for targetOrPlatform, or false when it is not experimental.
func ExperimentalPlatforms ¶
func ExperimentalPlatforms(targets []string) []ExperimentalInfo
ExperimentalPlatforms returns the unique experimental platforms referenced by targets, preserving first-seen order.
type ExperimentalTargetsError ¶
type ExperimentalTargetsError struct {
Platforms []ExperimentalInfo
}
ExperimentalTargetsError is returned by Build when Options.Strict is true and the resolved build targets include one or more experimental platforms.
func (*ExperimentalTargetsError) Error ¶
func (e *ExperimentalTargetsError) Error() string
func (*ExperimentalTargetsError) Unwrap ¶
func (e *ExperimentalTargetsError) Unwrap() error
type Host ¶
type Host struct {
// GOOS is the host operating system (such as "darwin", "linux", or "windows").
GOOS string
// HasAppleSDK reports whether Xcode provides the Apple SDK named sdk (such as "iphoneos", "iphonesimulator", "appletvos", "appletvsimulator", "watchos", or "watchsimulator").
HasAppleSDK func(sdk string) bool
}
Host describes a machine's ability to build host-restricted NSGo targets (macOS and Apple mobile SDKs).
func AllTargetsHost ¶
func AllTargetsHost() *Host
AllTargetsHost returns a Host that reports every target as buildable, useful in tests that mock nsgo build across platforms.
func CurrentHost ¶
func CurrentHost() *Host
CurrentHost returns a Host describing the running machine. On darwin, Apple mobile SDK availability is probed lazily via `xcrun --sdk <sdk> --show-sdk-path` and cached per SDK name.
type NSGoAppleConfig ¶
type NSGoAppleConfig struct {
Privacy NSGoPrivacyConfig `yaml:"privacy"`
}
NSGoAppleConfig holds the Apple-specific settings in nsgo.yaml read by release readiness checks.
type NSGoIconConfig ¶
type NSGoIconConfig struct {
// Apple is icon.apple, an Icon Composer .icon (macOS/iOS) or .icns (macOS only).
Apple string `yaml:"apple"`
// PNG is icon.png, the square PNG icon fallback used across targets including iOS.
PNG string `yaml:"png"`
}
NSGoIconConfig holds the icon settings in nsgo.yaml read by release readiness checks.
type NSGoPrivacyConfig ¶
type NSGoPrivacyConfig struct {
AccessedAPIs map[string][]string `yaml:"accessed_apis"`
CollectedData []map[string]any `yaml:"collected_data"`
Tracking *bool `yaml:"tracking"`
TrackingDomains []string `yaml:"tracking_domains"`
}
NSGoPrivacyConfig holds apple.privacy in nsgo.yaml, which nsgo build merges into PrivacyInfo.xcprivacy.
type NSGoSettings ¶
type NSGoSettings struct {
// Name is nsgo.yaml's name, used by nsgo build to name package directories and desktop executables.
Name string
// ID is nsgo.yaml's id, the reverse-DNS bundle identifier / application ID.
ID string
// Version is nsgo.yaml's version, used by nsgo build to name package directories.
Version string
// Channel is updates.channel, the channel nsgo build hands the packages out through when -channel does not say.
Channel string
// Output is build.output, the directory nsgo build writes to when neither -output nor game.yaml's export.output says, relative to the project unless absolute; empty is nsgo's default, dist.
Output string
// ItchProject is itch.project, the itch.io owner/game slug when configured.
ItchProject string
// ItchChannels is itch.channels, mapping NSGo build target names to custom itch.io channel names.
ItchChannels map[string]string
// Icon is nsgo.yaml's icon section.
Icon NSGoIconConfig
// Sign is nsgo.yaml's sign section.
Sign NSGoSignConfig
// SignProfile is sign.profile (trimmed), the iOS provisioning profile path; empty means ios device builds are unsigned.
SignProfile string
// Apple is nsgo.yaml's apple section.
Apple NSGoAppleConfig
}
NSGoSettings are the parts of nsgo.yaml that game release, readiness checks, and the editor's publish flow read.
func ReadNSGoSettings ¶
func ReadNSGoSettings(dir string) (NSGoSettings, error)
ReadNSGoSettings reads dir's nsgo.yaml. The file is nsgo's, which validates it when it builds, so fields game release does not read are left alone rather than refused.
type NSGoSignConfig ¶
type NSGoSignConfig struct {
Identity string `yaml:"identity"`
Profile string `yaml:"profile"`
MacOSProfile string `yaml:"macos_profile"`
Keystore string `yaml:"keystore"`
KeyAlias string `yaml:"key_alias"`
Certificate string `yaml:"certificate"`
SignCommand string `yaml:"sign_command"`
Notarize string `yaml:"notarize"`
}
NSGoSignConfig holds the signing settings in nsgo.yaml read by release readiness checks.
type Options ¶
type Options struct {
// Targets is -target, comma-separated; empty takes game.yaml's presets, else SteamPlatforms for the steam channel, else DefaultPlatforms.
Targets string
// Output is -output; empty takes game.yaml's export.output, else nsgo.yaml's build.output.
Output string
// Channel is -channel, which nsgo build takes as the channel the packages are handed out through.
Channel string
// Notes is -release-notes, a Markdown file nsgo build puts in the appcasts.
Notes string
// Jobs is -jobs, how many targets build at once; 0 leaves nsgo's default.
Jobs int
// Strict is -strict, refusing experimental target platforms with *ExperimentalTargetsError instead of printing warnings.
Strict bool
// Host, when non-nil, filters preset/default targets that this host cannot build into Plan.Skipped and fails with *UnavailableTargetsError if an explicit Targets entry cannot build.
Host *Host
}
Options are game release's build flags.
type Plan ¶
type Plan struct {
// Dir is the absolute project directory.
Dir string
// AppName is nsgo.yaml's name, used to locate built desktop binaries under OutputDir.
AppName string
// AppVersion is nsgo.yaml's version, used to locate built desktop binaries under OutputDir.
AppVersion string
// Targets are the resolved nsgo build targets in build order.
Targets []string
// Skipped lists preset or default targets omitted because Options.Host cannot build them.
Skipped []SkippedTarget
// Unsigned lists build targets (such as ios without sign.profile) that will be produced unsigned rather than dropped.
Unsigned []UnsignedTarget
// Experimental lists the unique experimental platforms referenced by Targets, in first-seen order.
Experimental []ExperimentalInfo
// Env are the environment variable overrides (such as GOFLAGS=-tags=release) applied when executing Args.
Env []string
// Args are the arguments passed to the `go` command.
Args []string
// CommandLine is the POSIX-quoted command (with Env prefix) printed by -dry-run.
CommandLine string
// OutputDir is the resolved absolute directory where release packages are written.
OutputDir string
// AssetsConfigured reports whether game.yaml declared an assets section.
AssetsConfigured bool
// Credits are the collected asset credits when AssetsConfigured is true.
Credits []credits.Entry
// CreditsPath is the full path where CREDITS.md will be written, or empty when AssetsConfigured is false.
CreditsPath string
}
Plan is a validated release build plan ready for dry-run printing or execution.
func Build ¶
Build resolves nsgo.yaml, command arguments, output directory, experimental target warnings, and asset credits for a release build in dir. It fails before building when nsgo.yaml is missing, options are invalid, Options.Strict refuses an experimental target (*ExperimentalTargetsError), or any declared asset has no credit (*credits.MissingError).
type ReadinessItem ¶
type ReadinessItem struct {
ID string `json:"id"`
Label string `json:"label"`
Detail string `json:"detail"`
Status ReadinessStatus `json:"status"`
ActionLabel string `json:"actionLabel,omitempty"`
AgentCanHandle bool `json:"agentCanHandle,omitempty"`
RequiresPerson bool `json:"requiresPerson,omitempty"`
}
ReadinessItem describes one platform readiness check shared by the scene editor and CLI doctor.
func EvaluateReadiness ¶
func EvaluateReadiness(platform, dir string, f *project.File) []ReadinessItem
EvaluateReadiness computes the release readiness checklist for platform against the project at dir and f. Currently evaluates iOS checks against nsgo.yaml, resources/PrivacyInfo.xcprivacy, *.touch.yaml layouts, and game.yaml.
type ReadinessStatus ¶
type ReadinessStatus string
ReadinessStatus indicates whether a platform readiness requirement passes, warns, or blocks building.
const ( ReadinessOK ReadinessStatus = "ok" ReadinessWarn ReadinessStatus = "warn" ReadinessFail ReadinessStatus = "fail" )
type Settings ¶
type Settings struct {
// Output is export.output, a slash-separated directory inside the project; empty leaves nsgo.yaml's build.output.
Output string
// Targets are the presets' targets in order, a preset without targets giving its platform name; nil without presets.
Targets []string
// Assets is the assets section as package project parses it with the whole file; nil when game.yaml has none, and then no credits file is written.
Assets *project.Assets
}
Settings are the parts of game.yaml that game release reads: the build output directory, the build targets of the export presets and the assets section, whose assets the credits file lists.
func SettingsFromProject ¶
SettingsFromProject extracts release Settings from an in-memory project.File.
type SkippedTarget ¶
SkippedTarget describes a target that cannot be built on the current host and why.
type UnavailableTargetsError ¶
type UnavailableTargetsError struct {
}
UnavailableTargetsError is returned when explicit -target arguments cannot be built on Options.Host.
func (*UnavailableTargetsError) Error ¶
func (e *UnavailableTargetsError) Error() string
func (*UnavailableTargetsError) Unwrap ¶
func (e *UnavailableTargetsError) Unwrap() error
type UnsignedTarget ¶
UnsignedTarget describes a target built without store/device signing configuration in nsgo.yaml.