env

package
v0.0.0-...-7296201 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package env provides the wine env object.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slugify

func Slugify(name string) (string, error)

Types

type Info

type Info struct {
	Date string
	Name string
}

type InstallOpts

type InstallOpts struct {
	GogSilentInstall bool
	InstallArgs      []string
	InstallExe       string
	InstallExpected  string
	InstallWorkDir   string
}

type RunOpts

type RunOpts struct {
	QuietRun   bool
	RunArgs    []string
	RunExe     string
	RunPrefix  string
	RunSuffix  string
	RunPre     string
	RunPost    string
	RunWorkDir string

	Sandbox             bool
	SandboxBlacklist    []string
	SandboxWhitelist    []string
	SandboxCpu          int
	SandboxDns          string
	SandboxIpcNamespace bool
	SandboxMachineId    bool
	SandboxNetNone      bool
	SandboxNoDbus       bool
	SandboxNoPrinters   bool
	SandboxNoU2f        bool
	SandboxPrivateCache bool
	SandboxPrivateCwd   bool
	SandboxPrivateTmp   bool
}

type SysOpts

type SysOpts struct {
	ReducePulseLatency bool
	RestartPulse       bool
	RestoreResolution  bool
	SingleCore         bool
	SysEnvVars         []string
	VulkanIcdLoader    string
}

type WineEnv

type WineEnv struct {
	*Info
	*InstallOpts
	*RunOpts
	*WineOpts
	*SysOpts
}

func FromName

func FromName(name string, render bool) (*WineEnv, error)

func (*WineEnv) AsToml

func (e *WineEnv) AsToml(noUnchanged bool) (string, error)

AsToml gives a toml representation of the env. This represents the configuration file contents.

func (*WineEnv) CfgExists

func (e *WineEnv) CfgExists(name string) bool

CfgExists indicates if the env's configuration file exists.

func (*WineEnv) CfgPath

func (e *WineEnv) CfgPath(name string) string

func (*WineEnv) ExeCtx

func (e *WineEnv) ExeCtx(cacheDir string, skipInstall, skipRun bool) ([]*exe.ExeCtx, error)

func (*WineEnv) ExeString

func (e *WineEnv) ExeString(exec string, execArgs []string) (string, error)

func (*WineEnv) ExpectedExists

func (e *WineEnv) ExpectedExists() bool

func (*WineEnv) InstallCtx

func (e *WineEnv) InstallCtx() (*exe.ExeCtx, error)

func (*WineEnv) InstallString

func (e *WineEnv) InstallString() string

func (*WineEnv) IsInstalled

func (e *WineEnv) IsInstalled() bool

func (*WineEnv) PostRunCtx

func (e *WineEnv) PostRunCtx() (*exe.ExeCtx, error)

func (*WineEnv) PreRunCtx

func (e *WineEnv) PreRunCtx() (*exe.ExeCtx, error)

func (*WineEnv) PrefixExists

func (e *WineEnv) PrefixExists() bool

func (*WineEnv) RenderString

func (e *WineEnv) RenderString(s string) (string, error)

RenderString is for when you need to one-off render a string.

func (*WineEnv) RunCtx

func (e *WineEnv) RunCtx(cacheDir string) (*exe.ExeCtx, error)

func (*WineEnv) Save

func (e *WineEnv) Save(name string, noUnchanged bool) error

Save writes the WineEnv to disk as a toml-formatted cfg file.

func (*WineEnv) SetDefaults

func (e *WineEnv) SetDefaults(c *cfg.WemConfig) error

func (*WineEnv) ShouldInstall

func (e *WineEnv) ShouldInstall() bool

func (*WineEnv) Slug

func (e *WineEnv) Slug() (string, error)

Slug is a safe version of the env Name, consisting only of alphanumerics.

func (*WineEnv) ValidDllVersion

func (e *WineEnv) ValidDllVersion(cacheDir, kind, url, version string) (bool, bool)

func (*WineEnv) Validate

func (e *WineEnv) Validate(installPhase bool) error

Validate ensures that mandatory config values are set.

type WineOpts

type WineOpts struct {
	DxvkVersion      string
	Esync            bool
	Fsync            bool
	VirtualDesktop   string
	Vkd3dVersion     string
	WineArch         string
	WineArgs         []string
	WineDllOverrides string
	WineExe          string
	WinePrefix       string
	WinetricksPath   string
}

Jump to

Keyboard shortcuts

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