2022-12-07 15:50:59 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
2023-02-19 23:21:47 +08:00
|
|
|
// Licensed under Apache License Version 2.0, January 2004
|
|
|
|
//
|
|
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
2022-12-07 15:50:59 +08:00
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
2023-01-29 14:24:11 +08:00
|
|
|
package internal
|
2022-11-09 11:50:59 +08:00
|
|
|
|
|
|
|
type CommandConfig struct {
|
2022-11-09 12:12:40 +08:00
|
|
|
Index int
|
|
|
|
Wd string
|
2022-11-09 11:50:59 +08:00
|
|
|
Install Install `command:"install"`
|
|
|
|
Package Package `command:"package"`
|
2022-11-18 12:56:27 +08:00
|
|
|
Version Version `command:"version"`
|
2023-07-21 13:01:05 +08:00
|
|
|
Setenv Setenv `command:"setenv"`
|
2023-07-26 11:13:45 +08:00
|
|
|
Env Env `command:"env"`
|
2023-09-02 23:57:26 +08:00
|
|
|
Init Init `command:"init"`
|
2023-08-20 21:51:12 +08:00
|
|
|
Build Build `command:"build"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Command struct {
|
|
|
|
Run func(c *CommandConfig) error
|
|
|
|
UsageLine, Short, Long string
|
2022-11-09 11:50:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Install struct {
|
2022-11-18 12:15:47 +08:00
|
|
|
Path string `short:"p" long:"path" description:"Installation directory Default current directory"`
|
|
|
|
Version string `short:"v" long:"version" description:"Specifying a version number"`
|
|
|
|
Name string `short:"n" long:"name" description:"Name of the frame after installation" default:"EnergyFramework"`
|
2023-08-21 12:22:08 +08:00
|
|
|
Download string `short:"d" long:"download" description:"Download Source, 0:gitee or 1:github, Default empty" default:""`
|
2023-08-18 18:20:52 +08:00
|
|
|
CEF string `short:"c" long:"cef" description:"Install system supports CEF version, provide 4 options, default empty. default, windows7, gtk2, flash" default:""`
|
2022-11-09 11:50:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Package struct {
|
2023-09-02 23:37:52 +08:00
|
|
|
Path string `short:"p" long:"path" description:"project path"`
|
2022-11-09 11:50:59 +08:00
|
|
|
}
|
2022-11-09 12:12:40 +08:00
|
|
|
|
2023-07-26 11:13:45 +08:00
|
|
|
type Env struct {
|
|
|
|
}
|
|
|
|
|
2023-07-21 13:01:05 +08:00
|
|
|
type Setenv struct {
|
|
|
|
Path string `short:"p" long:"path" description:"Energy framework dir"`
|
|
|
|
}
|
|
|
|
|
2022-11-18 12:56:27 +08:00
|
|
|
type Version struct {
|
|
|
|
All bool `short:"a" long:"all" description:"show all"`
|
|
|
|
}
|
|
|
|
|
2023-09-02 23:57:26 +08:00
|
|
|
type Init struct {
|
|
|
|
Name string `short:"n" long:"name" description:"Initialized project name"`
|
2022-11-09 12:12:40 +08:00
|
|
|
}
|
2023-08-18 18:20:52 +08:00
|
|
|
|
2023-08-20 21:51:12 +08:00
|
|
|
type Build struct {
|
2023-08-18 18:20:52 +08:00
|
|
|
}
|