-
Notifications
You must be signed in to change notification settings - Fork 3k
Add QuickLook and Thumbnail provider plugins for macOS #27987
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
base: master
Are you sure you want to change the base?
Conversation
|
@cbjeukendrup can I get a review, when you get the chance? |
|
@benwaffle yes sure, I'll leave some comments asap! Anyway, that's the status update, and I'll let you know when I have any conclusion! |
|
The reason I used it was because the plugins have a dependency on the ZIPFoundation library. If not using SPM we need some way to download it. |
cbjeukendrup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the end, I decided that it's probably okay to leave the CMake code as it is; any change is unlikely to make it less complicated. It might become more robust, but if it already works well enough (also with re-building after changing source files), there is no reason to spend much more time on making it more robust.
I did still find some comments about other things though.
src/engraving/engravingproject.h
Outdated
| public: | ||
| Inject<IEngravingElementsProvider> engravingElementsProvider = { this }; | ||
| Inject<context::IGlobalContext> globalContext = { this }; | ||
| Inject<project::INotationWritersRegister> writers = { this }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This turns out to be problematic, because it introduces a cyclic dependency between the engraving and project/notation modules.
One solution would be to move the pdf creation implementation into the engraving module, and call that implementation in PdfWriter as well as MscSaver::writeMscz.
Another option might be to create an interface class in the engraving module, and implement this interface in some other module. A bit like what's suggested here, as a solution for a similar problem: #27324 (comment). But that interface will have to take EngravingProject and not INotation, and globalContext()->currentNotation() cannot be used, because that only represents the UI state, but there is no guarantee that the engraving project being written is indeed the current notation in the UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...I'm not familiar with the code enough to tell which one is better. What do you think? What's the difference between "notation" and "engraving" anyway? Looks like "engraving" should be buildable separately without Qt? Does PDF creation belong in engraving?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to use QPdfWriter in src/engraving? I guess we won't have PDFs if NO_QT_SUPPORT is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out how to do it without "notation" module. Take a look.
fb886dd to
386eddb
Compare
|
I think codesigning for release builds actually works already because it uses @cbjeukendrup everything looks good from here. What else do we need to get this merged? |
9dfd7f3 to
b77d623
Compare
|
Rebased to fix conflicts; still planning to merge this, but there are still some file size concerns about the embedded PDF. But I'm working on a solution for that myself. |
Resolves: #27136
This PR adds (1) a QuickLook plugin, (2) a thumbnail provider plugin, (3) embeds a .pdf of each score inside the .mscz when saving.
TODO: