-
Notifications
You must be signed in to change notification settings - Fork 37
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
Consider packageing Pattypan with JPackage to enable installation without user installed Java/JVM #152
Comments
Hi, I'm working in a national public agency for bibliographic data in France and we are very interested by the plugin Pattypan to realize massive uploads of images in Wikimedia Commons.
We are particularly interested by the .exe version of the standalone binaries you could create, because all the libraries of our partnership are under Windows. Do you think you will be able to work on this issue during the next few months or do you consider other issues / other works you have as higher priorities ? Anyway, thanks for this issue and keep me in touch if you make progress on it, Etienne |
Just to complete my first comment, a former colleague told me about launch4j to package Pattypan and to create the .exe standalone binary we need. Etienne |
Hi @ENOAbes! I have personally no plans to work on this in the near future. I would, however, happily review contributions from others in case you find someone who can work on this. |
Hi @Abbe98 and hi everyone, The direction of my agency said it would be possible to pay someone to package Pattypan. We always need a .exe version of the plugin to allow our partners to use Wikimedia Commons in an efficient way. So if you are interested or if someone of the Wikimedia Commons community is interested, you could contact me here or directly on my mailbox : [email protected] Thanks a lot ! |
@ENOAbes I will share this in my network and with some developers I know! |
If you do not find anyone, I can be a fallback. I have some experience with launch4j since we use it in OpenRefine too :) |
Wikimedia Sverige will work on this. Specifically we will be making a stand alone executable for Windows as @ENOAbes describes. I'll do most of the development and will update here when we have something of interest. |
Here's a progress report before the holidays. I've looked a few different ways to bundle Java runtime with Pattypan. Most of these created an installation file, i.e. a file that the user would download and run to install Pattypan somewhere on the computer, along with Java runtime. At least one tool could create an EXE that could be run without installing, but that could not include Java runtime, which would have to be downloaded separately and placed next to the EXE. Since Abes wanted a program that could be run without installing, none of these would work. When I looked a bit wider (not just for Java specific tools) I found that you can create self-extracting archives with 7-zip. You can specify what command to run inside the archive when it's executed, so if you include both Java runtime and a Pattypan JAR you have everything you need to run Pattypan. What happens when you run the EXE is that its contents is unpacked to the user's temporary directory and run there. Since there is no persistent installation this is done every time. The EXE has been tested on Windows by @lokal-profil and can be found over at https://github.com/sebastian-berlin-wmse/pattypan/releases/tag/release-test. I ran into some weird errors during development, but that is likely due to running Windows in a, as it turns out quite unstable, virtual machine. If anyone wants to test it and encounters anything strange, let me know. There are a few rough edges still, but nothing that causes any actual problems:
If there is still time after we established that everything works we'll have a look at these. I've used Github actions to create the EXE. These should be usable on this repo to automatically build the EXE when a new release is made. Building a JAR is part of the process, so that can also be saved as an asset. Some changes needs to be made to include the JavaFX dependencies (these are bundled in the EXE with the Java runtime). If we want to switch Ant to something else, we should be able to keep most of the workflow and just change the JAR build action. If you want more (technical) information on the development and decisions here are the relevant Pahbricator tasks: https://phabricator.wikimedia.org/T323119 and https://phabricator.wikimedia.org/T323121. |
Hi,
Thank you for your report, I’m on holidays tonight, so I don’t have time to read it carefully, but we will answer you during the first or second week of january anyway.
Thanks a lot and we write you soon,
Best for the end of this year,
Etienne
|
You should be able to find it over at https://github.com/sebastian-berlin-wmse/pattypan/releases/tag/release-test |
Thank you for the link. I didn't realise you had to be logged in to visit the other one. I've updated the original comment. |
The EXE seems to work well enough that it could be added to upstream. @Abbe98, I made a PR for the changes, #173, do you think you can merge it? I had to do a bit of fiddling to get the action to work when I last merged it. I don't think actions are added automatically just because you add YAML files for them and I ended up making a branch with an empty action and then adding the changes. Maybe you have more experience with Github actions. If there are any questions let me know🙂 |
@sebastian-berlin-wmse thank you! I will make a review. Regarding Github Actions I'm not sure it's the path we want to go through as I would like the process to be easily reproduced locally. I'm also using all my free Action minute and mores as a part of other projects... |
The problem with creating the EXE locally is that you need to have the same OS as the result should be run on. At least I couldn't find any way to create a Windows executable on Linux. Github takes care of that. If you want to create an executable (on Windows) I guess you can follow the same steps as the action does. Not sure if there's a simple way to make a script from the action file or if you'd need to duplicate that. There may also be Github specific things that would need to be replaced, like getting various bits of Java from other places. |
We should consider creating standalone
.exe
(Windows),.dmg
(MacOS),.deb
/.rpm
(Linux) binaries so that users of Pattypan do not need to have Java installed.Things to consider:
The text was updated successfully, but these errors were encountered: