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 TEMPLATE = app
TARGET = qtcreator.sh TARGET = qtcreator.sh
include(../qtcreator.pri)
OBJECTS_DIR = OBJECTS_DIR =
PRE_TARGETDEPS = $$PWD/qtcreator.sh PRE_TARGETDEPS = $$PWD/qtcreator.sh
...@@ -10,7 +13,7 @@ CONFIG -= qt separate_debug_info gdb_dwarf_index ...@@ -10,7 +13,7 @@ CONFIG -= qt separate_debug_info gdb_dwarf_index
QMAKE_CLEAN = qtcreator.sh QMAKE_CLEAN = qtcreator.sh
target.path = $$QTC_PREFIX/bin target.path = $$INSTALL_BIN_PATH
INSTALLS += target INSTALLS += target
DISTFILES = $$PWD/qtcreator.sh DISTFILES = $$PWD/qtcreator.sh
...@@ -68,12 +68,12 @@ dev_qch_docs.depends += dev_html_docs ...@@ -68,12 +68,12 @@ dev_qch_docs.depends += dev_html_docs
!macx { !macx {
inst_qch_docs.files = $$QCH_FILE 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 inst_qch_docs.CONFIG += no_check_exist no_default_install
INSTALLS += inst_qch_docs INSTALLS += inst_qch_docs
inst_dev_qch_docs.files = $$DEV_QCH_FILE 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 inst_dev_qch_docs.CONFIG += no_check_exist no_default_install
INSTALLS += inst_dev_qch_docs INSTALLS += inst_dev_qch_docs
......
...@@ -96,6 +96,16 @@ macx { ...@@ -96,6 +96,16 @@ macx {
else: \ else: \
IDE_LIBEXEC_PATH = $$IDE_BUILD_TREE/libexec/qtcreator IDE_LIBEXEC_PATH = $$IDE_BUILD_TREE/libexec/qtcreator
!isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1 !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 += \ INCLUDEPATH += \
......
...@@ -38,32 +38,32 @@ exists(src/shared/qbs/qbs.pro) { ...@@ -38,32 +38,32 @@ exists(src/shared/qbs/qbs.pro) {
cache(QBSLIBDIR) cache(QBSLIBDIR)
QBS_INSTALL_PREFIX = $${QTC_PREFIX} QBS_INSTALL_PREFIX = $${QTC_PREFIX}
cache(QBS_INSTALL_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) cache(QBS_LIB_INSTALL_DIR)
QBS_RESOURCES_BUILD_DIR = $${IDE_DATA_PATH}/qbs QBS_RESOURCES_BUILD_DIR = $${IDE_DATA_PATH}/qbs
cache(QBS_RESOURCES_BUILD_DIR) 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) cache(QBS_RESOURCES_INSTALL_DIR)
macx { macx {
QBS_PLUGINS_BUILD_DIR = $${IDE_PLUGIN_PATH} QBS_PLUGINS_BUILD_DIR = $${IDE_PLUGIN_PATH}
QBS_APPS_RPATH_DIR = @loader_path/../Frameworks QBS_APPS_RPATH_DIR = @loader_path/../Frameworks
} else { } 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 QBS_APPS_RPATH_DIR = \$\$ORIGIN/../$$IDE_LIBRARY_BASENAME/qtcreator
} }
cache(QBS_PLUGINS_BUILD_DIR) cache(QBS_PLUGINS_BUILD_DIR)
cache(QBS_APPS_RPATH_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) cache(QBS_PLUGINS_INSTALL_DIR)
QBS_LIBRARY_DIRNAME = $${IDE_LIBRARY_BASENAME} QBS_LIBRARY_DIRNAME = $${IDE_LIBRARY_BASENAME}
cache(QBS_LIBRARY_DIRNAME) cache(QBS_LIBRARY_DIRNAME)
QBS_APPS_DESTDIR = $${IDE_BIN_PATH} QBS_APPS_DESTDIR = $${IDE_BIN_PATH}
cache(QBS_APPS_DESTDIR) cache(QBS_APPS_DESTDIR)
QBS_APPS_INSTALL_DIR = $${QTC_PREFIX}/bin QBS_APPS_INSTALL_DIR = $$INSTALL_BIN_PATH
cache(QBS_APPS_INSTALL_DIR) cache(QBS_APPS_INSTALL_DIR)
QBS_LIBEXEC_DESTDIR = $${IDE_LIBEXEC_PATH} QBS_LIBEXEC_DESTDIR = $${IDE_LIBEXEC_PATH}
cache(QBS_LIBEXEC_DESTDIR) cache(QBS_LIBEXEC_DESTDIR)
QBS_LIBEXEC_INSTALL_DIR = $${QTC_PREFIX}/bin QBS_LIBEXEC_INSTALL_DIR = $$INSTALL_LIBEXEC_PATH
cache(QBS_LIBEXEC_INSTALL_DIR) cache(QBS_LIBEXEC_INSTALL_DIR)
QBS_RELATIVE_LIBEXEC_PATH = $$relative_path($$QBS_LIBEXEC_DESTDIR, $$QBS_APPS_DESTDIR) QBS_RELATIVE_LIBEXEC_PATH = $$relative_path($$QBS_LIBEXEC_DESTDIR, $$QBS_APPS_DESTDIR)
isEmpty(QBS_RELATIVE_LIBEXEC_PATH):QBS_RELATIVE_LIBEXEC_PATH = . isEmpty(QBS_RELATIVE_LIBEXEC_PATH):QBS_RELATIVE_LIBEXEC_PATH = .
......
...@@ -30,6 +30,6 @@ osx { ...@@ -30,6 +30,6 @@ osx {
CONFIG -= app_bundle CONFIG -= app_bundle
QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$system_quote($$PWD/Info.plist) QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$system_quote($$PWD/Info.plist)
} else { } else {
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE) target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target INSTALLS += target
} }
...@@ -33,7 +33,7 @@ defineReplace(stripStaticBase) { ...@@ -33,7 +33,7 @@ defineReplace(stripStaticBase) {
!osx { !osx {
static.files = $$STATIC_FILES static.files = $$STATIC_FILES
static.base = $$STATIC_BASE static.base = $$STATIC_BASE
static.path = $$QTC_PREFIX/share/qtcreator static.path = $$INSTALL_DATA_PATH
INSTALLS += static INSTALLS += static
} }
} }
...@@ -102,7 +102,7 @@ QMAKE_EXTRA_COMPILERS += unconditionalCopy2build ...@@ -102,7 +102,7 @@ QMAKE_EXTRA_COMPILERS += unconditionalCopy2build
!macx { !macx {
for(data_dir, DATA_DIRS) { for(data_dir, DATA_DIRS) {
eval($${data_dir}.files = $$IDE_DATA_PATH/$$data_dir) 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) eval($${data_dir}.CONFIG += no_check_exist)
INSTALLS += $$data_dir INSTALLS += $$data_dir
} }
......
...@@ -142,6 +142,6 @@ isEmpty(vcproj) { ...@@ -142,6 +142,6 @@ isEmpty(vcproj) {
} }
qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/qtcreator_,.qm) 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 qmfiles.CONFIG += no_check_exist
INSTALLS += qmfiles INSTALLS += qmfiles
...@@ -20,7 +20,7 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH) ...@@ -20,7 +20,7 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
} }
win32 { win32 {
RC_FILE = qtcreator.rc RC_FILE = qtcreator.rc
target.path = $$QTC_PREFIX/bin target.path = $$INSTALL_BIN_PATH
INSTALLS += target INSTALLS += target
} else:macx { } else:macx {
LIBS += -framework CoreFoundation LIBS += -framework CoreFoundation
...@@ -32,7 +32,7 @@ win32 { ...@@ -32,7 +32,7 @@ win32 {
info.output = $$IDE_BIN_PATH/../Info.plist info.output = $$IDE_BIN_PATH/../Info.plist
QMAKE_SUBSTITUTES = info QMAKE_SUBSTITUTES = info
} else { } else {
target.path = $$QTC_PREFIX/bin target.path = $$INSTALL_BIN_PATH
INSTALLS += target INSTALLS += target
} }
......
...@@ -97,6 +97,6 @@ HEADERS += extensioncontext.h \ ...@@ -97,6 +97,6 @@ HEADERS += extensioncontext.h \
knowntype.h \ knowntype.h \
symbolgroupnode.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 INSTALLS += target
...@@ -17,5 +17,5 @@ build_all:!build_pass { ...@@ -17,5 +17,5 @@ build_all:!build_pass {
CONFIG += release CONFIG += release
} }
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE) target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target INSTALLS += target
...@@ -20,5 +20,5 @@ unix { ...@@ -20,5 +20,5 @@ unix {
LIBS += -lshell32 LIBS += -lshell32
} }
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE) target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target INSTALLS += target
...@@ -2,6 +2,6 @@ macx { ...@@ -2,6 +2,6 @@ macx {
DESTDIR = $$IDE_PLUGIN_PATH/QmlDesigner DESTDIR = $$IDE_PLUGIN_PATH/QmlDesigner
} else { } else {
DESTDIR = $$IDE_PLUGIN_PATH/qmldesigner DESTDIR = $$IDE_PLUGIN_PATH/qmldesigner
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins/qmldesigner target.path = $$INSTALL_PLUGIN_PATH/qmldesigner
INSTALLS += target INSTALLS += target
} }
...@@ -24,10 +24,10 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols ...@@ -24,10 +24,10 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
!macx { !macx {
win32 { win32 {
dlltarget.path = $$QTC_PREFIX/bin dlltarget.path = $$INSTALL_BIN_PATH
INSTALLS += dlltarget INSTALLS += dlltarget
} else { } else {
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator target.path = $$INSTALL_LIBRARY_PATH
INSTALLS += target INSTALLS += target
} }
} }
...@@ -94,7 +94,7 @@ CONFIG += plugin plugin_with_soname ...@@ -94,7 +94,7 @@ CONFIG += plugin plugin_with_soname
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
!macx { !macx {
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins target.path = $$INSTALL_PLUGIN_PATH
INSTALLS += target INSTALLS += target
} }
......
...@@ -16,5 +16,5 @@ osx { ...@@ -16,5 +16,5 @@ osx {
} }
include(rpath.pri) include(rpath.pri)
target.path = $$QTC_PREFIX/$$relative_path($$IDE_LIBEXEC_PATH, $$IDE_BUILD_TREE) target.path = $$INSTALL_LIBEXEC_PATH
INSTALLS += target 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