mirror of
https://gitee.com/energye/energy.git
synced 2024-12-04 20:58:21 +08:00
50 lines
1.7 KiB
Go
50 lines
1.7 KiB
Go
//----------------------------------------
|
|
//
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
//
|
|
// Licensed under Apache License Version 2.0, January 2004
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
//----------------------------------------
|
|
|
|
package internal
|
|
|
|
import (
|
|
"github.com/energye/energy/v2/cmd/internal/command"
|
|
"github.com/energye/energy/v2/cmd/internal/install"
|
|
)
|
|
|
|
var CmdInstall = &command.Command{
|
|
UsageLine: "install -p [path] -v [version] -n [name] -d [download] -a [all] -c [cef]",
|
|
Short: "Automatically configure the CEF and Energy framework",
|
|
Long: `
|
|
-p Installation directory Default current directory
|
|
-v Specifying a version number,Default latest.\
|
|
-n Name of the framework directory after installation, Default EnergyFramework.\
|
|
-d Download Source, 0:gitee or 1:github, Default empty
|
|
-a Install all, skip installation prompts (Y/n), default empty:n
|
|
-c Install system supports CEF version, provide 4 options, default empty
|
|
default : Automatically select support for the latest version based on the current system.
|
|
109 : CEF 109.1.18 is the last one to support Windows 7.
|
|
106 : CEF 106.1.1 is the last default support for GTK2 in Linux.
|
|
87 : CEF 87.1.14 is the last one to support Flash.
|
|
. Execute default command
|
|
|
|
Automatically install and configure the Energy development environment.
|
|
Installation package is downloaded over the network during the installation process.
|
|
According to the prompt (Y), install Golang、CEF(Chromium Embedded Framework)、NSIS, If installed, skip.
|
|
`,
|
|
}
|
|
|
|
func init() {
|
|
CmdInstall.Run = runInstall
|
|
}
|
|
|
|
// https://cef-builds.spotifycdn.com/cef_binary_107.1.11%2Bg26c0b5e%2Bchromium-107.0.5304.110_windows64.tar.bz2
|
|
// 运行安装
|
|
func runInstall(c *command.Config) error {
|
|
install.Install(c)
|
|
return nil
|
|
}
|