Migrated repository
Go to file
2023-02-13 12:01:13 +08:00
cef 命令行工具-打包图形化设计工具 v1.0.0.1 2023-02-13 12:01:13 +08:00
cmd 命令行工具-打包图形化设计工具 v1.0.0.1 2023-02-13 12:01:13 +08:00
common v2.4.1 cmd package, templates 2023-01-29 19:10:31 +08:00
consts 对chromium增加一大部分配置属性 2023-02-04 23:52:15 +08:00
decimal go datetme d datetime 2022-10-05 15:33:17 +08:00
example demos: 增加无边框无标题可拖拽窗口示例 2023-02-12 18:59:03 +08:00
ipc v2.3.72 2023-01-29 13:26:02 +08:00
logger v2.3.72 2023-01-29 13:26:02 +08:00
pkgs upgrade: Merge branch 'dev' 2023-02-02 16:49:35 +08:00
types 对chromium增加一大部分配置属性 2023-02-04 23:52:15 +08:00
.gitattributes 增加示例使用和注释说明 2022-10-05 20:37:20 +08:00
.gitignore v2.5.2 gitignore 2023-02-03 09:54:46 +08:00
go.mod 程序结束后对动态库的释放 2023-02-06 15:25:28 +08:00
go.sum 程序结束后对动态库的释放 2023-02-06 15:25:28 +08:00
LICENSE Initial commit 2022-10-04 00:30:09 +08:00
README.md README.md 2023-02-02 19:37:16 +08:00
README.zh_CN.md README.md 2023-02-02 19:37:16 +08:00

Energy is Go's framework for building desktop applications based on CEF

中文 | English


Introduction

Energy Is a framework for building desktop applications using JavaScript,HTML, and CSS based on Golcl and CEF4Delphi Pure Go language development framework, embedded Chromium CEF binary

Allows you to use Web front-end technology to build cross-platform applications on Windows, Linux, and MacOS

You can use the Energy and Golcl to build compact system UI cross-platform application separately

Supports Windows_32, 64 bits, Linux_x86_64 bits, MacOS_x86_64 bits

In Go and Web technologies, based on IPC communication, you can easily interact data, function calls, and event calls between Go and Web without the need for a Web Service interface, just as easily as calling functions in the language itself

In Go, you can also define JS variables, which can be used by Web end JS to realize Go variable or structure object data synchronization

Call JS function and JS event listener in Go to realize functional interaction between GO and JS

Call Go function in JS, listen to events of Go, and realize functional interaction between JS and GO

windows 32 bits

Installation Environment

Install it automatically using the energy command line tool

  1. go get github.com/energye/energy

  2. cd energy/cmd/energy

  3. go install

  4. energy install .

Getting started guide

Quick start

Basic needs

golang >= 1.18

Use the energy command line tool to automatically install environment dependencies 【energy install .】Automatically configure the ENERGY_HOME environment

Example/simple example

go mod tidy

IDE run simple

Currently, the command line tools do not support packaged applications, Windows you can use (MSI or Inno Setup) and other green packaging tools, Deb installation package in Linux, MacOS generates. App packages by default or custom. App packages

example/simple code
package main

import (
	"github.com/energye/energy/cef"
)

func main() {
	//Global initialization, which every application must call
	cef.GlobalInit(nil, nil)
	//Creating an Application
	cefApp := cef.NewApplication(nil)
	//Specify a URL address, or a local html file directory
	cef.BrowserWindow.Config.Url = "https://www.baidu.com"
	//Running the Application
	cef.Run(cefApp)
}


License GPL 3.0