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
Allow easier running, stopping, logging of OpenRefine #3221
Comments
These sound like two different features. Is there a reason to couple them together? |
I really agree we need both of these things, but they should be distinct issues indeed.
|
Added note in Alternatives considering and Additional Context from @timClicks about using Rust to possibly make things easier for all 3 platforms support. |
I personally, really like what I see (and wonderful docusaurus docs) with Tauri...which is similar to Electron in some ways. His video is also pretty cool here: https://tauri.studio/en/docs/about/intro 1 thing that he does bring up in the video which I never knew is that if we used Electron to build a mini-app to run and manage OpenRefine...we would be non-free since Electron uses Chromium which contains Widevine and is non-free and must be removed with makefile options. And Electron also has weird un-compliant license headers within it. |
Add note in original comment about Tauri's capability to bundle the app as a |
@wetneb I'm looking to fund this and have Tauri folks help me with it. I talked with them at length today. From @nothingismagick (Denjell)
They've reviewed our architecture lightly and these requirements and are willing to put in the time where I'll make a large 1 time donation to them with my own funds. It will be cross platform for Windows, Linux, Mac. I'd love to host the 1st review session with you, me, and them, anyone else who wants? Just to ensure we are all clear and have a good idea of the MVP detailed here for all 3 platforms that's extendable in the future for OpenRefine 4.0+. Thoughts? |
Just a heads up, gnome engineers are probably removing rhe system tray entirely, and app menus too. https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/App-Menu-Retirement |
Thanks for the notification @nothingismagick! The link you posted is about app menus, which does not seem to affect those plans much, but I would be interested about more pointers about the system tray. @thadguidry I had a quick look at Tauri and it seems to be an alternative to Electron. I think this is not what this issue is about: having a more convenient launcher (without having to use the terminal), but still accessing OpenRefine via your browser. Concerning packaging, it's nice that Tauri comes with packaging features, but we can find similar features in other tools. For instance, the Deb package generation feature will not produce something suitable for integration in official package repositories (since it bundles up everything without packaging dependencies individually). |
@wetneb I pinged @lucasfernog (member of Tauri) who's actually hacking on some of it at this moment, to step into this issue and reply to you on those points to get clarity. |
Tauri does not "bundles up everything without packaging dependencies", the Deb can specify Linux dependencies and only includes the Tauri binary and frontend assets (including the server, webapp and OpenRefine would still be accessed on the browser, the Tauri launcher is just a helper. Of course you can get the same functionality using another tools, but with Tauri you don't need to deal with all the cross platform stuff, most of the work is already implemented. I've managed to get a prototype running in a couple hours, and I suspect it would take a least a week to get tray/menu/UI working on all three platforms and bundle them with Windows installer / macOS .dmg / Linux packages. It also helps you with code signing. |
That sounds perfect then! Looking forward to it :) |
@wetneb Do we need to worry about Freexian at this point, whose helping us on other matters with the Debian packaging? I guess I'll let you sort those things out (head's spinning). Good Night. |
Again I don't know Tauri at all but even if it can be configured to rely on pre-packaged dependencies I suspect it would be still quite hard to use it to produce a package for Debian's official repository. For instance because Tauri itself would need to be packaged for Debian first, since it would become a build dependency of OpenRefine (but maybe I am also wrong on this and @lucasfernog knows of official Debian packages made with Tauri?). And even if it actually became suitable to produce such a package, that would not make Freexian's work useless, since a big part of their work actually went into packaging our dependencies first… |
Tauri does not have a Debian package since it's just a Rust library that depends on WebKitGTK (and Tauri automatically adds that and GTK as a Debian dependency). |
Sorry I thought I posted both links, here you go: https://blogs.gnome.org/aday/2017/08/31/status-icons-and-gnome/ |
@wetneb Hi Antonin, @lucasfernog and @nothingismagick have sent you and I (email from GitHub) the access to his private repo to review the preliminary "startup app" (we need a better name eventually for our docs, lolol). I chatted briefly with them today on Discord direct message, but this probably needs a call just to ensure you are comfortable and can ask questions. Can you set something up for all of us? I can't do this without your keen eyes. |
The app only supports Linux and Windows so far because I saw on the website only a DMG installer for Mac - does it also have a bash script like Linux? That would be easier to manage. |
The bash script that we recommend for Linux can actually also be used on Mac. The DMG gives a better UX because people don't have to use the terminal to start the app. |
@wetneb Hi Antonin, it looks like first creating a new separate repo for us would be ideal to hold the |
The prototype is here: https://github.com/OpenRefine/openrefine-tauri |
@nothingismagick We'd like you to clarify the license as BSD-3 for the tauri code ya'll contributed. Can you offer a PR which makes that change for us in our new repo for it? |
Asked @lucasfernog in a new PR for accepting MIT license with his name as copyright holder in the prototype repo. |
The OpenRefine project has funding available to work on this. Do you know someone who would be able to get this fixed? Send them our way! |
@HanSolo Do you think you might be interested in helping us build a small JavaFX app launcher? We have funding, see comment above. |
We want to make running and stopping easier for OpenRefine on Windows and Linux (we assume MacOS is good enough for now).
Proposed solution
Windows
On Windows, allow running OpenRefine as a native application, possibly with tray icon support (without displaying the console by default).
The MVP for the application would be:
Linux
TODO: On Linux, allow running OpenRefine as / with ???
MacOS
Nothing to do ?
Alternatives considering
@dante9992 also mentioned that Tauri also supports system tray icon on Windows and can do app signing, self updating, toast notifications, etc. It also allows the app to be packaged as a .deb (Debian package) file. @thadguidry asked and paid for the Tauri team (see comments below) to put together a prototype with Tauri and Rust with code now stored here: https://github.com/OpenRefine/openrefine-tauri
@timClicks said to me on Discord that we could just use Rust and Druid or maybe Relm
some very hacky Launch4j opensource wrappers that are not 100% ideally compatible with Windows 10. (they were mostly coded and made for pre Win8.1 OS and no longer sufficient)
Electron - has some non-free issues (see comment below)
Additional context
JAVA
From what I read so far, not entirely sure if AWT is really needed for SystemTray support (it was in JavaFX 8). Newer OpenJFX 11 or 15 might not need AWT at all, dunno. But just in case, here's some good info I found about showing/hiding the application when clicking the systray iconhttps://javafxpedia.com/en/knowledge-base/12571329/javafx-app-in-system-tray
One of the nice things about using a library like FXTrayIcon below is that it hides AWT / Swing complexity, since AWT is still necessary for System tray support on OS's, unfortunately.
JavaFX might be a nice way to optionally allow running OpenRefine on all 3 OS's, Linux, MacOS, Windows.
GlucoStatusFX (which has nice source code to follow along) uses JavaFX and the FXTrayIcon library which allows it to run the application in the system tray of Windows and MacOS. The system tray feature, however, doesn’t work on all Linux distributions. In that case, the application is available through the dock. Which is likely a perfect balance for our Linux users.
Oracle provides a very useful guide for Self -Contained Application Packaging that covers Windows, Linux, Mac
https://docs.oracle.com/javase/10/deploy/self-contained-application-packaging.htm
OpenJFX has wide community support now and can be utilized to code a small JavaFX application that runs OpenRefine from a system tray utilizing a library like FXTrayIcon.
OpenJFX Intro: https://openjfx.io/openjfx-docs/#introduction
OpenJFX Wiki: https://wiki.openjdk.java.net/display/OpenJFX/Main
RUST
Even though Rust provides a way to handle system tray and a WebView, it's likely much more approachable for our existing contributors & core team to instead leverage JavaFX which can also use WebView and all the bells and whistles such as CSS, Canvas, etc. Still, below are some Rust references for the daring:
Iced
https://github.com/hecrj/iced
Druid
https://raphlinus.github.io/rust/druid/2020/09/28/rust-2021.html
https://github.com/linebender/druid/tree/master/druid
https://linebender.org/druid/
https://docs.rs/druid/0.7.0/druid/
Relm
https://github.com/antoyo/relm
Tauri
https://tauri.studio/en/
https://github.com/tauri-apps/tauri
https://tauri.studio/en/docs/usage/guides/visual/system-tray
The text was updated successfully, but these errors were encountered: