Cpaster frontend: Fix deployment

On OS X we may not set QMAKE_RPATH because otherwise the default rpath
to the Qt libs is removed.

Install the tool on Windows and Linux.
Add the plugins path to the rpath on Linux.
Also make the rpath when building relative instead of absolute on Linux.

Change-Id: Ieb6a79d9f9f922d117736ae7b4ae65c784ade5c9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-06-19 14:23:07 +02:00
parent e232648d79
commit 4e2905f880
2 changed files with 4 additions and 9 deletions

View File

@@ -91,7 +91,8 @@ def fix_rpaths_helper(chrpath_bin, install_dir, dirpath, filenames):
for filename in filenames: for filename in filenames:
fpath = os.path.join(dirpath, filename) fpath = os.path.join(dirpath, filename)
relpath = os.path.relpath(install_dir+'/lib/qtcreator', dirpath) relpath = os.path.relpath(install_dir+'/lib/qtcreator', dirpath)
command = [chrpath_bin, '-r', '$ORIGIN/'+relpath, fpath] relpluginpath = os.path.relpath(install_dir+'/lib/qtcreator/plugins', dirpath)
command = [chrpath_bin, '-r', '$ORIGIN/'+relpath+':$ORIGIN/'+relpluginpath, fpath]
print fpath, ':', command print fpath, ':', command
try: try:
subprocess.check_call(command) subprocess.check_call(command)

View File

@@ -1,4 +1,3 @@
TEMPLATE = app
TARGET=cpaster TARGET=cpaster
QTC_LIB_DEPENDS += \ QTC_LIB_DEPENDS += \
@@ -7,16 +6,11 @@ QTC_LIB_DEPENDS += \
QTC_PLUGIN_DEPENDS += \ QTC_PLUGIN_DEPENDS += \
coreplugin coreplugin
include(../../../../qtcreator.pri) include(../../../qtcreatortool.pri)
include(../../../rpath.pri)
CONFIG += console
CONFIG -= app_bundle
QT += network QT += network
QMAKE_RPATHDIR *= $$IDE_PLUGIN_PATH linux-*: QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,\$\$ORIGIN/$$relative_path($$IDE_PLUGIN_PATH, $$DESTDIR)\'
DESTDIR=$$IDE_LIBEXEC_PATH
HEADERS = ../protocol.h \ HEADERS = ../protocol.h \
../cpasterconstants.h \ ../cpasterconstants.h \