Remove some dead code from the configures
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: If725ae0abee4d636ac8775c53e34ab138d360905 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
0b93d1a10a
commit
81f54e5dd8
12
configure
vendored
12
configure
vendored
@ -394,10 +394,8 @@ BUILD_ON_MAC=no
|
||||
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
|
||||
BUILD_ON_MAC=yes
|
||||
fi
|
||||
HOST_DIRLIST_SEP=":"
|
||||
DEV_NULL=/dev/null
|
||||
if [ "$OSTYPE" = "msys" ]; then
|
||||
HOST_DIRLIST_SEP=";"
|
||||
DEV_NULL=/tmp/empty-file
|
||||
echo "" > $DEV_NULL
|
||||
relpath=`(cd "$relpath"; pwd -W)`
|
||||
@ -1910,7 +1908,6 @@ config.input.extra_features = $CFG_FEATURES
|
||||
config.input.qt_edition = $Edition
|
||||
config.input.qt_licheck = $Licheck
|
||||
config.input.qt_release_date = $ReleaseDate
|
||||
config.input.sysroot = $CFG_SYSROOT
|
||||
EOF
|
||||
|
||||
# create a clean qmodule/qconfig.pri for running the tests
|
||||
@ -1965,10 +1962,6 @@ if [ "$OPT_VERBOSE" = "yes" ]; then
|
||||
echo
|
||||
fi
|
||||
|
||||
sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
|
||||
PROCS=1
|
||||
EXEC=""
|
||||
|
||||
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -2010,11 +2003,6 @@ fi'`
|
||||
chmod +x "$outpath/config.status"
|
||||
fi
|
||||
|
||||
if [ -n "$RPATH_MESSAGE" ]; then
|
||||
echo
|
||||
echo "$RPATH_MESSAGE"
|
||||
fi
|
||||
|
||||
if [ -n "$PREFIX_COMPLAINTS" ]; then
|
||||
echo
|
||||
echo "$PREFIX_COMPLAINTS"
|
||||
|
@ -92,11 +92,6 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
|
||||
outputWidth = 79;
|
||||
int i;
|
||||
|
||||
/*
|
||||
** Set up the initial state, the default
|
||||
*/
|
||||
dictionary[ "CONFIGCMD" ] = argv[ 0 ];
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
configCmdLine += argv[ i ];
|
||||
|
||||
@ -138,7 +133,6 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
|
||||
}
|
||||
|
||||
dictionary[ "BUILD_QMAKE" ] = "yes";
|
||||
dictionary[ "QMAKE_INTERNAL" ] = "no";
|
||||
dictionary[ "WIDGETS" ] = "yes";
|
||||
dictionary[ "GUI" ] = "yes";
|
||||
dictionary[ "RTTI" ] = "yes";
|
||||
@ -155,7 +149,6 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
|
||||
dictionary[ "AVX512" ] = "auto";
|
||||
dictionary[ "SYNCQT" ] = "auto";
|
||||
dictionary[ "WMF_BACKEND" ] = "no";
|
||||
dictionary[ "WMSDK" ] = "auto";
|
||||
dictionary[ "QML_DEBUG" ] = "yes";
|
||||
dictionary[ "PLUGIN_MANIFESTS" ] = "no";
|
||||
dictionary[ "DIRECTWRITE" ] = "auto";
|
||||
@ -330,23 +323,6 @@ QString Configure::formatPaths(const QStringList &paths)
|
||||
return ret;
|
||||
}
|
||||
|
||||
// We could use QDir::homePath() + "/.qt-license", but
|
||||
// that will only look in the first of $HOME,$USERPROFILE
|
||||
// or $HOMEDRIVE$HOMEPATH. So, here we try'em all to be
|
||||
// more forgiving for the end user..
|
||||
QString Configure::firstLicensePath()
|
||||
{
|
||||
QStringList allPaths;
|
||||
allPaths << "./.qt-license"
|
||||
<< QString::fromLocal8Bit(getenv("HOME")) + "/.qt-license"
|
||||
<< QString::fromLocal8Bit(getenv("USERPROFILE")) + "/.qt-license"
|
||||
<< QString::fromLocal8Bit(getenv("HOMEDRIVE")) + QString::fromLocal8Bit(getenv("HOMEPATH")) + "/.qt-license";
|
||||
for (int i = 0; i< allPaths.count(); ++i)
|
||||
if (QFile::exists(allPaths.at(i)))
|
||||
return allPaths.at(i);
|
||||
return QString();
|
||||
}
|
||||
|
||||
// #### somehow I get a compiler error about vc++ reaching the nesting limit without
|
||||
// undefining the ansi for scoping.
|
||||
#ifdef for
|
||||
@ -855,9 +831,6 @@ void Configure::parseCmdLine()
|
||||
if (!continueElse[0]) {
|
||||
}
|
||||
|
||||
else if (configCmdLine.at(i) == "-internal")
|
||||
dictionary[ "QMAKE_INTERNAL" ] = "yes";
|
||||
|
||||
else if (configCmdLine.at(i) == "-no-syncqt")
|
||||
dictionary[ "SYNCQT" ] = "no";
|
||||
|
||||
@ -1360,10 +1333,6 @@ void Configure::parseCmdLine()
|
||||
saveCmdLine();
|
||||
}
|
||||
|
||||
void Configure::validateArgs()
|
||||
{
|
||||
}
|
||||
|
||||
// Output helper functions --------------------------------[ Start ]-
|
||||
/*!
|
||||
Determines the length of a string token.
|
||||
@ -1493,9 +1462,6 @@ void Configure::applySpecSpecifics()
|
||||
//TODO
|
||||
dictionary[ "STYLE_WINDOWSXP" ] = "no";
|
||||
dictionary[ "STYLE_WINDOWSVISTA" ] = "no";
|
||||
dictionary[ "KBD_DRIVERS" ] = "tty";
|
||||
dictionary[ "GFX_DRIVERS" ] = "linuxfb";
|
||||
dictionary[ "MOUSE_DRIVERS" ] = "pc linuxtp";
|
||||
dictionary[ "OPENGL" ] = "no";
|
||||
dictionary[ "DBUS"] = "no";
|
||||
dictionary[ "QT_INOTIFY" ] = "no";
|
||||
@ -1507,7 +1473,6 @@ void Configure::applySpecSpecifics()
|
||||
dictionary[ "FONT_CONFIG" ] = "auto";
|
||||
dictionary[ "ANGLE" ] = "no";
|
||||
|
||||
dictionary["DECORATIONS"] = "default windows styled";
|
||||
} else if (platform() == QNX) {
|
||||
dictionary[ "REDUCE_EXPORTS" ] = "yes";
|
||||
dictionary["STACK_PROTECTOR_STRONG"] = "auto";
|
||||
@ -2077,8 +2042,6 @@ bool Configure::checkAvailability(const QString &part)
|
||||
else if (part == "INCREDIBUILD_XGE") {
|
||||
available = !QStandardPaths::findExecutable(QStringLiteral("BuildConsole.exe")).isEmpty()
|
||||
&& !QStandardPaths::findExecutable(QStringLiteral("xgConsole.exe")).isEmpty();
|
||||
} else if (part == "WMSDK") {
|
||||
available = findFile("wmsdk.h");
|
||||
} else if (part == "WMF_BACKEND") {
|
||||
available = findFile("mfapi.h") && findFile("mf.lib");
|
||||
} else if (part == "DIRECTWRITE") {
|
||||
@ -2255,8 +2218,6 @@ void Configure::autoDetection()
|
||||
dictionary["QML_DEBUG"] = dictionary["QML"] == "yes" ? "yes" : "no";
|
||||
if (dictionary["WMF_BACKEND"] == "auto")
|
||||
dictionary["WMF_BACKEND"] = checkAvailability("WMF_BACKEND") ? "yes" : "no";
|
||||
if (dictionary["WMSDK"] == "auto")
|
||||
dictionary["WMSDK"] = checkAvailability("WMSDK") ? "yes" : "no";
|
||||
|
||||
// Detection of IncrediBuild buildconsole
|
||||
if (dictionary["INCREDIBUILD_XGE"] == "auto")
|
||||
@ -2382,14 +2343,6 @@ bool Configure::verifyConfiguration()
|
||||
<< "Oracle driver, as the current build will most likely fail." << endl;
|
||||
prompt = true;
|
||||
}
|
||||
if (0 != dictionary["ARM_FPU_TYPE"].size()) {
|
||||
QStringList l= QStringList()
|
||||
<< "softvfp"
|
||||
<< "softvfp+vfpv2"
|
||||
<< "vfpv2";
|
||||
if (!(l.contains(dictionary["ARM_FPU_TYPE"])))
|
||||
cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl;
|
||||
}
|
||||
if (dictionary["DIRECTWRITE"] == "yes" && !checkAvailability("DIRECTWRITE")) {
|
||||
cout << "WARNING: To be able to compile the DirectWrite font engine you will" << endl
|
||||
<< "need the Microsoft DirectWrite and Microsoft Direct2D development" << endl
|
||||
@ -2821,8 +2774,6 @@ void Configure::generateOutputVars()
|
||||
qmakeVars += QString("sql-drivers += ") + qmakeSql.join(' ');
|
||||
if (!qmakeStyles.isEmpty())
|
||||
qmakeVars += QString("styles += ") + qmakeStyles.join(' ');
|
||||
if (!qmakeStylePlugins.isEmpty())
|
||||
qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(' ');
|
||||
|
||||
if (!dictionary[ "QMAKESPEC" ].length()) {
|
||||
cout << "Configure could not detect your compiler. QMAKESPEC must either" << endl
|
||||
@ -2866,16 +2817,6 @@ void Configure::generateCachefile()
|
||||
if (dictionary["QT_XKBCOMMON"] == "no")
|
||||
moduleStream << "DEFINES += QT_NO_XKBCOMMON" << endl;
|
||||
|
||||
// embedded
|
||||
if (!dictionary["KBD_DRIVERS"].isEmpty())
|
||||
moduleStream << "kbd-drivers += "<< dictionary["KBD_DRIVERS"]<<endl;
|
||||
if (!dictionary["GFX_DRIVERS"].isEmpty())
|
||||
moduleStream << "gfx-drivers += "<< dictionary["GFX_DRIVERS"]<<endl;
|
||||
if (!dictionary["MOUSE_DRIVERS"].isEmpty())
|
||||
moduleStream << "mouse-drivers += "<< dictionary["MOUSE_DRIVERS"]<<endl;
|
||||
if (!dictionary["DECORATIONS"].isEmpty())
|
||||
moduleStream << "decorations += "<<dictionary["DECORATIONS"]<<endl;
|
||||
|
||||
moduleStream << "CONFIG += " << qmakeConfig.join(' ');
|
||||
if (dictionary[ "SSE2" ] == "yes")
|
||||
moduleStream << " sse2";
|
||||
@ -3247,9 +3188,6 @@ void Configure::generateQConfigPri()
|
||||
<< "}" << endl;
|
||||
}
|
||||
|
||||
if (!dictionary["QMAKE_RPATHDIR"].isEmpty())
|
||||
configStream << "QMAKE_RPATHDIR += " << formatPath(dictionary["QMAKE_RPATHDIR"]) << endl;
|
||||
|
||||
if (!dictionary["QT_LIBINFIX"].isEmpty())
|
||||
configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl;
|
||||
|
||||
@ -3265,11 +3203,6 @@ void Configure::generateQConfigPri()
|
||||
<< "QT_GCC_PATCH_VERSION = " << dictionary["QT_GCC_PATCH_VERSION"] << endl;
|
||||
}
|
||||
|
||||
if (dictionary.value("XQMAKESPEC").startsWith("wince")) {
|
||||
configStream << "#Qt for Windows CE c-runtime deployment" << endl
|
||||
<< "QT_CE_C_RUNTIME = " << formatPath(dictionary["CE_CRT"]) << endl;
|
||||
}
|
||||
|
||||
if (!configStream.flush())
|
||||
dictionary[ "DONE" ] = "error";
|
||||
}
|
||||
@ -3331,7 +3264,6 @@ void Configure::generateConfigfiles()
|
||||
tmpStream << "#define QT_PRODUCT_LICENSE \"" << dictionary[ "EDITION" ] << "\"" << endl;
|
||||
tmpStream << endl;
|
||||
if (dictionary["BUILDDEV"] == "yes") {
|
||||
dictionary["QMAKE_INTERNAL"] = "yes";
|
||||
tmpStream << "/* Used for example to export symbols for the certain autotests*/" << endl;
|
||||
tmpStream << "#define QT_BUILD_INTERNAL" << endl;
|
||||
tmpStream << endl;
|
||||
@ -3619,9 +3551,6 @@ void Configure::displayConfig()
|
||||
sout << (*libs) << " ";
|
||||
sout << endl;
|
||||
}
|
||||
if (dictionary[ "QMAKE_INTERNAL" ] == "yes") {
|
||||
sout << "Using internal configuration." << endl;
|
||||
}
|
||||
if (dictionary[ "SHARED" ] == "no") {
|
||||
sout << "WARNING: Using static linking will disable the use of plugins." << endl;
|
||||
sout << " Make sure you compile ALL needed modules into the library." << endl;
|
||||
@ -4073,36 +4002,6 @@ void Configure::showSummary()
|
||||
cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
|
||||
}
|
||||
|
||||
Configure::ProjectType Configure::projectType(const QString& proFileName)
|
||||
{
|
||||
QFile proFile(proFileName);
|
||||
if (proFile.open(QFile::ReadOnly)) {
|
||||
QString buffer = proFile.readLine(1024);
|
||||
while (!buffer.isEmpty()) {
|
||||
QStringList segments = buffer.split(QRegExp("\\s"));
|
||||
QStringList::Iterator it = segments.begin();
|
||||
|
||||
if (segments.size() >= 3) {
|
||||
QString keyword = (*it++);
|
||||
QString operation = (*it++);
|
||||
QString value = (*it++);
|
||||
|
||||
if (keyword == "TEMPLATE") {
|
||||
if (value == "lib")
|
||||
return Lib;
|
||||
else if (value == "subdirs")
|
||||
return Subdirs;
|
||||
}
|
||||
}
|
||||
// read next line
|
||||
buffer = proFile.readLine(1024);
|
||||
}
|
||||
proFile.close();
|
||||
}
|
||||
// Default to app handling
|
||||
return App;
|
||||
}
|
||||
|
||||
bool Configure::showLicense(QString orgLicenseFile)
|
||||
{
|
||||
if (dictionary["LICENSE_CONFIRMED"] == "yes") {
|
||||
@ -4313,7 +4212,6 @@ QString Configure::qpaPlatformName() const
|
||||
|
||||
int Configure::platform() const
|
||||
{
|
||||
const QString qMakeSpec = dictionary.value("QMAKESPEC");
|
||||
const QString xQMakeSpec = dictionary.value("XQMAKESPEC");
|
||||
|
||||
if ((xQMakeSpec.startsWith("winphone") || xQMakeSpec.startsWith("winrt")))
|
||||
|
@ -43,7 +43,6 @@ public:
|
||||
~Configure();
|
||||
|
||||
void parseCmdLine();
|
||||
void validateArgs();
|
||||
bool displayHelp();
|
||||
|
||||
QString defaultTo(const QString &option);
|
||||
@ -64,20 +63,12 @@ public:
|
||||
void generateQDevicePri();
|
||||
void prepareConfigTests();
|
||||
void showSummary();
|
||||
QString firstLicensePath();
|
||||
|
||||
bool showLicense(QString licenseFile);
|
||||
void readLicense();
|
||||
|
||||
QString addDefine(QString def);
|
||||
|
||||
enum ProjectType {
|
||||
App,
|
||||
Lib,
|
||||
Subdirs
|
||||
};
|
||||
|
||||
ProjectType projectType( const QString& proFileName );
|
||||
bool isDone();
|
||||
bool isOk();
|
||||
|
||||
@ -98,21 +89,16 @@ private:
|
||||
QStringList buildParts;
|
||||
QStringList nobuildParts;
|
||||
QStringList skipModules;
|
||||
QStringList licensedModules;
|
||||
QStringList allSqlDrivers;
|
||||
QStringList disabledModules;
|
||||
QStringList enabledModules;
|
||||
QStringList modules;
|
||||
// QStringList sqlDrivers;
|
||||
QStringList configCmdLine;
|
||||
QStringList qmakeConfig;
|
||||
QStringList qtConfig;
|
||||
|
||||
QStringList qmakeSql;
|
||||
QStringList qmakeSqlPlugins;
|
||||
|
||||
QStringList qmakeStyles;
|
||||
QStringList qmakeStylePlugins;
|
||||
|
||||
QStringList qmakeVars;
|
||||
QStringList qmakeDefines;
|
||||
|
@ -431,69 +431,6 @@ QString Environment::execute(const QString &command, int *returnCode)
|
||||
return output;
|
||||
}
|
||||
|
||||
/*!
|
||||
Copies the \a srcDir contents into \a destDir.
|
||||
|
||||
Returns true if copying was successful.
|
||||
*/
|
||||
bool Environment::cpdir(const QString &srcDir, const QString &destDir)
|
||||
{
|
||||
QString cleanSrcName = QDir::cleanPath(srcDir);
|
||||
QString cleanDstName = QDir::cleanPath(destDir);
|
||||
|
||||
#ifdef CONFIGURE_DEBUG_CP_DIR
|
||||
qDebug() << "Attempt to cpdir " << cleanSrcName << "->" << cleanDstName;
|
||||
#endif
|
||||
if(!QFile::exists(cleanDstName) && !QDir().mkpath(cleanDstName)) {
|
||||
qDebug() << "cpdir: Failure to create " << cleanDstName;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = true;
|
||||
QDir dir = QDir(cleanSrcName);
|
||||
QFileInfoList allEntries = dir.entryInfoList(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
for (int i = 0; result && (i < allEntries.count()); ++i) {
|
||||
QFileInfo entry = allEntries.at(i);
|
||||
bool intermediate = true;
|
||||
if (entry.isDir()) {
|
||||
intermediate = cpdir(QString("%1/%2").arg(cleanSrcName).arg(entry.fileName()),
|
||||
QString("%1/%2").arg(cleanDstName).arg(entry.fileName()));
|
||||
} else {
|
||||
QString destFile = QString("%1/%2").arg(cleanDstName).arg(entry.fileName());
|
||||
#ifdef CONFIGURE_DEBUG_CP_DIR
|
||||
qDebug() << "About to cp (file)" << entry.absoluteFilePath() << "->" << destFile;
|
||||
#endif
|
||||
QFile::remove(destFile);
|
||||
intermediate = QFile::copy(entry.absoluteFilePath(), destFile);
|
||||
SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL);
|
||||
}
|
||||
if (!intermediate) {
|
||||
qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir();
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool Environment::rmdir(const QString &name)
|
||||
{
|
||||
bool result = true;
|
||||
QString cleanName = QDir::cleanPath(name);
|
||||
|
||||
QDir dir = QDir(cleanName);
|
||||
QFileInfoList allEntries = dir.entryInfoList(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
for (int i = 0; result && (i < allEntries.count()); ++i) {
|
||||
QFileInfo entry = allEntries.at(i);
|
||||
if (entry.isDir()) {
|
||||
result &= rmdir(entry.absoluteFilePath());
|
||||
} else {
|
||||
result &= QFile::remove(entry.absoluteFilePath());
|
||||
}
|
||||
}
|
||||
result &= dir.rmdir(cleanName);
|
||||
return result;
|
||||
}
|
||||
|
||||
static QStringList splitPathList(const QString &path)
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
|
@ -55,8 +55,6 @@ public:
|
||||
|
||||
static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv);
|
||||
static QString execute(const QString &command, int *returnCode = 0);
|
||||
static bool cpdir(const QString &srcDir, const QString &destDir);
|
||||
static bool rmdir(const QString &name);
|
||||
|
||||
static QString findFileInPaths(const QString &fileName, const QStringList &paths);
|
||||
static QStringList path();
|
||||
|
@ -42,7 +42,6 @@ int runConfigure( int argc, char** argv )
|
||||
return 3;
|
||||
|
||||
app.parseCmdLine();
|
||||
app.validateArgs();
|
||||
if (!app.isOk())
|
||||
return 3;
|
||||
if( app.displayHelp() )
|
||||
|
Loading…
Reference in New Issue
Block a user