energy/README.md

207 lines
9.4 KiB
Markdown
Raw Normal View History

2023-02-17 17:37:58 +08:00
<p align="center">
2024-10-02 17:40:56 +08:00
<img src="https://energye.github.io/imgs/energy.png">
2023-02-17 17:37:58 +08:00
</p>
2023-07-05 17:33:59 +08:00
<p align="center" style="font-size: 24px;">
<strong>
2024-05-16 11:37:53 +08:00
Energy is a GUI framework developed by Go, based on LCL and CEF
2023-07-05 17:33:59 +08:00
</strong>
</p>
2023-02-14 20:33:57 +08:00
[中文](README.zh_CN.md) |
2022-12-03 15:05:07 +08:00
English
2022-10-04 16:21:00 +08:00
2022-10-06 16:39:52 +08:00
---
2024-10-14 13:12:31 +08:00
2023-09-28 11:06:26 +08:00
![go-version](https://img.shields.io/github/go-mod/go-version/energye/energy?logo=git&logoColor=green)
2023-02-14 20:33:57 +08:00
[![github](https://img.shields.io/github/last-commit/energye/energy/main.svg?logo=github&logoColor=green&label=commit)](https://github.com/energye/energy)
2023-05-31 19:37:08 +08:00
[![release](https://img.shields.io/github/v/release/energye/energy?logo=git&logoColor=green)](https://github.com/energye/energy/releases)
2024-09-29 13:01:38 +08:00
![Build Status](https://github.com/energye/energy/actions/workflows/build-test.yml/badge.svg)
2023-02-14 20:33:57 +08:00
![repo](https://img.shields.io/github/repo-size/energye/energy.svg?logo=github&logoColor=green&label=repo-size)
2023-10-05 19:47:12 +08:00
[![Go Report](https://goreportcard.com/badge/github.com/energye/energy)](https://goreportcard.com/report/github.com/energye/energy/v2)
[![Go Reference](https://pkg.go.dev/badge/github.com/energye/energy)](https://pkg.go.dev/github.com/energye/energy/v2)
[![codecov](https://codecov.io/gh/energye/energy/graph/badge.svg?token=H370UFUF12)](https://codecov.io/gh/energye/energy)
[![contributors](https://img.shields.io/github/contributors/energye/energy)](https://github.com/energye/energy/graphs/contributors)
[![license](https://img.shields.io/github/license/energye/energy.svg?logo=git&logoColor=red)](http://www.apache.org/licenses/LICENSE-2.0)
2023-02-14 20:33:57 +08:00
---
2024-10-15 22:22:45 +08:00
### [Project Introduction](https://energye.github.io/en/course/what-is-energy)
2023-07-05 17:33:59 +08:00
2024-05-16 11:37:53 +08:00
- Energy is a GUI framework developed in Go, based on [LCL](https://gitlab.com/freepascal.org/lazarus/lazarus) and [CEF](https://bitbucket.org/chromiumembedded/cef)(Chromium Embedded Framework), which is used to develop cross-platform desktop applications for Windows, MacOS, and Linux.
- LCL alone can create lightweight native applications, or can be combined with CEF to create more feature-complete applications.
- Construct cross-platform desktop applications that support Windows, Linux, and MacOS using Go and web technologies (HTML + CSS + JavaScript).
2023-02-17 14:34:25 +08:00
### Characteristic
- Rich CEF API and LCL system native widgets
- Development environment is simple and the compilation speed is fast. Only need Go and Energy.
- Cross-Platform: You can package your code as Windows, domestic UOS, Deepin, Kylin, MacOS and Linux
- Responsibilities
- Go: Go is responsible for creating Windows, configuring CEF and implementing functions, creating various UI components, calling the low level of the system and some functions that JS cannot handle, such as: file flow, security encryption, high-performance processing, etc.
- Web: HTML + CSS + JavaScript is responsible for the function of the client interface, you can make any interface you want.
- Front-end technology: Support mainstream frameworks, such as Vue, React, Angular or pure HTML+CSS+JS.
- Event driven: High performance event driven communication based on IPC allowing intercommunication between Go and Web.
- Resource loading: You can either read local resources or resources built into execution files either with or without HTTP services.
2023-02-14 20:33:57 +08:00
### Built-in dependency&integration
2022-10-06 16:39:52 +08:00
2023-06-20 19:33:53 +08:00
- [![LCL](https://img.shields.io/badge/LCL-green)](https://github.com/energye/golcl)
- [![CEF-CEF4Delphi](https://img.shields.io/badge/CEF(Chromium%20Embedded%20Framework)%20CEF4Delphi-green)](https://github.com/salvadordf/CEF4Delphi)
2023-02-14 20:33:57 +08:00
2024-10-15 22:14:43 +08:00
### [Development Environment](https://energye.github.io/en/course/getting-started)
2023-07-05 17:33:59 +08:00
2023-02-14 20:33:57 +08:00
#### Basic needs
2023-07-05 17:33:59 +08:00
- Golang >= 1.18
- Energy (CEF, liblcl)
#### Environmental installation
2024-10-15 22:22:45 +08:00
Automatic installation development environment using the energy [command-line tool](https://energye.github.io/en/course/cli-use-instructions)
2022-10-18 15:15:29 +08:00
2024-10-15 22:14:43 +08:00
### Guide to Start - [Link](https://energye.github.io/en/course/getting-started)
2023-02-14 20:33:57 +08:00
2024-10-15 22:14:43 +08:00
- [Guide](https://energye.github.io/en/course/getting-started)
2024-10-14 13:12:31 +08:00
- [Example](https://energye.github.io/en/examples)
- [Document](https://energye.github.io/en/document)
2022-10-06 16:39:52 +08:00
### Quick Start
2023-07-05 17:33:59 +08:00
2024-10-15 22:14:43 +08:00
- [Getting Started](https://energye.github.io/en/course/getting-started)
### Run a simple application by three steps
2024-10-15 22:14:43 +08:00
1. Install development environment: `energy install`
2. Initiate an Application: `energy init`
3. Run the Application: `go run main.go`
### sample code
2023-02-14 20:33:57 +08:00
main.go
2022-10-06 16:39:52 +08:00
```go
package main
import (
2024-10-15 22:14:43 +08:00
"github.com/energye/energy/v2/cef"
2022-10-06 16:39:52 +08:00
)
func main() {
2024-10-15 22:14:43 +08:00
//Global initialization
cef.GlobalInit(nil, nil)
//Create an application
app := cef.NewApplication()
//Specify a URL address or local HTML file directory
cef.BrowserWindow.Config.Url = "https://energye.github.io"
//Run Application
cef.Run(app)
2022-10-06 16:39:52 +08:00
}
```
2023-07-05 17:33:59 +08:00
### Build
2024-10-14 13:12:31 +08:00
2024-10-15 22:14:43 +08:00
1. Build`energy build`
2. Package`energy package`
3. Package Type
- windows: Using `nsis` create exe installation package
- linux: Using `dpkg` create deb installation package
- macos: Generate `xxx.app`
2023-07-05 17:33:59 +08:00
2023-02-14 20:33:57 +08:00
### System support
![Windows](https://img.shields.io/badge/windows-supported-success.svg?logo=Windows&logoColor=blue)
2023-06-29 12:33:44 +08:00
![MacOS](https://img.shields.io/badge/MacOS-supported-success.svg?logo=MacOS)
2023-02-14 20:33:57 +08:00
![Linux](https://img.shields.io/badge/Linux-supported-success.svg?logo=Linux&logoColor=red)
2024-02-27 10:21:40 +08:00
| | 32 Bit | 64 Bit | Test System Version |
|-------------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|-------------------------|
| Windows | ![Windows](https://img.shields.io/badge/supported-success.svg?logo=Windows&logoColor=blue) | ![Windows](https://img.shields.io/badge/supported-success.svg?logo=Windows&logoColor=blue) | Windows XP SP3、 7、10、11 |
2023-11-03 10:58:33 +08:00
| MacOSX | ![MacOSX](https://img.shields.io/badge/N/A-inactive.svg?logo=MacOS) | ![MacOSX](https://img.shields.io/badge/supported-success.svg?logo=MacOS) | MacOSX 10.15 |
2023-11-15 19:54:42 +08:00
| MacOS M1 M2 | ![MacOS](https://img.shields.io/badge/N/A-inactive.svg?logo=MacOS) | ![MacOS](https://img.shields.io/badge/supported-success.svg?logo=MacOS) | MacOS M2 |
2023-08-31 14:05:20 +08:00
| Linux | ![Linux](https://img.shields.io/badge/SelfCompila-supported-success.svg?logo=Linux) | ![Linux](https://img.shields.io/badge/supported-success.svg?logo=Linux&logoColor=red) | Deepin20.8、Ubuntu18.04、LinuxMint21 |
2023-11-03 10:58:33 +08:00
| Linux ARM | ![Linux ARM](https://img.shields.io/badge/SelfCompila-supported-success.svg?logo=Linux) | ![Linux ARM](https://img.shields.io/badge/supported-success.svg?logo=Linux) | Kylin-V10-SP1-2107 |
2023-02-14 20:33:57 +08:00
2023-09-25 14:43:59 +08:00
### Related Projects
2024-10-14 13:12:31 +08:00
- [CEF](https://github.com/chromiumembedded/cef)
- [CEF4Delphi](https://github.com/salvadordf/CEF4Delphi)
- [CefSharp](https://github.com/cefsharp/CefSharp)
- [Java-CEF](https://bitbucket.org/chromiumembedded/java-cef)
- [cefpython](https://github.com/cztomczak/cefpython)
- [Chromium](https://chromium.googlesource.com/chromium/src/)
2023-09-25 14:43:59 +08:00
2023-02-14 20:33:57 +08:00
---
2023-11-15 19:53:22 +08:00
### Welcome to join
2024-10-14 13:12:31 +08:00
2023-11-15 19:53:22 +08:00
join energy throwing in the process of construction, there are many things that cannot be completed alone, if there are interested students who want to participate in the realization or learning of energy, you can contact me through WeChat or QQ.
2023-06-14 10:37:26 +08:00
If this project is helpful to you, please give me a star
2023-06-14 10:37:26 +08:00
---
2023-11-15 19:53:22 +08:00
### ENERGY QQ Group & WeChat
2023-02-14 20:33:57 +08:00
2023-11-15 19:53:22 +08:00
<p align="center">
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/assets/qq-group.jpg" width="250" title="QQ Group: 541258627" alt="QQ Group: 541258627">
<img src="https://energye.github.io/imgs/assets/we-chat.jpg" width="250" title="WeChat: sniawmdf" alt="WeChat: sniawmdf" style="margin-left: 30px;">
2023-11-15 19:53:22 +08:00
</p>
---
### Thanks Jetbrains
2023-02-14 20:33:57 +08:00
2023-06-14 10:37:26 +08:00
<p align="center">
2023-11-15 19:53:22 +08:00
<a href="https://www.jetbrains.com?from=energy">
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains Logo (Main) logo.">
</a>
2023-06-14 10:37:26 +08:00
</p>
2023-07-09 19:21:20 +08:00
2023-02-14 20:33:57 +08:00
---
### Project screenshot
2023-07-05 17:33:59 +08:00
2023-02-14 20:33:57 +08:00
##### Windows-10
2023-06-14 10:37:26 +08:00
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/frameless-windows-10.png">
2023-02-14 20:33:57 +08:00
2023-02-17 12:59:36 +08:00
##### Windows-7 32 & 64
2023-07-05 17:33:59 +08:00
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/frameless-windows-7-64.png">
<img src="https://energye.github.io/imgs/readme/frameless-windows-7-32.png">
2023-02-14 20:33:57 +08:00
2024-02-27 10:21:40 +08:00
##### Windows-XP-SP3
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/windows-xp-sp3.png">
2024-02-27 10:21:40 +08:00
2023-02-17 12:59:36 +08:00
##### Linux - Deepin
2023-07-05 17:33:59 +08:00
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/frameless-deepin-20.8.png">
<img src="https://energye.github.io/imgs/readme/frameless-deepin-hide-20.8.png">
2023-02-14 20:33:57 +08:00
2023-02-17 12:59:36 +08:00
##### Linux - Kylin ARM
2023-07-05 17:33:59 +08:00
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/frameless-kylin-arm-V10-SP1.png">
<img src="https://energye.github.io/imgs/readme/frameless-kylin-arm-hide-V10-SP1.png">
2023-02-17 12:59:36 +08:00
##### Linux - Ubuntu
2023-07-05 17:33:59 +08:00
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/frameless-ubuntu-18.04.6.png">
<img src="https://energye.github.io/imgs/readme/frameless-ubuntu-hide-18.04.6.png">
2023-02-14 20:33:57 +08:00
##### MacOSX
2023-07-05 17:33:59 +08:00
2024-10-15 22:14:43 +08:00
<img src="https://energye.github.io/imgs/readme/frameless-macos.png">
2023-02-14 20:33:57 +08:00
2022-10-18 18:16:16 +08:00
----
2023-02-14 20:33:57 +08:00
### Public License
[![license](https://img.shields.io/github/license/energye/energy.svg?logo=git&logoColor=green)](http://www.apache.org/licenses/LICENSE-2.0)
2023-08-22 17:28:45 +08:00
### Contributors
2024-10-14 13:12:31 +08:00
2023-08-22 17:28:45 +08:00
<a href="https://github.com/energye/energy/graphs/contributors">
<img src="https://opencollective.com/energy/contributors.svg?width=890&button=false" />
</a>