Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <QStringList>
#include <QMap>
#include <QtCore/QFile>
#include <QtCore/QDir>
#include <QtCore/QDateTime>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonObject>
#include <QtCore/QJsonDocument>
#include <iostream>
Go to the source code of this file.
Classes | |
class | JsonOutput |
class | NameFilterFileEntryFunction |
Enumerations | |
enum | PlatformFlag { WindowsBased = 0x00001 , IntelBased = 0x00010 , ArmBased = 0x00020 , Msvc = 0x00100 , MinGW = 0x00200 , ClangMsvc = 0x00400 , ClangMinGW = 0x00800 , WindowsDesktopMsvc = WindowsBased + Msvc , WindowsDesktopMsvcIntel = WindowsDesktopMsvc + IntelBased , WindowsDesktopMsvcArm = WindowsDesktopMsvc + ArmBased , WindowsDesktopMinGW = WindowsBased + IntelBased + MinGW , WindowsDesktopClangMsvc = WindowsBased + IntelBased + ClangMsvc , WindowsDesktopClangMinGW = WindowsBased + IntelBased + ClangMinGW , UnknownPlatform } |
enum | ListOption { ListNone = 0 , ListSource , ListTarget , ListRelative , ListMapping } |
enum | DebugMatchMode { MatchDebug , MatchRelease , MatchDebugOrRelease } |
enum | UpdateFileFlag { ForceUpdateFile = 0x1 , SkipUpdateFile = 0x2 , RemoveEmptyQmlDirectories = 0x4 , SkipQmlDesignerSpecificsDirectories = 0x8 } |
Functions | |
bool | platformHasDebugSuffix (Platform p) |
std::wostream & | operator<< (std::wostream &str, const QString &s) |
QString | normalizeFileName (const QString &name) |
QString | sharedLibrarySuffix () |
bool | isBuildDirectory (Platform platform, const QString &dirName) |
bool | createSymbolicLink (const QFileInfo &source, const QString &target, QString *errorMessage) |
bool | createDirectory (const QString &directory, QString *errorMessage, bool dryRun) |
QString | findInPath (const QString &file) |
QMap< QString, QString > | queryQtPaths (const QString &qmakeBinary, QString *errorMessage) |
QStringList | findSharedLibraries (const QDir &directory, Platform platform, DebugMatchMode debugMatchMode, const QString &prefix=QString()) |
bool | updateFile (const QString &sourceFileName, const QStringList &nameFilters, const QString &targetDirectory, unsigned flags, JsonOutput *json, QString *errorMessage) |
bool | runProcess (const QString &binary, const QStringList &args, const QString &workingDirectory=QString(), unsigned long *exitCode=0, QByteArray *stdOut=0, QByteArray *stdErr=0, QString *errorMessage=0) |
bool | readPeExecutable (const QString &peExecutableFileName, QString *errorMessage, QStringList *dependentLibraries=0, unsigned *wordSize=0, bool *isDebug=0, bool isMinGW=false, unsigned short *machineArch=nullptr) |
QStringList | findDependentLibraries (const QString &executableFileName, QString *errorMessage) |
QString | findD3dCompiler (Platform platform, const QString &qtBinDir, unsigned wordSize) |
QStringList | findDxc (Platform platform, const QString &qtBinDir, unsigned wordSize) |
bool | patchQtCore (const QString &path, QString *errorMessage) |
template<class DirectoryFileEntryFunction > | |
bool | updateFile (const QString &sourceFileName, DirectoryFileEntryFunction directoryFileEntryFunction, const QString &targetDirectory, unsigned flags, JsonOutput *json, QString *errorMessage) |
bool | updateFile (const QString &sourceFileName, const QString &targetDirectory, unsigned flags, JsonOutput *json, QString *errorMessage) |
Variables | |
static const char | windowsSharedLibrarySuffix [] = ".dll" |
const char * | qmakeInfixKey |
int | optVerboseLevel |
enum DebugMatchMode |
enum ListOption |
enum PlatformFlag |
enum UpdateFileFlag |
Definition at line 64 of file utils.cpp.
References arg, dir, directory, errorMessage(), QString::fromLatin1(), optVerboseLevel, and QDir::toNativeSeparators().
Referenced by deploy(), deployWebEngineCore(), and main().
bool createSymbolicLink | ( | const QFileInfo & | source, |
const QString & | target, | ||
QString * | errorMessage ) |
Definition at line 45 of file utils.cpp.
References QDir::currentPath(), errorMessage(), QIODevice::errorString(), file, QString::fromLatin1(), QFile::link(), QStringLiteral, QDir::setCurrent(), and QDir::toNativeSeparators().
Referenced by updateFile().
|
inline |
Definition at line 182 of file utils.h.
References errorMessage(), and readPeExecutable().
Referenced by deploy().
QStringList findDxc | ( | Platform | platform, |
const QString & | qtBinDir, | ||
unsigned | wordSize ) |
Definition at line 2749 of file main.cpp.
References QDir::cleanPath(), QFileInfo::exists(), file, fileName, QStandardPaths::findExecutable(), QString::fromLocal8Bit(), QString::fromWCharArray(), QFileInfo::isExecutable(), QFileInfo::isFile(), MAX_PATH, qgetenv(), and QFile::size().
Referenced by deploy(), findMinGWRuntimePaths(), and signAAB().
QStringList findSharedLibraries | ( | const QDir & | directory, |
Platform | platform, | ||
DebugMatchMode | debugMatchMode, | ||
const QString & | prefix = QString() ) |
Definition at line 88 of file utils.cpp.
References directory, errorMessage(), QDir::Files, QString::isEmpty(), MatchDebug, MatchDebugOrRelease, matches(), platform(), platformHasDebugSuffix(), readPeExecutable(), sharedLibrarySuffix(), QDir::toNativeSeparators(), WindowsBased, and WindowsDesktopMinGW.
Referenced by findFFmpegLibs(), findFileRecursion(), findOpenSslLibraries(), findQtPlugins(), DllDirectoryFileEntryFunction::operator()(), and parseArguments().
Definition at line 37 of file utils.cpp.
References ClangMsvc, Msvc, and platform().
Referenced by findQmlDirectory(), and qmlDirectoryRecursion().
Definition at line 136 of file utils.h.
Referenced by findDependentQtLibraries().
|
inline |
Definition at line 58 of file utils.h.
References str, and QString::toStdWString().
Definition at line 950 of file utils.cpp.
References QFileDevice::close(), errorMessage(), QIODevice::errorString(), file, QFileInfo::fileName(), QString::fromLatin1(), QByteArray::indexOf(), QFile::open(), optVerboseLevel, QByteArray(), QIODevice::readAll(), QIODeviceBase::ReadOnly, QByteArray::replace(), QByteArray::size(), QDir::toNativeSeparators(), QIODevice::write(), and QIODeviceBase::WriteOnly.
Referenced by deploy().
|
inline |
Definition at line 45 of file utils.h.
References ClangMsvc, and Msvc.
Referenced by deployPlugin(), deployWebEngineCore(), findPluginNames(), findSharedLibraries(), and libraryPath().
Definition at line 423 of file utils.cpp.
References errorMessage(), QString::fromLocal8Bit(), QString::fromUtf8(), QString::indexOf(), QString::isEmpty(), line, QString::number(), output, pos, qmakeInfixKey, QStringLiteral, QIODeviceBase::ReadOnly, QString::right(), runProcess(), QString::size(), QString::startsWith(), QIODeviceBase::Text, QDir::toNativeSeparators(), and QString::trimmed().
Referenced by main().
bool readPeExecutable | ( | const QString & | peExecutableFileName, |
QString * | errorMessage, | ||
QStringList * | dependentLibraries = 0, | ||
unsigned * | wordSize = 0, | ||
bool * | isDebug = 0, | ||
bool | isMinGW = false, | ||
unsigned short * | machineArch = nullptr ) |
Definition at line 930 of file utils.cpp.
References errorMessage(), and QStringLiteral.
Referenced by findDependentLibraries(), findDependentQtLibraries(), findPluginNames(), and findSharedLibraries().
bool runProcess | ( | const QString & | binary, |
const QStringList & | args, | ||
const QString & | workingDirectory = QString(), | ||
unsigned long * | exitCode = 0, | ||
QByteArray * | stdOut = 0, | ||
QByteArray * | stdErr = 0, | ||
QString * | errorMessage = 0 ) |
Definition at line 311 of file utils.cpp.
References args, encodeFileName(), errorMessage(), QString::fromLocal8Bit(), QStringLiteral, readOutRedirectFile(), QDir::setCurrent(), QList< T >::size(), and tempFilePattern().
Referenced by deployTranslations(), queryQtPaths(), and runQmlImportScanner().
|
inline |
Definition at line 141 of file utils.h.
References windowsSharedLibrarySuffix.
Referenced by determinePluginLibrary(), findMinGWRuntimePaths(), findPluginNames(), findSharedLibraries(), and libraryPath().
|
inline |
Definition at line 359 of file utils.h.
References errorMessage(), and updateFile().
bool updateFile | ( | const QString & | sourceFileName, |
const QStringList & | nameFilters, | ||
const QString & | targetDirectory, | ||
unsigned | flags, | ||
JsonOutput * | json, | ||
QString * | errorMessage ) |
Definition at line 479 of file utils.cpp.
References JsonOutput::addFile(), QFile::copy(), d, dir, QDir::Dirs, errorMessage(), QIODevice::errorString(), file, QDir::Files, ForceUpdateFile, QString::fromLatin1(), QDir::NoDotAndDotDot, optVerboseLevel, QFile::remove(), SkipUpdateFile, QDir::toNativeSeparators(), and updateFile().
Referenced by updateFile(), updateFile(), and updateFile().
bool updateFile | ( | const QString & | sourceFileName, |
DirectoryFileEntryFunction | directoryFileEntryFunction, | ||
const QString & | targetDirectory, | ||
unsigned | flags, | ||
JsonOutput * | json, | ||
QString * | errorMessage ) |
Definition at line 206 of file utils.h.
References JsonOutput::addFile(), QFile::copy(), createSymbolicLink(), d, dir, QDir::Dirs, errorMessage(), QIODevice::errorString(), file, QFileInfo::fileName(), QDir::Files, ForceUpdateFile, QString::fromLatin1(), QDir::NoDotAndDotDot, optVerboseLevel, QFile::permissions(), QDir::relativeFilePath(), QFile::remove(), RemoveEmptyQmlDirectories, JsonOutput::removeTargetDirectory(), QFile::setPermissions(), SkipQmlDesignerSpecificsDirectories, SkipUpdateFile, QDir::toNativeSeparators(), updateFile(), and QFileDevice::WriteUser.
|
extern |
Definition at line 35 of file utils.cpp.
Referenced by createDirectory(), deploy(), deployPlugin(), deployTranslations(), deployWebEngineCore(), findQtPlugins(), main(), parseArguments(), parseEarlyArguments(), patchQtCore(), updateFile(), and updateFile().
|
extern |
Definition at line 421 of file utils.cpp.
Referenced by deploy(), PluginInformation::generateAvailablePlugins(), and queryQtPaths().
|
static |
Definition at line 139 of file utils.h.
Referenced by deploy(), and sharedLibrarySuffix().