自主编译Qt Creator和Qt Designer源码

自主编译Qt Creator和Qt Designer源码

来源 https://blog.csdn.net/libaineu2004/article/details/104728857/

Qt Creator和Qt Designer都是很好的学习项目。

一、官方源码下载

1、官方github源码

https://github.com/qt-creator/qt-creator Qt Creator源码

https://github.com/qt-creator/qt-creator/tree/master/src/plugins/designer Qt Creator的设计师插件

https://github.com/qt/qtbase Qt核心类源码

https://github.com/qt/qttools Qt工具类源码

https://github.com/qt/qttools/tree/dev/src/designer Qt设计师的源码

https://github.com/qt/qttools/tree/dev/src/windeployqt 依赖库工具源码

2、官方正式发行网站

http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/qt-opensource-windows-x86-5.12.3.exe
http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/qt-opensource-mac-x64-5.12.3.dmg
http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/qt-opensource-linux-x64-5.12.3.run

http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.zip
http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz

http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/submodules/qttools-everywhere-src-5.12.3.zip // 里面有Qt设计师的源码
http://iso.mirrors.ustc.edu.cn/qtproject/archive/qt/5.12/5.12.3/submodules/qttools-everywhere-src-5.12.3.tar.xz // 里面有Qt设计师的源码

二、笔者电脑的环境

1、Windows

Win7+Qt 5.12.5+Qt Creator 4.10+MSVC 2017 32bit+Python 3.7+ActivePerl-5.28 x64

2、MacOS-10.15-Catalina

MacOS 10.15.3+Qt 5.12.5+Qt Creator 4.10+Clang 11.0 x64+Python 3.7

Mac终端命令sw_vers可以查看Mac OS版本

Mac终端命令clang --version可以查看clang版本

三、编译

Qt Creator IDE分别打开源码文件夹的qtcreator.pro和qttools.pro文件,直接编译即可。

qt-creator-opensource-src-4.10.2

qttools-opensource-src-5.12.5

x、附录

build-qtcreator-Desktop_Qt_5_12_5_MSVC2017_32bit-Debugsrcappapp_version.h

#pragma once

namespace Core {
namespace Constants {

#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)

const char IDE_DISPLAY_NAME[] = "Qt Creator";
const char IDE_ID[] = "qtcreator";
const char IDE_CASED_ID[] = "QtCreator";

#define IDE_VERSION 4.10.2
#define IDE_VERSION_STR STRINGIFY(IDE_VERSION)
#define IDE_VERSION_DISPLAY_DEF 4.10.2

#define IDE_VERSION_MAJOR 4
#define IDE_VERSION_MINOR 10
#define IDE_VERSION_RELEASE 2

const char * const IDE_VERSION_LONG = IDE_VERSION_STR;
const char * const IDE_VERSION_DISPLAY = STRINGIFY(IDE_VERSION_DISPLAY_DEF);
const char * const IDE_AUTHOR = "The Qt Company Ltd";
const char * const IDE_YEAR = "2019";

#ifdef IDE_REVISION
const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION);
#else
const char * const IDE_REVISION_STR = "";
#endif

// changes the path where the settings are saved to
#ifdef IDE_SETTINGSVARIANT
const char * const IDE_SETTINGSVARIANT_STR = STRINGIFY(IDE_SETTINGSVARIANT);
#else
const char * const IDE_SETTINGSVARIANT_STR = "QtProject";
#endif

#ifdef IDE_COPY_SETTINGS_FROM_VARIANT
const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = STRINGIFY(IDE_COPY_SETTINGS_FROM_VARIANT);
#else
const char * const IDE_COPY_SETTINGS_FROM_VARIANT_STR = "";
#endif

#undef IDE_VERSION_DISPLAY_DEF
#undef IDE_VERSION
#undef IDE_VERSION_STR
#undef STRINGIFY
#undef STRINGIFY_INTERNAL

} // Constants
} // Core

================= End

 
原文地址:https://www.cnblogs.com/lsgxeva/p/12503328.html