• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Qt5.15.2 Webassembly源码裁剪编译

武飞扬头像
feiyu_qq
帮助1

第一步: 
    .\configure -debug-and-release -opensource -prefix "D:\qt-everywhere-src\compFile" -platform win32-g -nomake examples
第二步:
    mingw32-make -j4
第三步:
    mingw32-make install
 

编译core与gui模块:
    C:\Qt\5.15.2\yuanma\qt-everywhere-src-5.15.2\qtbase\src\gui
    C:\Qt\5.15.2\yuanma\qt-everywhere-src-5.15.2\qtbase\src\corelib

裁剪Qt源码库
    1. 源码库下.gitmodules文件定义了Qt所包含的子模块;
        qt.pro遍历该文件获取要编译的模块;
        再根据依赖排序sort_depends,将需要编译的库,按顺序放入SUBDIRS;

    2. 进入到qtbase/src目录下, SUBDIRS定义了包含的模块;删除不需要的模块;
       src.pro 定义了subdirs,此处删除编译不过; TEMPLATE = subdirs

       sync.profile定义 
       qtbase.pro   SUBDIRS = qmake/qmake-aux.pro doc
       makefile 为啥还包含test example 

成功命令:
第一步成功命令:
    54.1M
    .\configure -prefix D:\test\qweq\comp -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g  -nomake examples -opensource -confirm-license -no-directfb -no-angle -no-harfbuzz -no-libpng -no-freetype -no-dbus -no-widgets
    mingw32-make -j16
    mingw32-make install
    mingw32-make clean
第二部:尝试删除qttest 关闭network

    .\configure -prefix D:\test\qweq\comp -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g -nomake examples -nomake tests -opensource -confirm-license -no-directfb -no-angle -no-harfbuzz -no-libpng -no-freetype -no-dbus -no-widgets 

    -nomake tests 无效
    testlib ok
    src_openglextensions ok
    angle ok
    zlib ok
    qtConfig(xml): SUBDIRS = src_xml
    network   49.4M

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhghbfbb
系列文章
更多 icon
同类精品
更多 icon
继续加载