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

Try replacing this project with ijp-imagej-launcher #92

Open
ctrueden opened this issue Jul 31, 2023 · 3 comments
Open

Try replacing this project with ijp-imagej-launcher #92

ctrueden opened this issue Jul 31, 2023 · 3 comments

Comments

@ctrueden
Copy link
Member

The ijp-imagej-launcher project by @jpsacha is written in Scala, compiles to a simple native executable, and is much less code than this project. It does not yet recapitulate everything the current ImageJ Launcher can do, but could probably be made to do so, and would be vastly more maintainable than the current codebase.

Here is what @jpsacha wrote to me via email about the motivation for ijp-imagej-launcher:

I went through the C source code of the Launcher. I tried to address my concerns with starting Java and passing command line options. That code looks like layers of patches, not easy to properly fix without significant changes, not clear what you are breaking by fixing. I am not a stranger to C, but that code is very difficult to work with. Honestly, after a couple of attempts, it looked like it would be easier to rewrite. So I tried, as an exercise, to see what it would take to implement the core functionality in a high level language and build a native app for various platforms (Windows, Mac, Linux). Since I got something that was already covering a lot of the original launcher I decided to share it on GitHub. My current code is about 400 lines compared to over 5,000 lines in the original Launcher.

[It would be great] to have a launcher that works, respects command line options that are passed, and can be used on new Macs/Windows/Linux and with new JVMs:)

In my opinion, it would be better to start clean and keep the logic and code clean to get a reliable implementation. You know the code, the history of the launch, and how it is used by others better though.

The launcher needs to be properly integrated with the ImageJ2/Fiji distribution, so it needs to be part of that overall ImageJ effort. If you have funding and resources to fix or rewrite the launcher in C/C++ I will be glad to use that when ready. I can also "donate" what I have in Scala to ImageJ (to make it clear, it is Scala compiled to native executable, no JVM needed). If somebody can help with the Scala version it will be great too.

At the moment I am still planning to complete the first version with features described in ReadMe, plus one more version after that that can read configuration files, as most of the implementation is already done. Testing got a bit delayed as I am switching computers. The Mac executable is ready. Had some issues with the native compiler on Windows that should be resolved now.

The question is just whether all needed existing features can successfully be wrapped into the new codebase, but I suspect the answer is yes.

@mkitti
Copy link
Collaborator

mkitti commented Jul 31, 2023

My only minor complaint is that it is in a Scala dialect.

@jpsacha
Copy link

jpsacha commented Aug 21, 2023

@mkitti it is not a dialect of Scala. It is a standard mainstream Scala, compiled to a native binary.

@jpsacha
Copy link

jpsacha commented Aug 21, 2023

@ctrueden

The question is just whether all needed existing features can successfully be wrapped into the new codebase, but I suspect the answer is yes.

To be more precise, the question to answer is: which existing features are actually needed going forward?

The just released version 0.2.0 added some key features needed for drop-in replacement, for instance, now it supports installing Fiji in macOS Application folder. Currantly supported features are described in Readme/Features. Next version will add ImageJ1 and ImageJ.cfg support.

It will be helpful to have some documentations what are the features of the current launcher that are important to be preserved going forward.

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

No branches or pull requests

3 participants