Closed KingBes closed 2 months ago
虽然该库还在测试阶段
看到不一样的 用 PHP 写桌面成的思路
1、用 electron 或者 Tauri 绑定 PHP 静态运行时 https://nativephp.com/docs/1/getting-started/introduction 2、PHPCPP 编写的 GTK库
看到不一样的 用 PHP 写桌面成的思路
1、用 electron 或者 Tauri 绑定 PHP 静态运行时 https://nativephp.com/docs/1/getting-started/introduction 2、PHPCPP 编写的 GTK库
win桌面应用我已经整合方案了 php-webview
Surprisingly, I’ve been developing a similar tool for some time: https://github.com/SerafimArts/Boson
In case that the target platform is Windows OS, then it is quite possible to use this solution.
However, it is worth considering that it is not yet completely stable))) But I think it won’t be difficult to fix anything, given that all the code there is exclusively in PHP
我用wv在macos和windows做了程序,大概思路是连接一个wv的库,因为webview/webview在win和mac上几乎无依赖
但linux就不一样啦,wv依赖了一托x相关的东西,如果链接到wv,那么这个二进制在没装x/x版本不一样的地方就跑不了
所以其实比较合适的方法可能是把wv的so丢进phar,然后你解压它跑ffi
I've achieved webview on macos and windows, just simply statically linking webview.lib, because it do not rely on anything on win/mac.
But for linux, wv depends on may x(11) things, it do the same thing, the built micro wont work on systems that no x installed or different version of x installed.
So I think the proper way for linux may be: build a webview.so, pack it into a phar, extract on runtime and use ffi call it.
源码 webview 经过我利用 phpcpp 来构建linux环境的拓展库 webview for php 试试看能否实现?