On 26/04/16 09:26, Christian Kandeler wrote:
On 04/25/2016 07:54 PM, Andrzej Telszewski wrote:
I have now built QBS with:

qmake-qt5 qbs.pro \
   QBS_LIBRARY_DIRNAME=lib$LIBDIRSUFFIX \

What is $LIBDIRSUFFIX?


$LIBDIRSUFFIX is set to 64, would be empty for 32 bit arch.

   QMAKE_CXXFLAGS="$SLKCFLAGS" \
   QBS_INSTALL_PREFIX=/ \
   CONFIG+=qbs_enable_project_file_updates
make
make docs
make install INSTALL_ROOT=$PKG/usr

What is $PKG?


$PKG is path to where to temporarily install the files.
Later, the distribution package is created from within this path.
And then the packages is installed.

and QTC with:

qmake-qt5 qtcreator.pro \
 IDE_LIBRARY_BASENAME="lib$LIBDIRSUFFIX" \
 QMAKE_CXXFLAGS="$SLKCFLAGS" \
 LLVM_INSTALL_DIR=/usr \
 QBS_INSTALL_DIR=/usr

Shouldn't this be $PKG/usr?


No. If I'm not mistaken, QBS_INSTALL_DIR is where the Qt Creator build system is searching for QBS. The same applies for LLVM_INSTALL_DIR, for having Clang Code Model. And since both QBS and LLVM are already installed under /usr, /usr is the correct value to set.

make
make install INSTALL_ROOT=$PKG/usr
make docs
make install_docs INSTALL_ROOT=$PKG/usr

Now I have a small issue. When I start Qt Creator, I receive the message:
WARNING: Plugin path '/usr/lib//qbs/plugins' does not exist.

If $PKG is not empty, then that is expected. Otherwise this path should
be correct; at least that's what a cursory look at the project files
suggests. Where is qbs/plugins actually located now?

First of all, I forgot to mention that, despite the warning, my QBS based project actually builds fine.

As I mentioned before, after the QBS is compiled, the files are installed in the $PKG temporary location and a packages is created.

Then the QBS package is installed and QBS plugins can be found under:

/usr/lib64/qbs/plugins

> (Note: Qt Creator hardcodes "lib" when looking for plugins, so you
> cannot set QBS_LIBRARY_DIRNAME to anything else.)
>

You're correct on that one. I traced down where the "lib" is hardcoded and wrote a small patch to deal with that.

Now the warning does not appear anymore.

The patch is attached. Since I'm not yet (maybe never;)) involved in Qt Creator development, feel free to upstream the patch. Naturally, provided that it is correctly written ;)

I'll be off for a few days and cannot deal with it now. But if nobody stands for it till I return, I'll probably get on upstreaming it myself.

I guess that I still mess something with QBS_LIBRARY_DIRNAME and/or
IDE_LIBRARY_BASENAME there is something missing?

IDE_LIBRARY_BASENAME is irrelevant when building against an
"independent" qbs.


But I think IDE_LIBRARY_BASENAME is relevant at least with Qt Creator itself. That is building on 64-bit arch will place the Qt Creator libraries under:

/usr/lib64/qtcreator/

and not under:

/usr/lib/qtcreator/


And of course, it is now relevant to my patch ;)


To sum up, this is what I have now and it finally seems to be working fine:

*QBS*
qmake-qt5 qbs.pro \
  QMAKE_CXXFLAGS="$SLKCFLAGS" \
  QBS_LIBRARY_DIRNAME=lib$LIBDIRSUFFIX \
  QBS_INSTALL_PREFIX=/ \
  CONFIG+=qbs_enable_project_file_updates
make
make install INSTALL_ROOT=$PKG/usr

$ create the QBS distribution package ...
$ install the QBS package ...

*Qt Creator*
qmake-qt5 qtcreator.pro \
  QMAKE_CXXFLAGS="$SLKCFLAGS" \
  IDE_LIBRARY_BASENAME="lib$LIBDIRSUFFIX" \
  LLVM_INSTALL_DIR="/usr" \
  QBS_INSTALL_DIR="/usr"
make
make install INSTALL_ROOT=$PKG/usr

$ create the Qt Creator distribution package ...
$ install the Qt Creator package ...


Christian
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator



--
Best regards,
Andrzej Telszewski
--- src/plugins/qbsprojectmanager/qbsprojectparser.cpp.orig	2016-05-02 18:53:59.171656155 +0200
+++ src/plugins/qbsprojectmanager/qbsprojectparser.cpp	2016-05-02 18:54:38.474158236 +0200
@@ -206,8 +206,9 @@
 QString QbsProjectParser::pluginsBaseDirectory() const
 {
     const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR);
+    const QString ideLibraryBaseName = QLatin1String(IDE_LIBRARY_BASENAME);
     if (!qbsInstallDir.isEmpty())
-        return qbsInstallDir + QLatin1String("/lib/");
+        return qbsInstallDir + QLatin1String("/") + ideLibraryBaseName + QLatin1String("/");
     if (HostOsInfo::isMacHost())
         return QDir::cleanPath(QCoreApplication::applicationDirPath()
                                + QLatin1String("/../PlugIns"));
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to