Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: fix qt plugin installation #3216

Merged
merged 6 commits into from
May 2, 2018

Conversation

ctrlaltca
Copy link
Contributor

@ctrlaltca ctrlaltca commented Apr 27, 2018

Short roundup of the initial problem

During the "install" step, cmake installs all the Qt plugins required at runtime by the applications.
Each application needs a different set of plugins (eg. cockatrice needs to be able to load different image formats, while servatrice doesn't but needs to be able to connect to a mysql server), and installing them all means to waste space and time.

With recent Qt versions, the regexp we used to filter only the needed plugins doesn't work anymore as expected, and was basically installing the whole plugins/ directory (336MB) on each application.

The current cockatrice release is still using Qt 5.5, so is not affected by this problem. This of this PR as some preliminary work to be able to update Qt on macOS in the future.

What will change with this Pull Request?

  • The plugins filter rules have been rewritten to work both for old and new Qt versions;
  • the Travis compile script has been modified to include the make install step under macOS for debug builds, so that we can see what libraries/frameworks/plugins are picked up by cmake;
  • some folder names have been fixed in CMakelists.txt; macOS normally uses a case-insensitive file system, but better be precise than sorry;
  • some unnecessary trailing whitespace has been removed from CMakelists.txt.
  • EDIT Qt 5.10.1 seems to have fixed the long-standing bug that forced us to use an old Qt version (see OSX: Keybinds disabled after sideboard #2490); i've then re-enabled usage of the current Qt version, so that we can get a proper build created and more testing from other people

Screenshots

not really a screenshot, but here's a log including the make install details showing that not all the plugins are being installed:
https://travis-ci.org/ctrlaltca/Cockatrice/jobs/372043082#L7642

The qt homebrew formula now installs three qt* symlinks (qt, qt5, qt5@5.x) so we can't use/don't need bash globbing anymore
@ctrlaltca ctrlaltca requested a review from ZeldaZach May 2, 2018 15:54
Copy link
Member

@ZeldaZach ZeldaZach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no inherent issues. Seems like it should work as expected after testing the make build

@ZeldaZach ZeldaZach merged commit 2780270 into Cockatrice:master May 2, 2018
@ctrlaltca ctrlaltca deleted the osx_cmake_qt_plugins branch May 4, 2018 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants