platform

package
v0.0.0-...-442eb80 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: 0BSD Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedArchs = []string{"x86_64", "amd64", "arm64", "aarch64"}

SupportedArchs lists architectures we can select for.

Functions

func AppDir

func AppDir(stateDir, appID string) string

AppDir returns the per-app directory under state root.

func BwrapAvailable

func BwrapAvailable() bool

BwrapAvailable returns true if bwrap is installed.

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies src to dst, using pkexec if permission denied.

func CurrentArch

func CurrentArch() string

CurrentArch returns the current system architecture in normalized form.

func DefaultBinDir

func DefaultBinDir() string

DefaultBinDir returns the default bin directory (/usr/local/bin).

func DefaultStateDir

func DefaultStateDir() (string, error)

DefaultStateDir returns the default state directory (~/.local/share/appimage-manager).

func ExtractAppImage

func ExtractAppImage(ctx context.Context, appImagePath string) (extractDir string, err error)

ExtractAppImage extracts the AppImage to squashfs-root in the same directory.

func IntegrityDir

func IntegrityDir(stateDir, appID string) string

IntegrityDir returns the integrity records directory.

func MkdirAll

func MkdirAll(path string, perm os.FileMode) error

MkdirAll creates directories, using pkexec if permission denied.

func NormalizeArch

func NormalizeArch(arch string) string

NormalizeArch maps common names to canonical form.

func Remove

func Remove(path string) error

Remove removes a file, using pkexec if permission denied.

func RemoveAll

func RemoveAll(path string) error

RemoveAll removes path and children, using pkexec if permission denied.

func RunInBwrap

func RunInBwrap(ctx context.Context, appDir string, execPath string, args []string, opts BwrapRunOpts) error

RunInBwrap runs the given executable inside bubblewrap.

func RuntimeDir

func RuntimeDir(stateDir, appID string) string

RuntimeDir returns the runtime records directory.

func SetNoElevate

func SetNoElevate(v bool)

SetNoElevate disables pkexec; permission errors will be returned.

func Symlink(oldname, newname string) error

Symlink creates a symlink, using pkexec if permission denied.

func UserBinDir

func UserBinDir(home string) string

UserBinDir returns the user-local bin directory.

func VersionDir

func VersionDir(stateDir, appID, version string) string

VersionDir returns the versioned AppImage directory.

Types

type BwrapRunOpts

type BwrapRunOpts struct {
	Network bool
	GPU     bool
	Sound   bool
}

BwrapRunOpts configures bubblewrap sandbox execution.

Jump to

Keyboard shortcuts

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