buildablehelperlibrary.h 1.95 KB
Newer Older
1
2
3
4
5
#ifndef BUILDABLEHELPERLIBRARY_H
#define BUILDABLEHELPERLIBRARY_H

#include "utils_global.h"

Friedemann Kleint's avatar
Friedemann Kleint committed
6
#include <QtCore/QString>
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

QT_FORWARD_DECLARE_CLASS(QFileInfo)

namespace Utils {

class Environment;

class QTCREATOR_UTILS_EXPORT BuildableHelperLibrary
{
public:
    // returns the full path to the first qmake, qmake-qt4, qmake4 that has
    // at least version 2.0.0 and thus is a qt4 qmake
    static QString findSystemQt(const Utils::Environment &env);
    // return true if the qmake at qmakePath is qt4 (used by QtVersion)
    static QString qtVersionForQMake(const QString &qmakePath);
22
    static bool checkMinimumQtVersion(const QString &qtversionString, int majorVersion, int minorVersion, int patchVersion);
23
24
25
26
27
28
29
30
31
32
33
34
35
    // returns something like qmake4, qmake, qmake-qt4 or whatever distributions have chosen (used by QtVersion)
    static QStringList possibleQMakeCommands();

    static QString qtInstallHeadersDir(const QString &qmakePath);
    static QString qtInstallDataDir(const QString &qmakePath);

    static QString byInstallDataHelper(const QString &mainFilename,
                                       const QStringList &installDirectories,
                                       const QStringList &validBinaryFilenames);

    static bool copyFiles(const QString &sourcePath, const QStringList &files,
                          const QString &targetDirectory, QString *errorMessage);

36
37
38
39
40
    static bool buildHelper(const QString &helperName, const QString &proFilename,
                            const QString &directory, const QString &makeCommand,
                            const QString &qmakeCommand, const QString &mkspec,
                            const Utils::Environment &env, const QString &targetMode,
                            QString *output, QString *errorMessage);
41
42
43
44
45
46
47
48

    static bool getHelperFileInfoFor(const QStringList &validBinaryFilenames,
                                     const QString &directory, QFileInfo* info);
};

}

#endif // BUILDABLEHELPERLIBRARY_H