Documentation
¶
Overview ¶
Package runner implements the SPX 2.0 project runner.
Index ¶
Constants ¶
View Source
const ( // PckVersion is the pck file version PckVersion = "2.0.30" // RuntimeURLBase is the base URL for downloading runtime executable // Format: https://github.com/goplus/godot/releases/download/spx{VERSION}/{platform}-{arch}.zip RuntimeURLBase = "https://github.com/goplus/godot/releases/download/" // PckURLBase is the base URL for downloading pck file // Format: https://github.com/goplus/spx/releases/download/v2.0.0-pre.30/gdspxrt.pck.{PCK_VERSION}.zip PckURLBase = "https://github.com/goplus/spx/releases/download/v2.0.0-pre.30/" // RuntimeTag is the tag name for runtime files RuntimeTag = "gdspxrt" // GDExtensionTemplate is the template for runtime.gdextension file GDExtensionTemplate = `` /* 474-byte string literal not displayed */ )
View Source
const SpxModule = "github.com/goplus/spx/v2"
SpxModule is the SPX v2 module path
Variables ¶
View Source
var GoModTemplate string
GoModTemplate is the embedded content of go.mod.template This template is used to create go.mod for SPX project's Go code.
View Source
var GopModTemplate string
GopModTemplate is the embedded content of gop.mod from the SPX repository root. This template is used to create gop.mod for new SPX projects.
Functions ¶
Types ¶
type Runner ¶
type Runner struct {
// Project paths
ProjectDir string // SPX project directory (contains .spx files)
GoDir string // Generated Go code directory
LibDir string // Library output directory
TempDir string // Temporary runtime directory
// Runtime paths
GoBinPath string // $GOPATH/bin directory
RuntimeCmdPath string // Path to gdspxrt executable
RuntimePckPath string // Path to gdspxrt.pck
LibPath string // Path to compiled dynamic library
// Platform info
GOOS string
GOARCH string
// Runner version (same as spx since runner is a subpackage of spx)
RunnerVersion string // Runner version (e.g., "latest", "v2.0.0")
}
Runner handles the SPX project running process
func (*Runner) RunWithOptions ¶
func (r *Runner) RunWithOptions(opts *RuntimeOptions) error
RunWithOptions executes the SPX project running process with custom runtime options
type RuntimeOptions ¶
type RuntimeOptions struct {
Fullscreen bool // Run in fullscreen mode
Windowed bool // Run in windowed mode (opposite of fullscreen)
Width int // Window width
Height int // Window height
Position string // Window position (e.g., "100,100")
Maximized bool // Start maximized
AlwaysOnTop bool // Keep window always on top
Debug bool // Enable debug mode
}
RuntimeOptions holds runtime configuration options
Click to show internal directories.
Click to hide internal directories.