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


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

相关推荐
血不热了2 小时前
Qt:智能指针QScopedPointer 的使用(以及如何写一个QScopedPointer )
开发语言·qt
血不热了2 小时前
Qt:实现单例模式
qt·单例模式
草上爬2 小时前
Qt优秀开源项目之二十三:QSimpleUpdater
开发语言·qt·qsimpleupdater·自动升级
wkd_0073 小时前
【Qt | QLineEdit】Qt 中使 QLineEdit 响应 鼠标单击、双击事件 的两个方法
qt·qlineedit·鼠标双击·鼠标单击
凄凄迷人3 小时前
前端基于Rust实现的Wasm进行图片压缩的技术文档
前端·rust·wasm·图片压缩
yupeizhou4 小时前
Day 72
qt
Prejudices14 小时前
在 Qt 中使用中文
开发语言·c++·qt
码力码力我爱你15 小时前
Vue Application exit (SharedArrayBuffer is not defined)
linux·前端·javascript·qt·vue·wasm·webassembly
ljp_nan17 小时前
Qt --- 信号和信号槽
开发语言·qt
牵牛老人1 天前
Qt技巧(三)编辑框嵌入按钮,系统位数判断,判断某对象是否属于某种类,控件取句柄,支持4K,巧用QEventLoop,QWidget的窗体样式
开发语言·qt