Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureRuntime ¶
EnsureRuntime unpacks the embedded zstd-compressed tar runtime blob into an XDG cache directory and returns the path to it.
If PORTABLEDESKTOP_RUNTIME_DIR (or the WithRuntimeDir option) is set, that directory is validated and returned directly without extracting anything.
The cache key is derived from the first 12 hex characters of the SHA-256 digest of embeddedBlob. If the cache directory already exists it is reused immediately; otherwise the blob is extracted into a temporary directory and atomically renamed into place.
func ResolveRuntimeBinary ¶
ResolveRuntimeBinary returns the full path to name inside runtimeDir/bin if the file exists there. Otherwise it falls back to returning name unqualified so the caller can rely on PATH resolution.
func ResolveRuntimeData ¶
ResolveRuntimeData returns the full path to a file under runtimeDir/share/<subpath> if it exists. Returns an empty string if the file is not found.
func ValidateRuntimeDir ¶
ValidateRuntimeDir checks that dir contains a bin/Xvnc binary.