install

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerisonDirPattern        string = "%s%s"
	VersionDirSuffix         string = "_versions"
	VersionInstallDirPattern string = "%s-%s"
)
View Source
const (
	MinicondaSDKName string = "miniconda"
	ErlangSDKName    string = "erlang"
	ElixirSDKName    string = "elixir"
	VSCodeSDKName    string = "vscode"
)
View Source
const (
	CondaPathEnvName string = "VMR_CONDA_PATH"
)
View Source
const (
	CoursierPathEnvName string = "VMR_COURSIER_PATH"
)

Variables

This section is empty.

Functions

func GetSDKVersionDir

func GetSDKVersionDir(sdkName string) string

func InstallExeForWindows

func InstallExeForWindows(exePath, installDir string) (task *utils.SysCommandRunner)

install *.exe for windows 1. erlang 2. elixir

func InstallMiniconda

func InstallMiniconda(exePath, installDir string) (task *utils.SysCommandRunner)

Install miniconda.

func InstallStandAloneExecutables

func InstallStandAloneExecutables(exePath, installDir string) (task *utils.SysCommandRunner)

Other standalone executables.

func InstallVSCode

func InstallVSCode(pkgFilePath, installDir string) (task *utils.SysCommandRunner)

vscode

func IsSDKInstalledByVMR added in v0.6.2

func IsSDKInstalledByVMR(sdkName string) bool

Types

type AdditionalEnv

type AdditionalEnv struct {
	Name    string
	Value   string // <symbolLinkPath>/Value
	Version string // major>8 or major<=8(for JDK)
}

type AdditionalEnvList

type AdditionalEnvList []AdditionalEnv

type ArchiverInstaller

type ArchiverInstaller struct {
	OriginSDKName string
	SDKName       string
	VersionName   string
	Version       download.Item
	// contains filtered or unexported fields
}

Install use unarchiver.

func NewArchiverInstaller

func NewArchiverInstaller() (a *ArchiverInstaller)

func (*ArchiverInstaller) FormatSDKName

func (a *ArchiverInstaller) FormatSDKName()

func (*ArchiverInstaller) GetInstallDir

func (a *ArchiverInstaller) GetInstallDir() string

func (*ArchiverInstaller) GetSymbolLinkPath

func (a *ArchiverInstaller) GetSymbolLinkPath() string

func (*ArchiverInstaller) Initiate

func (a *ArchiverInstaller) Initiate(originSDKName, versionName string, version download.Item)

func (*ArchiverInstaller) Install

func (a *ArchiverInstaller) Install()

func (*ArchiverInstaller) SetInstallConf

func (a *ArchiverInstaller) SetInstallConf(iconf download.InstallerConfig)

type BinaryRename

type BinaryRename struct {
	NameFlag string `toml:"name_flag"`
	RenameTo string `toml:"rename_to"`
}

type CondaInstaller

type CondaInstaller struct {
	OriginSDKName string
	SDKName       string
	VersionName   string
	Version       download.Item
	// contains filtered or unexported fields
}

Install using conda.

func NewCondaInstaller

func NewCondaInstaller() (c *CondaInstaller)

func (*CondaInstaller) FormatSDKName

func (c *CondaInstaller) FormatSDKName()

func (*CondaInstaller) GetInstallDir

func (c *CondaInstaller) GetInstallDir() string

func (*CondaInstaller) GetSymbolLinkPath

func (c *CondaInstaller) GetSymbolLinkPath() string

func (*CondaInstaller) Initiate

func (c *CondaInstaller) Initiate(originSDKName, versionName string, version download.Item)

func (*CondaInstaller) Install

func (c *CondaInstaller) Install()

func (*CondaInstaller) SetInstallConf

func (c *CondaInstaller) SetInstallConf(iconf download.InstallerConfig)

type CoursierInstaller

type CoursierInstaller struct {
	OriginSDKName string
	SDKName       string
	VersionName   string
	Version       download.Item
	// contains filtered or unexported fields
}

Install use coursier.

func NewCoursierInstaller

func NewCoursierInstaller() (c *CoursierInstaller)

func (*CoursierInstaller) FormatSDKName

func (c *CoursierInstaller) FormatSDKName()

func (*CoursierInstaller) GetInstallDir

func (c *CoursierInstaller) GetInstallDir() string

func (*CoursierInstaller) GetSymbolLinkPath

func (c *CoursierInstaller) GetSymbolLinkPath() string

func (*CoursierInstaller) Initiate

func (c *CoursierInstaller) Initiate(originSDKName, versionName string, version download.Item)

func (*CoursierInstaller) Install

func (c *CoursierInstaller) Install()

func (*CoursierInstaller) SetInstallConf

func (c *CoursierInstaller) SetInstallConf(iconf download.InstallerConfig)

type ExeInstaller

type ExeInstaller struct {
	OriginSDKName string
	SDKName       string
	VersionName   string
	Version       download.Item
	Fetcher       *request.Fetcher
	// contains filtered or unexported fields
}

1. *.exe 2. *.deb 3. *.rpm 4. *.sh (miniconda) 5. unix-like executable

func NewExeInstaller

func NewExeInstaller() (ei *ExeInstaller)

func (*ExeInstaller) FormatSDKName

func (ei *ExeInstaller) FormatSDKName()

func (*ExeInstaller) GetInstallDir

func (ei *ExeInstaller) GetInstallDir() string

func (*ExeInstaller) GetSymbolLinkPath

func (ei *ExeInstaller) GetSymbolLinkPath() string

func (*ExeInstaller) Initiate

func (ei *ExeInstaller) Initiate(originSDKName, versionName string, version download.Item)

func (*ExeInstaller) Install

func (ei *ExeInstaller) Install()

func (*ExeInstaller) RenameFile

func (ei *ExeInstaller) RenameFile()

func (*ExeInstaller) SetInstallConf

func (ei *ExeInstaller) SetInstallConf(iconf download.InstallerConfig)

type FileItems

type FileItems struct {
	Windows []string `toml:"windows"`
	Linux   []string `toml:"linux"`
	MacOS   []string `toml:"darwin"`
}

============================ Installation configs. ============================

type InstallerConfig

type InstallerConfig struct {
	FlagFiles       *FileItems        `toml:"flag_files"`
	FlagDirExcepted bool              `toml:"flag_dir_excepted"`
	BinaryDirs      *FileItems        `toml:"binary_dirs"`
	BinaryRename    *BinaryRename     `toml:"binary_rename"`
	AdditionalEnvs  AdditionalEnvList `toml:"additional_envs"`
}

Installation configs

Jump to

Keyboard shortcuts

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