提交 93612a21 编写于 作者: yanghye's avatar yanghye

U: command-line tool

上级 e7de68b3
......@@ -13,13 +13,18 @@ package internal
import "runtime"
const (
cefKey = "cef"
energyKey = "energy"
DownloadVersionConfigUrl = "https://energy.yanghy.cn/autoconfig/edv.json"
DownloadExtractUrl = "https://energy.yanghy.cn/autoconfig/extract.json"
CheckUpgradeURL = "https://energy.yanghy.cn/autoconfig/update.json"
frameworkCache = "EnergyFrameworkDownloadCache"
EnergyHomeKey = "ENERGY_HOME"
domain = "https://energy.yanghy.cn"
DownloadVersionURL = domain + "/api/cmd/edv"
DownloadInstallURL = domain + "/api/cmd/install"
DownloadExtractURL = domain + "/api/cmd/extract"
CheckUpgradeURL = domain + "/api/cmd/upgrade"
CheckCreateURL = domain + "/api/cmd/create"
)
const (
cefKey = "cef"
energyKey = "energy"
frameworkCache = "EnergyFrameworkDownloadCache"
EnergyHomeKey = "ENERGY_HOME"
)
const (
......
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Apache License Version 2.0, January 2004
//
// https://www.apache.org/licenses/LICENSE-2.0
//
//----------------------------------------
// 创建 energy 项目
package internal
......@@ -107,7 +107,7 @@ Your current installation environment is Linux and there are two GTK solutions a
os.MkdirAll(installPathName, fs.ModePerm)
os.MkdirAll(filepath.Join(c.Install.Path, frameworkCache), fs.ModePerm)
println("Start downloading CEF and Energy dependency")
downloadJSON, err := downloadConfig(DownloadVersionConfigUrl)
downloadJSON, err := downloadConfig(DownloadVersionURL)
if err != nil {
fmt.Fprint(os.Stderr, err.Error()+"\n")
os.Exit(1)
......@@ -171,7 +171,7 @@ Your current installation environment is Linux and there are two GTK solutions a
downloadEnergyURL = strings.ReplaceAll(downloadEnergyURL, "{OSARCH}", libEnergyOS)
//提取文件配置
extractData, err := downloadConfig(DownloadExtractUrl)
extractData, err := downloadConfig(DownloadExtractURL)
if err != nil {
fmt.Fprint(os.Stderr, err.Error(), "\n")
os.Exit(1)
......
......@@ -32,7 +32,7 @@ func init() {
}
func runVersion(c *CommandConfig) error {
downloadJSON, err := downloadConfig(DownloadVersionConfigUrl)
downloadJSON, err := downloadConfig(DownloadVersionURL)
if err != nil {
fmt.Fprint(os.Stderr, err.Error()+"\n")
os.Exit(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册