2012-03-15 14:53:47 +01:00
|
|
|
!isEmpty(IFW_PRI_INCLUDED) {
|
|
|
|
error("installerfw.pri already included")
|
|
|
|
}
|
|
|
|
IFW_PRI_INCLUDED = 1
|
2013-02-13 11:00:08 +01:00
|
|
|
|
|
|
|
IFW_VERSION = 1.2.81
|
|
|
|
|
2012-03-22 17:14:12 +01:00
|
|
|
IFW_NEWLINE = $$escape_expand(\\n\\t)
|
2012-03-15 14:53:47 +01:00
|
|
|
|
2012-03-22 13:01:52 +01:00
|
|
|
defineReplace(toNativeSeparators) {
|
|
|
|
return($$replace(1, /, $$QMAKE_DIR_SEP))
|
|
|
|
}
|
|
|
|
|
2012-03-15 14:53:47 +01:00
|
|
|
defineReplace(cleanPath) {
|
|
|
|
win32:1 ~= s|\\\\|/|g
|
|
|
|
contains(1, ^/.*):pfx = /
|
|
|
|
else:pfx =
|
|
|
|
segs = $$split(1, /)
|
|
|
|
out =
|
|
|
|
for(seg, segs) {
|
|
|
|
equals(seg, ..):out = $$member(out, 0, -2)
|
|
|
|
else:!equals(seg, .):out += $$seg
|
|
|
|
}
|
|
|
|
return($$join(out, /, $$pfx))
|
|
|
|
}
|
|
|
|
|
|
|
|
isEmpty(IFW_BUILD_TREE) {
|
|
|
|
sub_dir = $$_PRO_FILE_PWD_
|
|
|
|
sub_dir ~= s,^$$re_escape($$PWD),,
|
|
|
|
IFW_BUILD_TREE = $$cleanPath($$OUT_PWD)
|
|
|
|
IFW_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
|
|
|
|
}
|
|
|
|
|
|
|
|
IFW_SOURCE_TREE = $$PWD
|
|
|
|
IFW_APP_PATH = $$IFW_BUILD_TREE/bin
|
|
|
|
IFW_LIB_PATH = $$IFW_BUILD_TREE/lib
|
|
|
|
|
2012-03-22 13:01:52 +01:00
|
|
|
RCC = $$cleanPath($$toNativeSeparators($$[QT_INSTALL_BINS]/rcc))
|
|
|
|
LRELEASE = $$cleanPath($$toNativeSeparators($$[QT_INSTALL_BINS]/lrelease))
|
|
|
|
|
|
|
|
win32:RCC = $${RCC}.exe
|
|
|
|
win32:LRELEASE = $${LRELEASE}.exe
|
2013-01-23 14:29:03 +01:00
|
|
|
win32-g++*:QMAKE_CXXFLAGS += -Wno-attributes
|
2012-03-22 13:01:52 +01:00
|
|
|
|
2012-03-15 14:53:47 +01:00
|
|
|
INCLUDEPATH += \
|
|
|
|
$$IFW_SOURCE_TREE/src/libs/7zip \
|
|
|
|
$$IFW_SOURCE_TREE/src/libs/kdtools \
|
|
|
|
$$IFW_SOURCE_TREE/src/libs/installer
|
|
|
|
win32:INCLUDEPATH += $$IFW_SOURCE_TREE/src/libs/7zip/win/CPP
|
|
|
|
unix:INCLUDEPATH += $$IFW_SOURCE_TREE/src/libs/7zip/unix/CPP
|
|
|
|
|
2012-08-21 12:05:11 +02:00
|
|
|
LIBS += -L$$IFW_LIB_PATH
|
|
|
|
# The order is important. The linker needs to parse archives in reversed dependency order.
|
|
|
|
equals(TEMPLATE, app):LIBS += -linstaller
|
|
|
|
unix:!macx:LIBS += -lutil
|
|
|
|
macx:LIBS += -framework Carbon -framework Security
|
|
|
|
|
2013-01-28 12:36:19 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Use same static/shared configuration as Qt
|
|
|
|
#
|
|
|
|
# Qt 5 sets QT_CONFIG
|
|
|
|
# Qt 4 / Windows sets CONFIG
|
|
|
|
# Qt 4 / Unix sets neither QT_CONFIG nor CONFIG
|
|
|
|
#
|
|
|
|
|
|
|
|
!contains(CONFIG, static|shared) {
|
|
|
|
contains(QT_CONFIG, static): CONFIG += static
|
|
|
|
contains(QT_CONFIG, shared): CONFIG += shared
|
|
|
|
|
|
|
|
!contains(CONFIG, static|shared) {
|
|
|
|
exists($$[QT_INSTALL_LIBS]/libQtCore.a)|exists($$[QT_INSTALL_LIBS]/libQtCore_debug.a) {
|
|
|
|
CONFIG += static
|
|
|
|
} else {
|
|
|
|
CONFIG += shared
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-11-20 14:03:50 +01:00
|
|
|
isEqual(QT_MAJOR_VERSION, 4) {
|
|
|
|
CONFIG += uitools
|
2012-11-21 16:34:53 +01:00
|
|
|
CONFIG(static, static|shared) {
|
|
|
|
DEFINES += QT_STATIC
|
|
|
|
QT += script network xml
|
|
|
|
}
|
2012-11-20 14:03:50 +01:00
|
|
|
} else {
|
2012-11-21 16:34:53 +01:00
|
|
|
QT += uitools xml
|
2012-11-20 14:03:50 +01:00
|
|
|
contains(QT, gui): QT += widgets
|
2012-11-21 16:34:53 +01:00
|
|
|
contains(QT, core): QT += concurrent core-private
|
2012-11-20 14:03:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
CONFIG += depend_includepath
|
2012-03-15 14:53:47 +01:00
|
|
|
|
|
|
|
GIT_SHA1 = $$system(git rev-list --abbrev-commit -n1 HEAD)
|
|
|
|
DEFINES += QT_NO_CAST_FROM_ASCII "_GIT_SHA1_=$$GIT_SHA1"
|
|
|
|
|
|
|
|
static {
|
2013-01-23 14:29:03 +01:00
|
|
|
LIBS += -l7z
|
|
|
|
win32-g++*: LIBS += -lmpr -luuid
|
2013-01-21 12:46:54 +01:00
|
|
|
macx:equals(TEMPLATE, app):CONFIG -= app_bundle
|
|
|
|
|
2012-03-15 14:53:47 +01:00
|
|
|
win32:exists($$IFW_LIB_PATH/installer.lib):POST_TARGETDEPS += $$IFW_LIB_PATH/installer.lib
|
|
|
|
unix:exists($$IFW_LIB_PATH/libinstaller.a):POST_TARGETDEPS += $$IFW_LIB_PATH/libinstaller.a
|
|
|
|
}
|