自主編譯Qt Creator和Qt Designer源碼

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://download.qt.io/official_releases/qtcreator/4.10/4.10.2/ qt-creator-opensource-src-4.10.2.zip

http://download.qt.io/official_releases/qt/5.12/5.12.5/submodules/ qttools-opensource-src-5.12.5.zip,裏面有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-Debug\src\app\app_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

 

----

我的另一篇博客《使用Qt Creator IDE+MSVC2015 32bit編譯器組合,自行編譯Qt Creator源碼4.8.2版本

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章