Separate GUI sources from core sources #9701
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR splits the GUI source files from the core source files. The immediate goal is to allow the CLI to require only a minimum number of dynamic libraries. The long term goal is to create an architectural boundary around the core module, in preparation of libkdbx.
The only real challenge in this PR was to deal with the network related modules. I ended up creating a
networking
directory and moving all the network related modules fromcore/
in there.In the future, I think we could move all the core code directly into the
core/
folder, and create aCMakeLists.txt
specifically for that folder.I tested mainly with
WITH_XC_ALL=ON
to make sure most of the cmake code was triggered.Before the changes:
Basically, the CLI was using exactly the same dynamic libraries as the GUI, plus
libncursesw
andlibreadline
.After the changes:
There's still a bunch of libraries that the CLI is linking against for reasons that I don't understand, like
libQt5Gui
. This might be included inQt5::Core
, but I'm not sure.Testing strategy
unit tests and launched the GUI and CLI apps as a smoke test.
Type of change