qtcreator.pro 2.34 KB
Newer Older
Eike Ziller's avatar
Eike Ziller committed
1 2
include(qtcreator.pri)

3
#version check qt
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
4
!minQtVersion(4, 8, 0) {
5
    message("Cannot build Qt Creator with Qt version $${QT_VERSION}.")
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
6
    error("Use at least Qt 4.8.0.")
7 8
}

Daniel Molkentin's avatar
Daniel Molkentin committed
9
include(doc/doc.pri)
10

con's avatar
con committed
11 12 13
TEMPLATE  = subdirs
CONFIG   += ordered

14
SUBDIRS = src share lib/qtcreator/qtcomponents
15
unix:!macx:!isEmpty(copydata):SUBDIRS += bin
Eike Ziller's avatar
Eike Ziller committed
16 17

OTHER_FILES += dist/copyright_template.txt \
18
    $$files(dist/changes-*)
19

20 21 22 23 24 25 26
macx: PLATFORM = "mac"
else:win32: PLATFORM = "windows"
else:linux-*: PLATFORM = "linux-$${QT_ARCH}"
else: PLATFORM = "unknown"

PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)

27 28
macx {
    APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
29
    BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
Eike Ziller's avatar
Eike Ziller committed
30
    BINDIST_INSTALLER_SOURCE = $$BINDIST_SOURCE
31
    deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\"
32
    codesign.commands = codesign -s \"$(SIGNING_IDENTITY)\" \"$${APPBUNDLE}\"
33
    dmg.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin qt-creator-$${PATTERN}.dmg
34
    dmg.depends = deployqt
35
    QMAKE_EXTRA_TARGETS += codesign dmg
36
} else {
37
    BINDIST_SOURCE = "$(INSTALL_ROOT)$$QTC_PREFIX"
Eike Ziller's avatar
Eike Ziller committed
38
    BINDIST_INSTALLER_SOURCE = "$$BINDIST_SOURCE/*"
Daniel Molkentin's avatar
Daniel Molkentin committed
39
    deployqt.commands = $$PWD/scripts/deployqt.py -i \"$(INSTALL_ROOT)$$QTC_PREFIX\"
40
    deployqt.depends = install
Daniel Molkentin's avatar
Daniel Molkentin committed
41 42
    win32 {
        deployartifacts.depends = install
Daniel Molkentin's avatar
Daniel Molkentin committed
43
        deployartifacts.commands = git clone "git://gitorious.org/qt-creator/binary-artifacts.git"&& xcopy /s /q /y /i "binary-artifacts\\win32" \"$(INSTALL_ROOT)$$QTC_PREFIX\"&& rmdir /s /q binary-artifacts
Daniel Molkentin's avatar
Daniel Molkentin committed
44 45
        QMAKE_EXTRA_TARGETS += deployartifacts
    }
46 47
}

Eike Ziller's avatar
Eike Ziller committed
48 49 50
INSTALLER_ARCHIVE = $$OUT_PWD/qt-creator-$${PATTERN}-installer-archive.7z

bindist.depends = deployqt
51
bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOURCE\"
Eike Ziller's avatar
Eike Ziller committed
52 53 54
bindist_installer.depends = deployqt
bindist_installer.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}-installer-archive.7z \"$$BINDIST_INSTALLER_SOURCE\"
installer.depends = bindist_installer
55
installer.commands = $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$$INSTALLER_ARCHIVE\" "qt-creator-$${PATTERN}-installer"
Daniel Molkentin's avatar
Daniel Molkentin committed
56

57 58 59
win32 {
    deployqt.commands ~= s,/,\\\\,g
    bindist.commands ~= s,/,\\\\,g
Eike Ziller's avatar
Eike Ziller committed
60 61
    bindist_installer.commands ~= s,/,\\\\,g
    installer.commands ~= s,/,\\\\,g
62
}
63

Eike Ziller's avatar
Eike Ziller committed
64
QMAKE_EXTRA_TARGETS += deployqt bindist bindist_installer installer