Commit b18fe470 authored by Daniel Molkentin's avatar Daniel Molkentin

Fixes: make install works on linux

Details:  Creator on Linux works now in two modes:
          1) out of the build dir (shadow builds to be tested)
          2) make INSTALL_ROOT=/prefix install
parent 194175cc
......@@ -12,5 +12,3 @@ TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = src
message($$INSTALLS)
......@@ -16,8 +16,8 @@ linux-* {
ISGCC33=$$(GCC33)
!equals(ISGCC33, 1):QT += svg dbus
binaries.files += bin/qtcreator
binaries.path = $$LOCATION/bin
target.path = /bin
INSTALLS += target
}
......@@ -28,55 +28,7 @@ DESTDIR = ../../bin
SOURCES += main.cpp
macx {
SNIPPETS.path = Contents/Resources
SNIPPETS.files = $$IDE_SOURCE_TREE/bin/snippets
TEMPLATES.path = Contents/Resources
TEMPLATES.files = $$IDE_SOURCE_TREE/bin/templates
DESIGNER.path = Contents/Resources
DESIGNER.files = $$IDE_SOURCE_TREE/bin/designer
SCHEMES.path = Contents/Resources
SCHEMES.files = $$IDE_SOURCE_TREE/bin/schemes
GDBDEBUGGER.path = Contents/Resources
GDBDEBUGGER.files = $$IDE_SOURCE_TREE/bin/gdbmacros
LICENSE.path = Contents/Resources
LICENSE.files = $$IDE_SOURCE_TREE/bin/license.txt
RUNINTERMINAL.path = Contents/Resources
RUNINTERMINAL.files = $$IDE_SOURCE_TREE/bin/runInTerminal.command
QMAKE_BUNDLE_DATA += SNIPPETS TEMPLATES DESIGNER SCHEMES GDBDEBUGGER LICENSE RUNINTERMINAL
QMAKE_INFO_PLIST = $$PWD/Info.plist
}
!macx {
# make sure the resources are in place
!exists($$OUT_PWD/app.pro) {
unix:SEPARATOR = ;
win32:SEPARATOR = &
# we are shadow build
COPYSRC = snippets \
templates \
designer \
schemes \
gdbmacros
COPYDEST = $${OUT_PWD}/../../bin
win32:COPYDEST ~= s|/+|\|
for(tmp,COPYSRC) {
REALSRC = $$IDE_SOURCE_TREE/bin/$$tmp
REALDEST = $$COPYDEST/$$tmp
win32:tmp ~= s|/+|\|
win32:REALSRC ~= s|/+|\|
win32:REALDEST ~= s|/+|\|
QMAKE_POST_LINK += $${QMAKE_COPY_DIR} $${REALSRC} $${REALDEST} $$SEPARATOR
}
}
}
linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
QMAKE_RPATHDIR += \$\$ORIGIN/../lib
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR =
}
include(../rpath.pri)
win32 {
RC_FILE = qtcreator.rc
......@@ -85,3 +37,4 @@ win32 {
macx {
ICON = qtcreator.icns
}
......@@ -180,12 +180,16 @@ static inline QStringList getPluginPaths()
QDir rootDir = QApplication::applicationDirPath();
rootDir.cdUp();
const QString rootDirPath = rootDir.canonicalPath();
// 1) "lib" dir
// 1) "plugins" (Win/Linux)
QString pluginPath = rootDirPath;
pluginPath += QDir::separator();
pluginPath += QLatin1String("lib");
pluginPath += QDir::separator();
pluginPath += QLatin1String("qtcreator");
pluginPath += QDir::separator();
pluginPath += QLatin1String("plugins");
rc.push_back(pluginPath);
// 2) "PlugIns"
// 2) "PlugIns" (OS X)
pluginPath = rootDirPath;
pluginPath += QDir::separator();
pluginPath += QLatin1String("PlugIns");
......
......@@ -21,7 +21,7 @@ macx {
contains(QT_CONFIG, ppc):CONFIG += ppc x86
} else {
IDE_APP_TARGET = qtcreator
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/share/lib/qtcreator
IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/lib/qtcreator
IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins/
}
IDE_APP_PATH = $$IDE_BUILD_TREE/bin
......
......@@ -7,21 +7,13 @@ win32 {
DESTDIR = $$IDE_LIBRARY_PATH
macx {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/
} else:linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
QMAKE_RPATHDIR += \$\$ORIGIN
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR =
}
include(../rpath.pri)
TARGET = $$qtLibraryTarget($$TARGET)
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
linux-* {
target.path = $$LOCATION/lib/qtcreator
target.path = /lib/qtcreator
INSTALLS += target
}
}
......@@ -52,8 +52,8 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
CONFIG += plugin
linux-* {
target.path = /lib/qtcreator/plugins
target.path = /lib/qtcreator/plugins/$$PROVIDER
pluginspec.files += $${TARGET}.pluginspec
pluginspec.path = /lib/qtcreator/plugins
pluginspec.path = /lib/qtcreator/plugins/$$PROVIDER
INSTALLS += target pluginspec
}
macx {
# this is needed for the binary itself?
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/
} else:linux-* {
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
QMAKE_RPATHDIR += \$\$ORIGIN/../lib/qtcreator
IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
message($$QMAKE_RPATHDIR)
message($$IDE_PLUGIN_RPATH)
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
QMAKE_RPATHDIR =
}
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