wv

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0

Image README

Go Webview

是Go基于 LCL & Webview2, Webkit2 构建桌面应用的框架


go-version github release repo Go Report Go Reference license

项目简介

Go Webview 是 Go 基于 LCLWindows-Webview2 Linux-Webkit2 MacOS-Webkit2 开发的框架

LCL - 基础库, 图形用户界面(GUI)组件库, 提供了非常丰富的系统原生控件

Windows-Webview2 - 浏览器组件库 WebView4Delphi, 在LCL基础上封装的Webview2库

Linux-Webkit2 - 浏览器组件库 Webkit2GTK, 在LCL基础上封装的Webkit2库

MacOS-Webkit2 - 浏览器组件库 Webkit2Cocoa, 在LCL基础上封装的Webkit2库

使用 Go 和 Web 端技术 ( HTML + CSS + JavaScript ) 构建支持Windows平台桌面应用。

将web内容无缝集成到应用程序中,并自定义内容交互以满足应用程序的需求。

构建&使用

LCL 单独使用, 开发原生图形用户界面(GUI)应用. 轻量级, 丰富的系统原生控件

LCL + Webview 混合使用, 开发原生图形用户界面(GUI)和浏览器应用. 轻量级, 全量webview2 API, 轻量级 Webkit2 API

特点

  • 依赖 microsoft-edge 运行时环境
  • 具有完整的 Webview2 API 轻量级 Webkit2 API 和 LCL 系统原生控件
  • 开发环境简单, 编译速度快, 仅需Go和Webview2所需的动态链接库
  • 前端技术: 支持主流前端框架。例如:Vue、React、Angular 和 原生HTML+CSS+JS等
  • 事件驱动: 高性能事件驱动, 基于IPC通信,实现Go和Web端快速调用及数据交互
  • 资源加载: 可无需http服务支撑,直接读取本地资源或内置到执行文件的资源, 也支持http服务加载资源

内置依赖&集成

  • LCL
  • WebView4Delphi
  • Linux-Webkit2
  • MacOS-Webkit2
基本需求
  • Golang >= 1.20
  • 动态链接库
  • Windows: WebView2Loader.dll liblcl
  • MacOS Linux: `liblcl
示例
开发环境
  1. 安装 Golang
  2. 下载 Webview2LCL 控件库动态链接库, Windows 两个动态链接库必须同时使用, MacOS, Linux 只需要 liblcl
  3. Windows 将两个动态链接库配置到环境变量 ENERGY_HOME 目录下, 或放置到和执行文件 exe 同一目录
  4. 创建Go项目开始使用构建桌面应用, 参考示例 Webview2 examples
Windows
MacOS LCL + Webkit2
Linux LCL + Webkit2 GTK3

Build Debian 11

GTK >= 3.24.24 and Glib2.0 >= 2.66

Linux LCL + Webkit1 GTK2

Build Ubuntu 18.04

  • To be added

相关项目


如果你觉得此项目对你有帮助,请点亮 Star


ENERGY QQ交流群 & 微信

Image Image


鸣谢 Jetbrains

JetBrains Logo (Main) logo.


项目截图

Windows-10
Image

开源协议

license

Image Directories

Path Synopsis
Package wv Webview2 Implementation module Includes all Webview2 API implementations
Package wv Webview2 Implementation module Includes all Webview2 API implementations

Jump to

Keyboard shortcuts

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