Commit 9dd84323 authored by Eike Ziller's avatar Eike Ziller

Use variables for install locations

Define variables in qtcreator.pri for the various
install locations, instead of hardcoding the paths
everywhere where they are needed.

Change-Id: Ia34de711a7f2be317272ede023e2a8b9cdcc30fe
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent d5b49609
TEMPLATE = app
TARGET = qtcreator.sh
include(../qtcreator.pri)
OBJECTS_DIR =
PRE_TARGETDEPS = $$PWD/qtcreator.sh
......@@ -10,7 +13,7 @@ CONFIG -= qt separate_debug_info gdb_dwarf_index
QMAKE_CLEAN = qtcreator.sh
target.path = $$QTC_PREFIX/bin
target.path = $$INSTALL_BIN_PATH
INSTALLS += target
DISTFILES = $$PWD/qtcreator.sh
......@@ -68,12 +68,12 @@ dev_qch_docs.depends += dev_html_docs
!macx {
inst_qch_docs.files = $$QCH_FILE
inst_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
inst_qch_docs.path = $$INSTALL_DOC_PATH
inst_qch_docs.CONFIG += no_check_exist no_default_install
INSTALLS += inst_qch_docs
inst_dev_qch_docs.files = $$DEV_QCH_FILE
inst_dev_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
inst_dev_qch_docs.path = $$INSTALL_DOC_PATH
inst_dev_qch_docs.CONFIG += no_check_exist no_default_install
INSTALLS += inst_dev_qch_docs
......
......@@ -96,6 +96,16 @@ macx {
else: \
IDE_LIBEXEC_PATH = $$IDE_BUILD_TREE/libexec/qtcreator
!isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1
INSTALL_LIBRARY_PATH = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator
INSTALL_PLUGIN_PATH = $$INSTALL_LIBRARY_PATH/plugins
win32: \
INSTALL_LIBEXEC_PATH = $$QTC_PREFIX/bin
else: \
INSTALL_LIBEXEC_PATH = $$QTC_PREFIX/libexec/qtcreator
INSTALL_DATA_PATH = $$QTC_PREFIX/share/qtcreator
INSTALL_DOC_PATH = $$QTC_PREFIX/share/doc/qtcreator
INSTALL_BIN_PATH = $$QTC_PREFIX/bin
}
INCLUDEPATH += \
......
......@@ -38,32 +38,32 @@ exists(src/shared/qbs/qbs.pro) {
cache(QBSLIBDIR)
QBS_INSTALL_PREFIX = $${QTC_PREFIX}
cache(QBS_INSTALL_PREFIX)
QBS_LIB_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator
QBS_LIB_INSTALL_DIR = $$INSTALL_LIBRARY_PATH
cache(QBS_LIB_INSTALL_DIR)
QBS_RESOURCES_BUILD_DIR = $${IDE_DATA_PATH}/qbs
cache(QBS_RESOURCES_BUILD_DIR)
QBS_RESOURCES_INSTALL_DIR = $${QTC_PREFIX}/share/qtcreator/qbs
QBS_RESOURCES_INSTALL_DIR = $$INSTALL_DATA_PATH/qbs
cache(QBS_RESOURCES_INSTALL_DIR)
macx {
QBS_PLUGINS_BUILD_DIR = $${IDE_PLUGIN_PATH}
QBS_APPS_RPATH_DIR = @loader_path/../Frameworks
} else {
QBS_PLUGINS_BUILD_DIR = $${IDE_BUILD_TREE}/$${IDE_LIBRARY_BASENAME}/qtcreator/plugins
QBS_PLUGINS_BUILD_DIR = $$IDE_PLUGIN_PATH
QBS_APPS_RPATH_DIR = \$\$ORIGIN/../$$IDE_LIBRARY_BASENAME/qtcreator
}
cache(QBS_PLUGINS_BUILD_DIR)
cache(QBS_APPS_RPATH_DIR)
QBS_PLUGINS_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator/plugins
QBS_PLUGINS_INSTALL_DIR = $$INSTALL_PLUGIN_PATH
cache(QBS_PLUGINS_INSTALL_DIR)
QBS_LIBRARY_DIRNAME = $${IDE_LIBRARY_BASENAME}
cache(QBS_LIBRARY_DIRNAME)
QBS_APPS_DESTDIR = $${IDE_BIN_PATH}
cache(QBS_APPS_DESTDIR)
QBS_APPS_INSTALL_DIR = $${QTC_PREFIX}/bin
QBS_APPS_INSTALL_DIR = $$INSTALL_BIN_PATH
cache(QBS_APPS_INSTALL_DIR)
QBS_LIBEXEC_DESTDIR = $${IDE_LIBEXEC_PATH}
cache(QBS_LIBEXEC_DESTDIR)
QBS_LIBEXEC_INSTALL_DIR = $${QTC_PREFIX}/bin
QBS_LIBEXEC_INSTALL_DIR = $$INSTALL_LIBEXEC_PATH
cache(QBS_LIBEXEC_INSTALL_DIR)
QBS_RELATIVE_LIBEXEC_PATH = $$relative_path($$QBS_LIBEXEC_DESTDIR, $$QBS_APPS_DESTDIR)
isEmpty(QBS_RELATIVE_LIBEXEC_PATH):QBS_RELATIVE_LIBEXEC_PATH = .
......
......@@ -30,6 +30,6 @@ osx {
CONFIG -= app_bundle
QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$system_quote($$PWD/Info.plist)
} else {
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE)
target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target
}
......@@ -33,7 +33,7 @@ defineReplace(stripStaticBase) {
!osx {
static.files = $$STATIC_FILES
static.base = $$STATIC_BASE
static.path = $$QTC_PREFIX/share/qtcreator
static.path = $$INSTALL_DATA_PATH
INSTALLS += static
}
}
......@@ -102,7 +102,7 @@ QMAKE_EXTRA_COMPILERS += unconditionalCopy2build
!macx {
for(data_dir, DATA_DIRS) {
eval($${data_dir}.files = $$IDE_DATA_PATH/$$data_dir)
eval($${data_dir}.path = $$QTC_PREFIX/share/qtcreator)
eval($${data_dir}.path = $$INSTALL_DATA_PATH)
eval($${data_dir}.CONFIG += no_check_exist)
INSTALLS += $$data_dir
}
......
......@@ -142,6 +142,6 @@ isEmpty(vcproj) {
}
qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/qtcreator_,.qm)
qmfiles.path = $$QTC_PREFIX/share/qtcreator/translations
qmfiles.path = $$INSTALL_DATA_PATH/translations
qmfiles.CONFIG += no_check_exist
INSTALLS += qmfiles
......@@ -20,7 +20,7 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
}
win32 {
RC_FILE = qtcreator.rc
target.path = $$QTC_PREFIX/bin
target.path = $$INSTALL_BIN_PATH
INSTALLS += target
} else:macx {
LIBS += -framework CoreFoundation
......@@ -32,7 +32,7 @@ win32 {
info.output = $$IDE_BIN_PATH/../Info.plist
QMAKE_SUBSTITUTES = info
} else {
target.path = $$QTC_PREFIX/bin
target.path = $$INSTALL_BIN_PATH
INSTALLS += target
}
......
......@@ -97,6 +97,6 @@ HEADERS += extensioncontext.h \
knowntype.h \
symbolgroupnode.h
target.path = $$QTC_PREFIX/lib/$${DIRNAME}
target.path = $$QTC_PREFIX/lib/$${DIRNAME} # TODO this should go to INSTALL_LIBRARY_PATH/$${DIRNAME}
INSTALLS += target
......@@ -17,5 +17,5 @@ build_all:!build_pass {
CONFIG += release
}
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE)
target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target
......@@ -20,5 +20,5 @@ unix {
LIBS += -lshell32
}
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE)
target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target
......@@ -2,6 +2,6 @@ macx {
DESTDIR = $$IDE_PLUGIN_PATH/QmlDesigner
} else {
DESTDIR = $$IDE_PLUGIN_PATH/qmldesigner
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins/qmldesigner
target.path = $$INSTALL_PLUGIN_PATH/qmldesigner
INSTALLS += target
}
......@@ -24,10 +24,10 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
!macx {
win32 {
dlltarget.path = $$QTC_PREFIX/bin
dlltarget.path = $$INSTALL_BIN_PATH
INSTALLS += dlltarget
} else {
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator
target.path = $$INSTALL_LIBRARY_PATH
INSTALLS += target
}
}
......@@ -94,7 +94,7 @@ CONFIG += plugin plugin_with_soname
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
!macx {
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins
target.path = $$INSTALL_PLUGIN_PATH
INSTALLS += target
}
......
......@@ -16,5 +16,5 @@ osx {
}
include(rpath.pri)
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE)
target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment