Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Package now relocatable - #42

Open
kenfred wants to merge 7 commits into
osechet:testing/5.8.0from
kenfred:qtconf
Open

Package now relocatable#42
kenfred wants to merge 7 commits into
osechet:testing/5.8.0from
kenfred:qtconf

Conversation

@kenfred

@kenfred kenfred commented Oct 6, 2017

Copy link
Copy Markdown

Qt compiles in the installation path. If you move the installation, qmake can no longer locate various files. The prefix path can be overriden with qt.conf.

Previously, the recipe put the onus on the package consumer to create a qt.conf file. It was unclear to the consumer that this should be done and it meant the Qt installation could not be used stand-alone or with QtCreator without jumping through hoops.

The package step now creates a qt.conf in the bin directory, thus making the package relocatable.

Adding qtrepotool subrepo. The build instructuctions say it should be there if building directly from a git checkout (http://doc.qt.io/qt-5/windows-building.html). PATH was being appended with qtrepotools/bin, but that directory doesn't exist without updating the submodule.

Adding qtdeclarative subrepo. QtCreator won't allow the resulting Qt package to be in a kit unless qmlscene.exe is present, which is built in qtdeclarative.
Can't modify dictionary during iteration
Fixing windows call to configure.bat
Qt compiles in the installation path. If you move the installation, qmake can no longer locate various files. The prefix path can be overriden with qt.conf.

Previously, the recipe put the onus on the package consumer to create a qt.conf file. It was unclear to the consumer that this should be done and it meant the Qt installation could not be used stand-alone or with QtCreator without jumping through hoops.

The package step now creates a qt.conf in the bin directory, thus making the package relocatable.
@osechet

osechet commented Oct 12, 2017

Copy link
Copy Markdown
Owner

Are you sure this solution is working? I tried something similar in the past but there was an issue since the qt.conf that was packaged contained the path from the package creator's machine (i.e. /home/creator/.conan/data/Qt/.../package/bin. After downloading the package on the user machine, the path was not changed and it was creating more problems.

@kenfred

kenfred commented Oct 12, 2017

Copy link
Copy Markdown
Author

Yes, the key is that qt.conf contains a relative path and I control where it is placed relative to the qmake executable. From what I read, qt.conf hasn't always supported relative paths, but at least since Qt5 it does - precisely for this reason.

I tested it on other machines. Previously pre-built Qt libs wouldn't work because the build machine's path is hardcoded into qmake. Once I made this change, the path is overridden and the Qt package works.

Note, this solution is generally useful any time you want to relocate your Qt installation, not just for packaging. So you could test it by creating yourself a qt.conf with the relative path, then copy your Qt folder to another place, then check to see if it still works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants