![]() |
Qt 6.x
The Qt SDK
|
#include "utils.h"
#include "qmlutils.h"
#include "qtmoduleinfo.h"
#include <QtCore/QCommandLineOption>
#include <QtCore/QCommandLineParser>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QCoreApplication>
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QtCore/QJsonArray>
#include <QtCore/QList>
#include <QtCore/QOperatingSystemVersion>
#include <QtCore/QSharedPointer>
#include <QtCore/private/qconfig_p.h>
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <unordered_map>
Go to the source code of this file.
Classes | |
struct | Options |
class | DllDirectoryFileEntryFunction |
class | QmlDirectoryFileEntryFunction |
struct | DeployResult |
Macros | |
#define | IMAGE_FILE_MACHINE_ARM64 0xaa64 |
#define | DECLARE_KNOWN_MODULE(name) static size_t Qt##name ## ModuleId = QtModule::InvalidId |
#define | DEFINE_KNOWN_MODULE(name) m[QLatin1String("Qt6" #name)] = &Qt##name ## ModuleId |
Enumerations | |
enum | ExlusiveOptionValue { OptionAuto , OptionEnabled , OptionDisabled } |
enum | CommandLineParseFlag { CommandLineParseError = 0x1 , CommandLineParseHelpRequested = 0x2 } |
Variables | |
static QtModuleInfoStore | qtModuleEntries |
static const char | webEngineProcessC [] = "QtWebEngineProcess" |
#define DECLARE_KNOWN_MODULE | ( | name | ) | static size_t Qt##name ## ModuleId = QtModule::InvalidId |
#define DEFINE_KNOWN_MODULE | ( | name | ) | m[QLatin1String("Qt6" #name)] = &Qt##name ## ModuleId |
enum CommandLineParseFlag |
enum ExlusiveOptionValue |
|
static |
Definition at line 57 of file main.cpp.
References DEFINE_KNOWN_MODULE, QSet< T >::end(), QSet< T >::find(), i, it, QtModuleInfoStore::moduleById(), QtModule::name, qtModuleEntries, and QtModuleInfoStore::size().
Referenced by main().
|
static |
Definition at line 1121 of file main.cpp.
References QFileInfo::absoluteFilePath(), QDir::Dirs, fi, findMinGWRuntimePaths(), QString::isEmpty(), QFileInfo::isFile(), platform(), QStringLiteral, QFileInfo::setFile(), QDir::toNativeSeparators(), QString::toStdWString(), vcDebugRedistDir(), vcRedistDir(), WindowsDesktopClangMinGW, WindowsDesktopMinGW, and WindowsDesktopMsvc.
Referenced by deploy().
|
static |
Definition at line 218 of file main.cpp.
Referenced by parseArguments(), and parseEarlyArguments().
|
static |
Definition at line 227 of file main.cpp.
Referenced by parseArguments(), and parseEarlyArguments().
|
static |
Definition at line 236 of file main.cpp.
Referenced by parseArguments(), and parseEarlyArguments().
DECLARE_KNOWN_MODULE | ( | 3DQuick | ) |
DECLARE_KNOWN_MODULE | ( | Core | ) |
DECLARE_KNOWN_MODULE | ( | Designer | ) |
DECLARE_KNOWN_MODULE | ( | DesignerComponents | ) |
DECLARE_KNOWN_MODULE | ( | Gui | ) |
DECLARE_KNOWN_MODULE | ( | Qml | ) |
DECLARE_KNOWN_MODULE | ( | QmlTooling | ) |
DECLARE_KNOWN_MODULE | ( | Quick | ) |
DECLARE_KNOWN_MODULE | ( | WebEngineCore | ) |
DECLARE_KNOWN_MODULE | ( | Widgets | ) |
|
static |
Definition at line 1223 of file main.cpp.
References QFileInfo::absoluteFilePath(), Options::additionalLibraries, QmlImportScanResult::append(), Options::binaries, Qt::CaseInsensitive, ClangMsvc, QString::clear(), Options::compilerRunTime, compilerRunTimeLibs(), QByteArray::constData(), createDirectory(), Options::debugDetection, Options::DebugDetectionAuto, Options::DebugDetectionForceDebug, Options::DebugDetectionForceRelease, Options::deployPdb, QmlDirectoryFileEntryFunction::DeployPdb, deployTranslations(), dir, Options::directory, disabled, Options::disabledLibraries, Options::disabledPluginTypes, Options::dryRun, errorMessage(), QFileInfo::fileName(), findD3dCompiler(), findDependentLibraries(), findDependentQtLibraries(), findDxc(), findInPath(), findQmlDirectory(), findQtPlugins(), formatQtModules(), getIcuVersion(), i, IMAGE_FILE_MACHINE_ARM64, QString::isEmpty(), QFileInfo::isFile(), Options::json, Options::libraries, Options::libraryDirectory, libraryPath(), MatchDebug, MatchDebugOrRelease, MatchRelease, QmlImportScanResult::modules, Msvc, QmlImportScanResult::ok, optVerboseLevel, Options::patchQt, patchQtCore(), Options::platform, Options::pluginDirectory, Options::plugins, QmlImportScanResult::plugins, Q_UNUSED, qmakeInfixKey, Options::qmlDirectories, Options::qmlDirectory, Options::qmlImportPaths, QStringLiteral, qtModule(), qtModuleEntries, qtVersion(), Options::quickImports, runQmlImportScanner(), SkipQmlDesignerSpecificsDirectories, SkipUpdateFile, Options::softwareRasterizer, Options::systemD3dCompiler, Options::systemDxc, QDir::toNativeSeparators(), Options::translations, Options::translationsDirectory, Unix, updateFile(), Options::updateFileFlags, updateLibrary(), QMap< Key, T >::value(), WindowsBased, and windowsSharedLibrarySuffix.
Referenced by deployWebProcess(), and main().
|
static |
Definition at line 838 of file main.cpp.
References QDir::absoluteFilePath(), QByteArray::constData(), d, QDir::dirName(), errorMessage(), findDependentQtLibraries(), formatQtModules(), optVerboseLevel, platform(), qtModule(), and QDir::toNativeSeparators().
Referenced by findQtPlugins().
|
static |
Definition at line 970 of file main.cpp.
References QFileInfo::absoluteFilePath(), JsonOutput::addFile(), QList< T >::append(), arguments, QList< T >::clear(), QDir::entryInfoList(), errorMessage(), Options::json, Options::languages, QString::mid(), optVerboseLevel, QStringLiteral, runProcess(), SkipUpdateFile, QDir::toNativeSeparators(), translationNameFilters(), and Options::updateFileFlags.
Referenced by deploy().
|
static |
Definition at line 1577 of file main.cpp.
References QFileInfo::absoluteFilePath(), QByteArray::append(), QByteArray::constData(), createDirectory(), deployWebProcess(), Options::directory, Options::dryRun, errorMessage(), QFileInfo::exists(), QFileInfo::fileName(), QFileInfo::filePath(), QFileInfo::isDir(), Options::json, optVerboseLevel, Options::platform, platformHasDebugSuffix(), QStringLiteral, QDir::toNativeSeparators(), Options::translations, Options::translationsDirectory, updateFile(), Options::updateFileFlags, QMap< Key, T >::value(), and webEngineProcessC.
Referenced by main().
|
static |
Definition at line 1561 of file main.cpp.
References Options::binaries, deploy(), Options::directory, errorMessage(), Options::json, Options::platform, QStringLiteral, Options::quickImports, Options::translations, updateFile(), Options::updateFileFlags, QMap< Key, T >::value(), and webProcessBinary().
Referenced by deployWebEngineCore().
Definition at line 193 of file main.cpp.
References Qt::CaseInsensitive, QDir::cleanPath(), directory, QDir::entryInfoList(), QDir::Executable, QDir::Files, platform(), QStringLiteral, webEngineProcessC, and WindowsBased.
Referenced by parseArguments().
|
static |
Definition at line 698 of file main.cpp.
References QString::at(), errorMessage(), fileName, findDependentQtLibraries(), i, isQtModule(), normalizeFileName(), platform(), QString::prepend(), readExecutable(), QString::size(), and QDir::toNativeSeparators().
Referenced by deploy(), deployPlugin(), and findDependentQtLibraries().
|
static |
Definition at line 1093 of file main.cpp.
References QFileInfo::absolutePath(), QList< T >::append(), QDir::entryInfoList(), QDir::Files, filters, findInPath(), QString::isEmpty(), QList< T >::isEmpty(), platform(), sharedLibrarySuffix(), and WindowsDesktopClangMinGW.
Referenced by compilerRunTimeLibs().
QStringList findQtPlugins | ( | ModuleBitset * | usedQtModules, |
const ModuleBitset & | disabledQtModules, | ||
const QStringList & | disabledPluginTypes, | ||
const QString & | qtPluginsDirName, | ||
const QString & | libraryLocation, | ||
const QString & | infix, | ||
DebugMatchMode | debugMatchModeIn, | ||
Platform | platform, | ||
QString * | platformPlugin | ||
) |
Definition at line 895 of file main.cpp.
References QDir::absoluteFilePath(), QString::append(), deployPlugin(), QDir::Dirs, QDir::entryInfoList(), findSharedLibraries(), QtModule::InvalidId, QString::isEmpty(), MatchDebugOrRelease, QtModuleInfoStore::moduleIdForPluginType(), QDir::NoDotAndDotDot, optVerboseLevel, platform(), QStringLiteral, qtModuleEntries, Unix, UnknownPlatform, WindowsDesktopMinGW, and WindowsDesktopMsvc.
Referenced by deploy().
|
static |
Definition at line 100 of file main.cpp.
References moduleNameToOptionName(), qtModule(), qtModuleEntries, and QString::toUtf8().
Referenced by deploy(), deployPlugin(), and helpText().
Definition at line 1215 of file main.cpp.
References QString::cbegin(), and QString::cend().
Referenced by deploy().
|
inlinestatic |
Definition at line 664 of file main.cpp.
References formatQtModules(), QString::fromLatin1(), lineBreak(), QtModuleInfoStore::moduleById(), moduleNameToOptionName(), QtModule::name, qtModuleEntries, QString::replace(), and QtModuleInfoStore::size().
Referenced by main().
|
inlinestatic |
Definition at line 688 of file main.cpp.
References QString::at(), Qt::CaseInsensitive, QChar::isDigit(), QString::size(), QString::startsWith(), and QChar::toLatin1().
Referenced by findDependentQtLibraries().
|
static |
Definition at line 1038 of file main.cpp.
References debug, platform(), platformHasDebugSuffix(), QStringLiteral, sharedLibrarySuffix(), UnixBased, and WindowsBased.
Referenced by deploy().
Definition at line 652 of file main.cpp.
References i, and QString::lastIndexOf().
Referenced by QUnicodeTools::getLineBreaks(), helpText(), and QTextBoundaryFinder::toPreviousBoundary().
QT_END_NAMESPACE QT_USE_NAMESPACE int main | ( | int | argc, |
char ** | argv | ||
) |
[0]
[0]
[0]
[6]
[0]
[0]
[1]
[1]
[2]
[2]
[3]
[3]
[0]
[0]
[1]
[1]
[0]
[0]
[0]
[0]
Definition at line 1636 of file main.cpp.
References QCoreApplication::applicationDirPath(), QCoreApplication::arguments(), assignKnownModuleIds(), CommandLineParseError, CommandLineParseHelpRequested, QByteArray::constData(), QMap< Key, T >::contains(), createDirectory(), deploy(), deployWebEngineCore(), Options::directory, Options::dryRun, QFile::encodeName(), errorMessage(), helpText(), QString::isEmpty(), QMap< Key, T >::isEmpty(), Options::json, Options::libraryDirectory, Options::list, QDir::listSeparator(), optVerboseLevel, parseArguments(), parseEarlyArguments(), Options::platform, platformFromMkSpec(), QtModuleInfoStore::populate(), qgetenv(), qPrintable, qputenv(), QStringLiteral, qtModuleEntries, Options::qtpathsBinary, queryQtPaths(), QCoreApplication::setApplicationVersion(), JsonOutput::toJson(), JsonOutput::toList(), QDir::toNativeSeparators(), UnknownPlatform, and QMap< Key, T >::value().
Definition at line 90 of file main.cpp.
References QString::mid(), QString::prepend(), and QString::toLower().
Referenced by formatQtModules(), helpText(), and parseArguments().
Definition at line 208 of file main.cpp.
References file, and QDir::toNativeSeparators().
Referenced by parseArguments(), and parseEarlyArguments().
|
inlinestatic |
Definition at line 304 of file main.cpp.
References QFileInfo::absoluteFilePath(), QFileInfo::absolutePath(), QCommandLineParser::addHelpOption(), Options::additionalLibraries, QCommandLineParser::addOption(), QCommandLineParser::addPositionalArgument(), QCommandLineParser::addVersionOption(), arguments, Options::binaries, QDir::cleanPath(), CommandLineParseError, CommandLineParseHelpRequested, Options::compilerRunTime, createQMakeOption(), createQtPathsOption(), createVerboseOption(), Options::debugDetection, Options::DebugDetectionForceDebug, Options::DebugDetectionForceRelease, Options::deployPdb, Options::directory, Options::disabledLibraries, Options::disabledPluginTypes, Options::dryRun, errorMessage(), QCommandLineParser::errorText(), QFileInfo::exists(), fi, file, findBinary(), findSharedLibraries(), ForceUpdateFile, QCommandLineOption::HiddenFromHelp, i, Options::ignoreLibraryErrors, QFileInfo::isDir(), QString::isEmpty(), QFileInfo::isFile(), QCommandLineParser::isSet(), Options::json, Options::languages, Options::libraries, Options::libraryDirectory, Options::list, ListMapping, ListRelative, ListSource, ListTarget, MatchDebugOrRelease, MinGW, moduleNameToOptionName(), msgFileDoesNotExist(), QCommandLineOption::names(), OptionAuto, OptionDisabled, OptionEnabled, optVerboseLevel, QCommandLineParser::parse(), QCommandLineParser::ParseAsLongOptions, parseExclusiveOptions(), Options::patchQt, Options::platform, Options::pluginDirectory, Options::plugins, QCommandLineParser::positionalArguments(), Options::qmlDirectories, Options::qmlDirectory, Options::qmlImportPaths, QStringLiteral, qtModuleEntries, Options::quickImports, QCommandLineParser::setApplicationDescription(), QCommandLineOption::setFlags(), QCommandLineParser::setSingleDashWordOptionMode(), QtModuleInfoStore::size(), SkipUpdateFile, Options::softwareRasterizer, QString::split(), Options::systemD3dCompiler, Options::systemDxc, Options::translations, Options::translationsDirectory, Options::updateFileFlags, QCommandLineParser::value(), QCommandLineParser::values(), WindowsBased, WindowsDesktopMinGW, and WindowsDesktopMsvc.
Referenced by main().
|
static |
Definition at line 245 of file main.cpp.
References QCommandLineParser::addOption(), arguments, QDir::cleanPath(), CommandLineParseError, createQMakeOption(), createQtPathsOption(), createVerboseOption(), errorMessage(), QFileInfo::exists(), fi, QFileInfo::isExecutable(), QCommandLineParser::isSet(), msgFileDoesNotExist(), ok, optVerboseLevel, QCommandLineParser::parse(), QCommandLineParser::ParseAsLongOptions, QStringLiteral, Options::qtpathsBinary, QCommandLineParser::setSingleDashWordOptionMode(), QDir::toNativeSeparators(), and QCommandLineParser::value().
Referenced by main().
|
static |
Definition at line 136 of file main.cpp.
References disabled, QCommandLineParser::isSet(), QCommandLineOption::names(), OptionAuto, OptionDisabled, and OptionEnabled.
Referenced by parseArguments().
Definition at line 750 of file main.cpp.
References QString::lastIndexOf(), QString::replace(), and QString::size().
Referenced by QmlDirectoryFileEntryFunction::operator()(), and updateLibrary().
Definition at line 115 of file main.cpp.
References QString::contains(), QString::startsWith(), Unix, UnknownPlatform, WindowsDesktopClangMinGW, WindowsDesktopClangMsvc, WindowsDesktopMinGW, and WindowsDesktopMsvc.
Referenced by main().
|
inlinestatic |
Definition at line 758 of file main.cpp.
References QStringLiteral.
Definition at line 812 of file main.cpp.
References QString::indexOf(), QString::isEmpty(), QString::lastIndexOf(), qPrintable, qtModule(), qtModuleEntries, QString::remove(), QString::size(), QString::startsWith(), and QString::truncate().
Referenced by deploy(), deployPlugin(), formatQtModules(), qtModule(), and translationNameFilters().
Definition at line 1182 of file main.cpp.
References dot(), QStringLiteral, QString::section(), QString::toInt(), and QMap< Key, T >::value().
Referenced by deploy(), and QShaderPrivate::qtQsbVersion().
|
static |
Definition at line 957 of file main.cpp.
References QString::push_back(), qtModule(), and qtModuleEntries.
Referenced by deployTranslations().
|
static |
Definition at line 1193 of file main.cpp.
References QFileInfo::absoluteFilePath(), QString::clear(), Options::deployPdb, errorMessage(), Options::ignoreLibraryErrors, QFileInfo::isFile(), Options::json, pdbFileName(), updateFile(), and Options::updateFileFlags.
Referenced by deploy().
|
static |
Definition at line 1056 of file main.cpp.
References QStringLiteral.
Referenced by compilerRunTimeLibs(), and vcRedistDir().
|
static |
Definition at line 1058 of file main.cpp.
References QString::append(), QDir::cleanPath(), QFile::decodeName(), QDir::Dirs, QString::endsWith(), QDir::entryInfoList(), QFileInfo::isDir(), QString::isEmpty(), QDir::Name, QDir::NoDotAndDotDot, qgetenv(), QStringLiteral, QDir::Reversed, QDir::toNativeSeparators(), QString::toStdWString(), and vcDebugRedistDir().
Referenced by compilerRunTimeLibs().
Definition at line 84 of file main.cpp.
References QStringLiteral, and WindowsBased.
Referenced by deployWebProcess().
|
static |
Definition at line 38 of file main.cpp.
Referenced by assignKnownModuleIds(), deploy(), findQtPlugins(), formatQtModules(), helpText(), main(), parseArguments(), qtModule(), and translationNameFilters().
|
static |
Definition at line 82 of file main.cpp.
Referenced by deployWebEngineCore(), and findBinary().