Discussion:
importing a QtBase build into Creator?
(too old to reply)
René J.V. Bertin
2018-10-14 09:03:34 UTC
Permalink
Hi,

I'm trying to open the QtBase source tree in Creator, ideally importing the build configured through the configure(?) command line build procedure. That uses an out-of-tree shadow build dir btw, so the build dir for /path/to/qt-everywhere-xyz/qtbase is in /path/to/build/qtbase .

I'm not getting anywhere; importing qtbase.pro gives me an empty project whatever I try, and importing qtbase/src/src.pro doesn't allow me to import the build (I can select /path/to/build/qtbase/src but when I hit the import button the path goes back to /path/to/qt-everywhere-xyz/qtbase/src .
Even when the import existing build seems to work (for qtbase.pro) the project is still marked as unconfigured which doesn't seem to make sense. I don't want to hit the configure button because I don't trust that this will NOT change the build configuration.

Thanks,
R.
Eike Ziller
2018-10-15 08:51:44 UTC
Permalink
Post by René J.V. Bertin
Hi,
I'm trying to open the QtBase source tree in Creator, ideally importing the build configured through the configure(?) command line build procedure. That uses an out-of-tree shadow build dir btw, so the build dir for /path/to/qt-everywhere-xyz/qtbase is in /path/to/build/qtbase .
I'm not getting anywhere; importing qtbase.pro gives me an empty project whatever I try
This seems to work here. I’m doing a -developer-build though, no idea if that is relevant. Also make sure that you have the same number of path components to both your source and to your build. E.g. “/home/me/git/qt/src/qtbase” and “/home/me/git/qt/build/qtbase”.
Post by René J.V. Bertin
, and importing qtbase/src/src.pro doesn't allow me to import the build (I can select /path/to/build/qtbase/src but when I hit the import button the path goes back to /path/to/qt-everywhere-xyz/qtbase/src .
For me the path in the “Import” input field changes too for some reason, but the path it puts into the Kit configuration is correct for me.
Post by René J.V. Bertin
Even when the import existing build seems to work (for qtbase.pro) the project is still marked as unconfigured which doesn't seem to make sense. I don't want to hit the configure button because I don't trust that this will NOT change the build configuration.
There shouldn’t be any adverse effects just by pressing the configure button. If you don’t like the result, simply remove the qtbase.pro.user and start again.

Br, Eike

--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
René J.V. Bertin
2018-10-15 09:59:33 UTC
Permalink
Post by Eike Ziller
Also make sure that you have the same number of path components to both
your source and to your build.
That's because include paths in auto-generated files are relative, right? I've already run into that when using symlinks in the path on Linux, where chdir doesn't (always) canonicalise the resulting path and a single directory location on disk can thus have any number of working paths.
Post by Eike Ziller
There shouldn’t be any adverse effects just by pressing the configure button. If you don’t like the result, simply remove the qtbase.pro.user and start again.
You mean it won't run qmake with (most likely) different options? Qtbase is configured via `configure` which does call qmake, but it isn't evident at all to figure out what those options are after the fact. If QMake is not being run when pressing the configure button than that should indeed be safe.

Cheers,
R.
Eike Ziller
2018-10-15 10:15:06 UTC
Permalink
Post by René J.V. Bertin
Post by Eike Ziller
Also make sure that you have the same number of path components to both
your source and to your build.
That's because include paths in auto-generated files are relative, right? I've already run into that when using symlinks in the path on Linux, where chdir doesn't (always) canonicalise the resulting path and a single directory location on disk can thus have any number of working paths.
Also some functionality of qmake itself fails to handle that correctly (I always forget what that was exactly).
Post by René J.V. Bertin
Post by Eike Ziller
There shouldn’t be any adverse effects just by pressing the configure button. If you don’t like the result, simply remove the qtbase.pro.user and start again.
You mean it won't run qmake with (most likely) different options? Qtbase is configured via `configure` which does call qmake, but it isn't evident at all to figure out what those options are after the fact. If QMake is not being run when pressing the configure button than that should indeed be safe.
AFAIK the qmake parser in Qt Creator goes to some length to not actually write any files to the build directory itself, but instead uses an internal virtual file system.

--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
***@qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Loading...