go_chrome_build

package module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 20 Imported by: 0

README

go-chrome-build

目前仅支持 Mac X86 编译 win,win X86 编译 win

###安装 Install

go get github.com/voyager-hang/go-chrome-build
go install -a -v github.com/voyager-hang/go-chrome-build/...

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Green   = string([]byte{27, 91, 51, 50, 109})
	White   = string([]byte{27, 91, 51, 55, 109})
	Yellow  = string([]byte{27, 91, 51, 51, 109})
	Red     = string([]byte{27, 91, 51, 49, 109})
	Blue    = string([]byte{27, 91, 51, 52, 109})
	Magenta = string([]byte{27, 91, 51, 53, 109})
	Cyan    = string([]byte{27, 91, 51, 54, 109})
	Reset   = string([]byte{27, 91, 48, 109})
)

控制台颜色文字变量

Functions

func ArrayToString

func ArrayToString(arr []string, sep string) string

func AskForConfirmation

func AskForConfirmation(s string, tips ...string) (string, error)

AskForConfirmation 控制台询问

func BuildSysO added in v1.0.2

func BuildSysO() error

func CreatePackageJson added in v1.1.5

func CreatePackageJson()

func DoBuild

func DoBuild(sysType string)

func DownBrowser added in v1.1.5

func DownBrowser(sysStruct, version, osName, downPath string) string

func DownloadFile added in v1.1.5

func DownloadFile(url, filePath string) error

func EchoError

func EchoError(i interface{})

EchoError 彩色打印错误信息

func EchoSuccess

func EchoSuccess(i interface{})

EchoSuccess 彩色打印成功信息

func FilePutContent added in v1.0.2

func FilePutContent(path, content string) error

func GetWorkingDirPath

func GetWorkingDirPath() string

GetWorkingDirPath 获取执行路径

func IsDir

func IsDir(fileAddr string) bool

IsDir 判断目录是否存在

func IsExist

func IsExist(fileAddr string) bool

IsExist 判断文件是否存在

func Pack

func Pack(packPath, packName string, dir []string) error

func PackLinux

func PackLinux()

func PackMacOs

func PackMacOs()

func PackNowSys

func PackNowSys()

func PackWindows

func PackWindows()

func RunCommand added in v1.0.2

func RunCommand(path, name string, arg ...string) (msg string, err error)

func StrFirstToUpper

func StrFirstToUpper(str string) string

func StringToArray

func StringToArray(str string, sep string) []string

StringToArray 字符串转切片

func ToUnderScore

func ToUnderScore(s string) string

ToUnderScore 驼峰命名转下划线命名

func UnPackZip added in v1.0.1

func UnPackZip(src, dir string) error

Types

type PackageConf

type PackageConf struct {
	Name              string      `json:"name"`
	ChromeExecPath    string      `json:"chrome_exec_path"`
	IntegratedBrowser bool        `json:"integrated_browser"`
	ChromePackPath    PlatformAll `json:"chrome_pack_path"`
	ChromeVersion     Platform    `json:"chrome_version"`
	Icons             Platform    `json:"icons"`
	WindowsArch       string      `json:"windows_arch"`
	DarwinAppleChip   bool        `json:"darwin_apple_chip"`
}

type Platform

type Platform struct {
	Linux   string `json:"linux"`
	Windows string `json:"windows"`
	Darwin  string `json:"darwin"`
}

type PlatformAll added in v1.1.5

type PlatformAll struct {
	Linux     string `json:"linux"`
	Windows64 string `json:"windows64"`
	Windows   string `json:"windows"`
	Darwin    string `json:"darwin"`
	DarwinArm string `json:"darwin_arm"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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