-
Notifications
You must be signed in to change notification settings - Fork 488
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
Plugin installer #1457
Plugin installer #1457
Conversation
@leamas |
Don't be ;)
Not that I'm aware of.
Right, note however opencpn-radar-pi/radar_pi#117 Vi hörs... /a |
Leamas, Also I believe Bdbcat said that the new system should be compatible or mesh with the existing. I thinkk it It would be best to have a script for creating windows installer.exe with appveyor in your PR's. Then users that don't have the new version of O will still have the windows installer.exe to use. I hope this does net seem too demainding, since all the plugins presently have that capacity. |
Really? IIRC, the .exe files are still produced. More important, that discussion should take place in some of the plugin PR, e. g., radar_pi. Please continue discussion on that subject there. |
Just to finish the discussion in this PR: The plugin PRs I have made does include the same artifacts as before, including the .exe packages. |
Then, I guess merging the changes will be ok because we can continue deploying manually as before while necessary. |
Hi, Thank you for working on this! Tried building this on desktop Linux (Arch...), cmake does not run cleanly. I'm sorry to always bring build system issues:
This is at commit How would I install the binary flatpak version for testing? Building it needs deps that would be too complex for today. |
Oops... I didn't see that coming. Could be related to faulty or missing lsb_release. What does |
Yes... I need to publish that in a better, flatpakish way. Thanks for reminder, stay tuned. |
Hi, |
OK, great. And thanks! I have added those issues to the #1457 (comment) initial comment -- trying to keep things stable while we are testing. Now, the PR builds and that's good. Does it work for you i. e., can you install and uninstall the supported plugins? |
I have added flatpak instructions to the initial comment: #1457 (comment) |
@leamas |
Thanks for taking time to test!
It's already installed -- it's the file ocpn-plugins.xml, in the same directory as the opencpn executable. As you can see the install window lists the four supported plugins which looks ok. It is possible to regenerate ocpn-plugins.xml, see plugins/README.md.
This should reflect that you have already installed these plugins as packages, right? In this case the installer treats them as read-only entities which cannot be changed. TL;DR If you already have installed oesenc_pi and radar_pi as regular packages everything looks OK. |
Installed binary from Flatpak on Arch Linux - success! (needed to tweak GPG things first, since missing the correct keys for the repo. OpenCPN runs and installing & reinstalling oesenc 1.2.0 and squiddio 0.7.1 worked trivially. Reinstall and Uinstall all work fine! Wishes/notes on the GUI - these are ideas for future:
But this will using plugins much easier! This will help especially on mobile. Thank you for the great work :) |
oops... will update flatpak instructions in initial comment.
Yes, I think so since other alternatives includes Upgrade and Downgrade. Perhaps it's just a confusing window title?
Yes... But then again, what should the new title of the Install new plugins window be? EDIT: And there is actually some sound logic here: The original window operates on the list of installed plugins (hence Uninstall), the new window operates on the available list of downloads representing Install, Upgrade or Downgrade depending on what's actually installed. |
Perhaps:
But this is all trivial fixes. It might make sense to get the large part merged and then work on the smaller tidying up in separate PRs. |
Yes! Making a note in initial comment.
So far, there is no input whatsoever from the maintainers. I plan to do at least one more clean-up cycle, trying to play it safe. But it really depends if testing reveals something requiring larger fixes. Thanks again for your time & efforts! |
@leamas |
yes... I've been thinking in similar paths. Basically, the first step would be to publish new versions of ocpn-plugins.xml and provide means to install it. That should be easy to use and not that hard to maintain. Besides this there are two issues: how plugins are created/built and how they becomes available in opencpn. As for the first part, plugins are not available until there is a xxx-plugin.xml available which also means that the corresponding tarball is available on the web. As of now, this is only true for my four forks. I have submitted PR:s to the plugin upstreams, some have made some progress but there is still none ready to provide usable plugins in this context. I cannot see any way around this, it's work to be done in each plugin and it will take some time. As for the second part it falls into two directions. The first is to make it easier to regenerate ocpn-plugins.xml. This requires that we distribute plugins/metadata and plugins/icons with the program and also adds scripts which supports the process better, not least on windows. Another direction would be to drop the idea of a single xml file and instead just have a number of xml files, more or less the same as plugins/metadata. If so, users could just modify or drop a new file into the directory to make it available. It's not a technical problem, it's more how we want things to work -- Dave has expressed some interest in having a degree of control of the "approved" set of plugins so to speak. Thoughts? |
Will add to initial comment "open issues". Probably a single copy-paste error in squiddio-plugin.xml.in. Good catch! |
Drawing from Chartdownloader plugin user experience, it is like updating the "catalogue" but in this case I guess it is small enough to be automatic. Should there be a message that the ocpn-plugins.xml database was updated? Not only think of adding plugins, but perhaps also removing them for various reasons, as they have not been updated yet during a major upgrade in wxWidgets for example. Which leads to the desire to keep the old ocpn-plugins.xml for the previous version intact and useable, and to start a new xml file for the new Opencpn Version. Therefore I think there should be an additional designator for ocpn-plugins. ...perhaps Plugin API? |
@Hakansv: All this said: Does it work for you? |
It's not that I have any problems with this as such, on the contrary. But to be meaningful such a change needs input from the project maintainers -- it's really about defining the process for the approved set of plugins. |
Check in ocpn-plugins.xml directly into the git repo. Sources and tools to create new one lives in the new plugins project.
Thou shall always merge your fixes before push...
The freedesktop specs at https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html specifies that data should be searched from XDG_DATA_PATH in addition to XDG_DATA_DIRS. XDG_DATA_PATH is hardcoded to the XDG default value ~/.local/share.
Very nice and understandable. |
Rebased to current master |
This is a reboot of the previous PR #1390, an extension of the current plugin manager supporting downloading, installation and updates of Opencpn plugins.
As of now the oesenc, radar, squiddio and bsb4 plugins are supported.
The user interface is basically about some fixes to current plugins window:
https://user-images.githubusercontent.com/405541/61213252-c6e33e80-a704-11e9-9970-44946c6202dc.png
And a new window to install/update plugins:
![download-plugins](https://user-images.githubusercontent.com/405541/69497636-becfb280-0edf-11ea-9c0c-14f4bb1a39ce.png)
The interface as well as the overall installer is feature complete after adding catalog maintenance design, backend and UI. Se also the catalog project at https://github.com/opencpn/plugins.
The installer is written based on that we should support Debian, flatpak, Windows and MacOS builds. Flatpak packaging is part of this PR as well as fixes to make the mingw build chain.
New builds from this PR is available on https://cloudsmith.io/~alec-leamas/repos/opencpn/packages/. Flatpak can be tested using
The initial flatpak download is huge, ~400Mb. Subsequent updates weighs in at about 40 Mb.
More info:
I have made basic testing on all platforms. @rgleason has been extremely active and helpful with windows testing. Of course, I am interested in all kinds of feedback: reviews, testing etc.
EDIT: Known issues:
See Plugin installer #1457 (comment) Patches welcome...
EDIT : Fixed issues:
There is no way to dynamically load plugin icons. Plugin icons must be known "in advance" fop opencpn to display them. Fixed by introducing new metadata in RFE: Add dtd and possibly xsd metadata definition. plugins#10 (implementation is not imminent).
An XSD file for the XML metadata is missing. Filed as RFE: Add dtd and possibly xsd metadata definition. plugins#10
The squiddio example plugin contains wrong installation paths. See
Plugin installer #1457 (comment). Actually,
it seems that all four example plugins differ from the docs in the same way.
Fixed by doc update, reflecting current usage.
cmake fails without proper error message on linux if lsb_release is not available.
Fixed in [272dda4]
Newer linux distros might need to apply Handle Pango >=1.44 Harfbuz dep (Closes: #1453). #1458 to handle missing harfbuzz library [WONTFIX]
The flatpak download is too big due to bundled debug info. Fixed in [c4b6cfc]
The new window should be titled *Manage Plugins", not Install new plugins.
This opens for. Fixed in [9c3c08d]moving the Uninstall button to the new window
Copy-paste errors in ocpn-plugins.xml (?) as of Plugin installer #1457 (comment). Fixed upstream: plugin.xml.in: Fix copy-paste error. mauroc/squiddio_pi#38
Better support for regenerating ocpn-plugins.xml: bundle required sources, add scripts.
Fixed in [09c7d1a] and [632bdd3]
A way to update the plugin catalog has been implemented. See
https://github.com/OpenCPN/plugins/