{"id":17968784,"url":"https://github.com/snail007/go-wingui","last_synced_at":"2025-07-09T22:36:41.602Z","repository":{"id":70296809,"uuid":"115499437","full_name":"snail007/go-wingui","owner":"snail007","description":"本项目是golang在windows上用户图形界面gui解决方案,本项目可以不用对你的go写的网站程序做任何修改,就可以实现本地化,使用go+html+css+js写windows本地应用","archived":false,"fork":false,"pushed_at":"2018-01-04T06:22:43.000Z","size":1144,"stargazers_count":226,"open_issues_count":2,"forks_count":67,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-05T16:37:01.571Z","etag":null,"topics":["cef","cef-bin","golang-cef","golang-windows-gui","gui"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snail007.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-27T08:29:13.000Z","updated_at":"2025-03-20T03:31:57.000Z","dependencies_parsed_at":"2023-02-24T07:30:47.800Z","dependency_job_id":null,"html_url":"https://github.com/snail007/go-wingui","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/snail007/go-wingui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail007%2Fgo-wingui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail007%2Fgo-wingui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail007%2Fgo-wingui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail007%2Fgo-wingui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snail007","download_url":"https://codeload.github.com/snail007/go-wingui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail007%2Fgo-wingui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504616,"owners_count":23618831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cef","cef-bin","golang-cef","golang-windows-gui","gui"],"created_at":"2024-10-29T14:41:34.568Z","updated_at":"2025-07-09T22:36:41.585Z","avatar_url":"https://github.com/snail007.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"本项目是golang在windows上用户图形界面gui解决方案,本项目可以不用对你的go写的网站程序做任何修改,就可以实现本地化,项目原理是写了一个本地应用，使用开源的CEF框架实现了一个“浏览器”，然后“浏览器”里面打开go网站，这样就实现了一个不依赖系统浏览器的独立gui本地应用程序。我们可以使用方便强大的html+css+js完成优美的应用界面，功能可以通过RPC，ajax调用后端go Web服务实现。\n\n[![stable](https://img.shields.io/badge/stable-stable-green.svg)](https://github.com/snail007/go-wingui/) [![license](https://img.shields.io/github/license/snail007/go-wingui.svg?style=plastic)]() [![download_count](https://img.shields.io/github/downloads/snail007/go-wingui/total.svg?style=plastic)](https://github.com/snail007/go-wingui/releases) [![download](https://img.shields.io/github/release/snail007/go-wingui.svg?style=plastic)](https://github.com/snail007/go-wingui/releases) \n\n# 特点\n- 使用新版CEF内核Chromium 63.0.3239.109，页面可以使用最新的css3，html5技术。\n- JS注入，可以对打开的任意页面注入你的js代码，把要注入的js代码写入srv\\inject.js里面即可。\n- 外观大小自由控制，可以自由设置宽度高度，以及能否改变窗体大小。\n- 几乎覆盖所有windows系统，win7以上32位，64位都支持。\n- 代码全部开源，CEF的delphi7项目源码，内部服务和启动器项目的golang源码都开源。\n- 详细的二次开发步骤，帮助你二次开发。\n- 发行包只有28M，但是已经包含了所有的chrome浏览器功能，以及内部服务。\n\n# 使用说明\n1.环境要求是windows，理论上win7以上32位，64位都支持。  \n2.下载程序[go-wingui](https://github.com/snail007/go-wingui/releases/tag/v2.0)  \n3.解压到比如D盘，D:\\dist  \n4.把你的go网站程序(假设名字是app.exe)放入D:\\dist\\app文件夹  \n5、假设你的app.exe启动之后，访问链接是http://127.0.0.1:9999/index  \n编辑D:\\dist\\launcher.ini,做如下部分修改：     \nstart_exec=\"app/app.exe\"   \nstart_directory=\"app\"   \nstart_url=\"http://127.0.0.1:9999/index\"     \n6.配置完毕，双击D:\\dist\\launcher.exe，即可看到效果了。  \n# 加入组织\n任何问题可以加群讨论交流，欢迎加入QQ群号码：189618940   \n\n# Demo\n![demo](/docs/images/demo.png)\n\n**提示：**  \n如果app.exe是go程序，为了避免出现程序启动出现命令行黑框，编译go程序的时候加上参数：go build  -ldflags=\"-H=windowsgui\"  \n\n#  源码使用  \nclone源码：  \ngit clone https://github.com/snail007/go-wingui.git ./   \n\n1.delphi7  \ncef是delphi7开发，使用的是第三方cef4delphi控件，已经安装了cef4delphi控件的绿色免安装版delphi7下载地址： [delphi7](https://github.com/snail007/go-wingui/releases/tag/BorlandDelphi7)   \n\n2、解压delphi7  \n双击BorlandDelphi7\\Bin\\DELPHI32.EXE,启动delphi7，\n并把BorlandDelphi7\\Projects添加到库目录，步骤：工具-》环境选项-》库选项  \n在库路径最下面加上：“d:\\BorlandDelphi7\\projects;”，不带双引号。  \n这里假设解压BorlandDelphi7位于D盘。  \n\n3、cef内核  \n本项目使用的是32bit CEF 3.3239.1710.g85f637a which includes Chromium 63.0.3239.109.\n下载[cef](https://github.com/snail007/go-wingui/releases/tag/cef_3.3239.1710.g85f637a_Chromium-63.0.3239.109)，并解压到：cef\\bin,\n本项目对cef进行了一些精简，便于下载使用。如果需要更新cef，下载最新版cef（不保证稳定性），  \n解压到cef\\bin即可。  \n\n4、delphi7的工程项目是cef\\sources  \ncef\\sources\\cef.dpr是工程文件，启动delphi7打开此文件即可。  \n\n5、启动器launcher和内部服务srv是golang开发，走标准的go项目开发流程就行。  \n\n6、开发环境搭建完成。  \n\n### cef4delphi控件  \n如果不需要定制化cef4delphi控件，跳过第本步骤。  \n下载地址：[cef4delphi](https://github.com/snail007/go-wingui/releases/tag/CEF4Delphi)   \n如果需要重新定制化cef4delphi控件，需要修改cef4delphi控件源码，然后安装控件到delphi7中。   \n步骤如下：  \n1、删除cef4delphi控件  \n首先关闭delphi7，找到delphi7里面的Projects文件夹，删除里面的CEF4Delphi_D7开头的三个文件。  \n2、启动delphi7，会提示你找不到控件，问你以后是否加载，选择“否”即可，然后关闭delphi7。  \n3、修改完毕cef4delphi控件源码，启动delphi7，然后在delphi7中选择打开项目，  \n选择cef\\cef4delphi\\CEF4Delphi_D7.dpk,在打开的界面点击“编译”，然后点击“安装”。  \ndelphi7控件栏最后面应该出现了Chromium标签。  \n如果不成功，重复2-3步骤即可，一般第二次就会出现。  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnail007%2Fgo-wingui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnail007%2Fgo-wingui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnail007%2Fgo-wingui/lists"}