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

build: Add QuickPlot into QML GUI #1963

Merged
merged 53 commits into from
Sep 4, 2024
Merged

build: Add QuickPlot into QML GUI #1963

merged 53 commits into from
Sep 4, 2024

Conversation

rprospero
Copy link
Contributor

@rprospero rprospero commented Aug 5, 2024

PR is a minimal proof of concept adding the plotting library from QuickPlot into the Dissolve QML GUI. Using the Qt Plugin system, we can import both the QML and C++ components of the library.

We load QuickPlot through a git submodule, which I suspect will break a load of the CI. There's also several changes that need to be made before this could be considered for merge. However, I wanted to put the code out in front of everyone to ensure that people are happy with how this works.

Necessary Changes

  • Ensure that the new GUI builds on all platforms
  • Prevent Quickplot demo executable from being built
  • Pick a better qrc folder for QuickPlot folder
  • Use qt_add_qml_module for dissolve gui qml

@rprospero rprospero changed the title Add QuickPlot into QML GUI build: Add QuickPlot into QML GUI Aug 5, 2024
@rprospero rprospero marked this pull request as ready for review September 3, 2024 08:33
Copy link
Member

@trisyoungs trisyoungs left a comment

Choose a reason for hiding this comment

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

Two comments to address, but otherwise looks good.

Comment on lines 48 to 62
git submodule update --init --recursive
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git rm .gitmodules

cp -r QuickPlot QuickPlot.bak
rm -rf QuickPlot.bak/.git
git rm -r QuickPlot
git commit -m "Kill submodule"

mv QuickPlot.bak QuickPlot
git add QuickPlot
git commit -m "Resurrect submodule"

nix --version
Copy link
Member

Choose a reason for hiding this comment

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

Is this testing, or a workaround? If the latter, may we a comment as to why it is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a work around for something that appears to be a very specific nix bug. I've added comments to the file explaining the nature of the problem.

@@ -44,11 +44,11 @@ runs:
path: ${{ runner.temp }}/qt

- name: Install Qt
if: ${{ steps.cache-qt.outputs.cache-hit != 'true' }}
# if: ${{ steps.cache-qt.outputs.cache-hit != 'true' }}
Copy link
Member

Choose a reason for hiding this comment

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

Fantastic. If we no longer need Qt caches for Windows and OSX then we can ditch the "Retrieve Qt Cache" step prior to this one, although I understand if you want to leave this for a follow-up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly, this was just a testing issue that leaked through. I had to temporarily disable the cache because I was changing the Qt install and it kept loading the cached version. It will build without the cache, but we might get into issues with too many downloads, so it's better to keep it cached.

@rprospero rprospero merged commit f48d284 into develop Sep 4, 2024
11 checks passed
@rprospero rprospero deleted the QuickPlot branch September 4, 2024 13: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.

3 participants