QT for webassembly

法一

编译qt源码

进入源码目录,命令行输入,

./configure.bat -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g++ -nomake examples -prefix %CD%\qtbase

大概10分钟就可以编译完毕

构建需要的模块

E:/Qt/Qt5.10.1/Tools/mingw530_32/bin/make.exe module-qtbase module-qtdeclarative

如果不需要裁剪,可以直接 E:/Qt/Qt5.10.1/Tools/mingw530_32/bin/make.exe

法二
bash 复制代码
git clone https://github.com/korczis/emscripten-qt
export EMSCRIPTEN_ROOT_PATH=/home/path/to/put/emscripten/emscripten/

mkdir build-emscripten-qt
cd build-emscripten-qt

../emscripten-qt/configure -xplatform qws/emscripten-clang  -embedded emscripten -static -opensource -debug  -no-qt3support -no-opengl -no-openssl   -system-zlib -no-gif -qt-zlib -qt-libpng -no-libmng -no-libtiff -qt-libjpeg -no-accessibility -dbus -script -no-fpu -no-mmx -no-3dnow -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-icu -no-rpath  -confirm-license -no-webkit -no-phonon -no-freetype -nomake demos -nomake examples -little-endian -no-feature-socket  -no-feature-codecs -no-feature-textcodecplugin -no-feature-systemlocale  -no-feature-qws_multiprocess -no-feature-sound    -no-feature-printpreviewwidget  -no-feature-printpreviewdialog  -no-feature-systemsemaphore -no-feature-sharedmemory -no-feature-localeventloop -feature-qws_clientblit -feature-qws_cursor  -depths 32 -make tools  --prefix=$(pwd)/install

"../configure.exe" -xplatform qws/emscripten-clang  -embedded -static -opensource -debug  -no-qt3support -no-opengl -no-openssl   -system-zlib -no-gif -qt-zlib -qt-libpng -no-libmng -no-libtiff -qt-libjpeg -no-accessibility -dbus -script -no-mmx -no-3dnow -no-sse -no-sse2 -confirm-license -no-webkit -no-phonon -no-freetype -nomake demos -nomake examples -little-endian -make tools


make sub-tools-bootstrap && make install_qmake sub-moc-install_subtargets sub-uic-install_subtargets sub-rcc-install_subtargets && make  sub-corelib-install_subtargets sub-gui-install_subtargets install_mkspecs
参考

https://www.cnblogs.com/chenchao521/articles/15493198.html

https://qtandeverything.blogspot.com/2017/06/qt-for-web-assembly.html

https://github.com/korczis/emscripten-qt

Index of /redmine/projects/emscripten-qt/wiki


创作不易,小小的支持一下吧!

相关推荐
小短腿的代码世界8 小时前
Qt实时盈亏计算深度解析:从持仓数据到动态盈亏展示
开发语言·qt
Python私教9 小时前
GenericAgent PySide6 桌面应用深度解析:悬浮按钮 + 聊天面板的原生 Qt 方案
开发语言·数据库·qt
用户8055336980310 小时前
现代Qt开发教程(新手篇)1.11——定时器
c++·qt
小短腿的代码世界12 小时前
Qt券商接口封装深度解析:统一API设计与多源适配
开发语言·qt·单元测试
T0uken12 小时前
基于 vcpkg 与 LLVM-MinGW 的 Qt6 静态链接开发方案
c++·windows·qt
Ulyanov13 小时前
《现代 Python 桌面应用架构实战:PySide6 + QML 从入门到工程化》 开发环境搭建与工具链极简主义 —— 拒绝臃肿,构建工业级基座
开发语言·python·qt·ui·架构·系统仿真
(Charon)17 小时前
【C++/Qt】Qt 实现 MQTT 测试工具:连接 Broker、订阅主题与发布消息
开发语言·c++·qt
Ulyanov17 小时前
《现代 Python 桌面应用架构实战:PySide6 + QML 从入门到工程化》:动态数据仪表盘与 NumPy 可视化 —— 从标量到向量的数据驱动进化
开发语言·python·qt·架构·numpy
小短腿的代码世界17 小时前
Qt序列化与持久化深度解析:从QDataStream到自定义二进制协议
开发语言·数据库·qt
誰能久伴不乏17 小时前
Qt/C++ 架构之美:用一个“水龙头”隐喻,讲透面向接口编程与彻底解耦
c++·qt·架构