使用nodegui 开发高性能的跨平台桌面端应用
nodegui 是基于qt + nodejs 的跨平台桌面开发方案,官方同时也提供了很不错的文档
简单使用
使用官方的starter
- clone 代码
git clone https://github.com/nodegui/nodegui-starter.git
- 安装依赖
有点慢,稍等
cd nodegui-starter.
yarn
效果:
@nodegui/nodegui@0.1.8 install /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/nodegui
> npm -v
6.9.0
> @nodegui/qode@1.0.4 postinstall /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/qode
> node install.js
Local Qode 1.0.4 archive doesnt exists
Extracting binaries
> @nodegui/nodegui@0.1.8 postinstall /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/nodegui
> npm run build:addon
> @nodegui/nodegui@0.1.8 build:addon /Users/dalong/Documents/GitHub/nodegui-starter/node_modules/@nodegui/nodegui
> node-gyp -j 8 configure build
CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o
TOUCH 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
ACTION binding_gyp_qtnode_target_symlink_qt_headers 8d54a0613d50a84adae49a5312f848b52b1b3ed9.intermediate
LIBTOOL-STATIC Release/nothing.a
CXX(target) Release/obj.target/qtnode/src/cpp/main.o
CXX(target) Release/obj.target/qtnode/src/cpp/Extras/Utils/nutils.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/FlexLayout/flexlayout.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/FlexLayout/flexitem.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/YogaWidget/nodestyle.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/Events/eventsmap.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/Events/eventwidget.o
CXX(target) Release/obj.target/qtnode/src/cpp/core/YogaWidget/yogawidget.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QApplication/qapplication_wrap.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QClipboard/qclipboard_wrap.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QEvent/QKeyEvent/qkeyevent_wrap.o
CXX(target) Release/obj.target/qtnode/src/cpp/QtGui/QPixmap/qpixmap_wrap.o
- 启动
yarn start
- 效果
说明
nodegui 做为跨平台的桌面开发还是不错的,性能很好,注意noodejs 的版本需要v12.0 以及以上的.同时官方也包含了一个基于react 的开发包,
而且还提供了一个跨平台的打包框架packer
参考资料
https://github.com/nodegui/nodegui
https://nodegui.github.io/nodegui/
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 上周热点回顾(2.17-2.23)
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
· spring官宣接入deepseek,真的太香了~
2018-09-08 apache airflow docker 运行简单试用