project

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppType

type AppType int
const (
	AtApp AppType = iota
	AtHelper
)

type Author

type Author struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type DPKG

type DPKG struct {
	Include      []string `json:"include"` //打包资源目录、或文件 ["/to/path/file.txt", "/to/dir/*.*", "/to/dir"]
	Exclude      []string `json:"exclude"` //打包排除资源目录、或文件 ["/to/path/file.txt", "/to/dir/*.*", "/to/dir"]
	Package      string   `json:"package"`
	Homepage     string   `json:"homepage"`
	Compress     string   `json:"compress"` //压纹CEF, 当前仅支持7z/a压缩,""(空)时不启用压缩 默认: 7za
	UseCompress  bool     `json:"-"`        //如果支持配置的, true=使用压缩
	CompressFile string   `json:"-"`        //压缩后的文件完全目录
}

type Info

type Info struct {
	Manifest        string  `json:"manifest"`        //应用 manifest
	Icon            string  `json:"icon"`            //应用图标
	CompanyName     string  `json:"companyName"`     //公司名称
	ProductName     string  `json:"productName"`     //产品名称
	FileVersion     string  `json:"FileVersion"`     //文件版本
	ProductVersion  string  `json:"productVersion"`  //产品版本
	Copyright       *string `json:"copyright"`       //版权
	Comments        *string `json:"comments"`        //exe详情描述
	FileDescription *string `json:"fileDescription"` //描述
}

func (*Info) FromSlash

func (m *Info) FromSlash()

func (*Info) ToSlash

func (m *Info) ToSlash()

type NSIS

type NSIS struct {
	Icon                  string   `json:"icon"`                  //安装包图标
	Include               []string `json:"include"`               //打包资源目录、或文件 ["/to/path/file.txt", "/to/dir/*.*", "/to/dir"]
	Exclude               []string `json:"exclude"`               //打包排除资源目录、或文件 ["/to/path/file.txt", "/to/dir/*.*", "/to/dir"]
	UnIcon                string   `json:"unIcon"`                //安装包卸载图标
	License               string   `json:"license"`               //安装包授权信息,(license.txt)文件路径
	Language              string   `json:"language"`              //安装包语言, 中文: SimpChinese, 英文: English, 语言在 NSIS_HOME/Contrib/Language files
	RequestExecutionLevel string   `json:"requestExecutionLevel"` //admin or ""
	Compress              string   `json:"compress"`              //压缩CEF, 当前仅支持7z/a压缩,""(空)时不启用压缩 默认: 7za
	CompressName          string   `json:"compressName"`          //压缩CEF后的7z包名称
	UseCompress           bool     `json:"-"`                     //如果支持配置的, true=使用压缩
	CompressFile          string   `json:"-"`                     //压缩后的文件完全目录
}

NSIS windows NSIS

func (*NSIS) FromSlash

func (m *NSIS) FromSlash()

func (*NSIS) ToSlash

func (m *NSIS) ToSlash()

type PList

type PList struct {
	Include                    []string `json:"include"`                    //打包资源目录、或文件 ["/to/path/file.txt", "/to/dir/*.*", "/to/dir"]
	Exclude                    []string `json:"exclude"`                    //打包排除资源目录、或文件 ["/to/path/file.txt", "/to/dir/*.*", "/to/dir"]
	Icon                       string   `json:"icon"`                       //应用图标, png 或 icns, 如果指定png则生成icns, 如果指定icns则直接使用
	CompanyName                string   `json:"companyName"`                //公司名称
	ProductName                string   `json:"productName"`                //产品名称
	FileVersion                string   `json:"FileVersion"`                //文件版本
	Locals                     []string `json:"locals"`                     //语言
	CFBundleVersion            string   `json:"cfBundleVersion"`            //内部版本
	CFBundleShortVersionString string   `json:"cfBundleShortVersionString"` //发布版本号版本
	Copyright                  *string  `json:"copyright"`                  //版权
	Comments                   *string  `json:"comments"`                   //exe详情描述
	LSUIElement                bool     `json:"-"`                          //UI
	Pkgbuild                   bool     `json:"-"`                          // 生成pkg安装包
}

type Project

type Project struct {
	AppType        AppType `json:"-"`              // app, helper
	Clean          bool    `json:"-"`              // 清空配置重新生成
	Name           string  `json:"name"`           // 应用名称
	ProjectPath    string  `json:"projectPath"`    // 项目目录
	FrameworkPath  string  `json:"frameworkPath"`  // 框架目录 未指定时使用环境变量 ENERGY_HOME
	AssetsDir      string  `json:"assetsDir"`      // 构建配置所在目录 未指定使用田默认内置配置
	OutputFilename string  `json:"outputFilename"` // 输出安装包文件名
	LibEMFS        string  `json:"libemfs"`        // 内置libs存放目录, 以项目目录根目录开始 ProjectPath + Libs = liblcl.dll 目录, 默认libs
	Info           Info    `json:"info"`           // 应用信息
	NSIS           NSIS    `json:"nsis"`           // windows nsis 安装包
	Dpkg           DPKG    `json:"dpkg"`           // linux dpkg 安装包
	PList          PList   `json:"plist"`          // darwin plist 安装包
	Author         Author  `json:"author"`         // 作者信息
}

Project holds the data related to a ENERGY project

func NewProject

func NewProject(projectPath string) (*Project, error)

NewProject 创建项目对象, 根据energy.json配置

Jump to

Keyboard shortcuts

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