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 小时前
开源QML控件:进度条滑动控件(含源码下载链接)
前端·qt·开源·qml
꧁坚持很酷꧂5 小时前
Linux Ubuntu18.04下安装Qt Craeator 5.12.9(图文详解)
linux·运维·qt
ChoSeitaku5 小时前
17.QT-Qt窗口-工具栏|状态栏|浮动窗口|设置停靠位置|设置浮动属性|设置移动属性|拉伸系数|添加控件(C++)
c++·qt·命令模式
OpenC++8 小时前
【C++QT】Buttons 按钮控件详解
c++·经验分享·qt·leetcode·microsoft
我真的不会C9 小时前
QT窗口相关控件及其属性
开发语言·qt
云小逸10 小时前
【QQMusic项目界面开发复习笔记】第二章
c++·qt
꧁坚持很酷꧂11 小时前
配置Ubuntu18.04中的Qt Creator为中文(图文详解)
开发语言·qt·ubuntu
快乐飒男11 小时前
Qt基础009(HTTP编程和QJSON)
qt
此刻我在家里喂猪呢14 小时前
Qt指ModbusTcp协议的使用
qt
爱上解放晚晚14 小时前
QT 的.pro 转 vsproject 工程
开发语言·qt