IMAGINARY / SURFER

Sources of Java version of SURFER (which uses JavaFX 1.3.1)
http://imaginary.org/program/surfer/
31 stars 6 forks source link

please provide --long-options (at least help and version) #7

Closed jgmbenoit closed 9 years ago

jgmbenoit commented 9 years ago

The final executable might be accept at least the customey --version and --help long options (if possible, compatible with hep2man in view to generate effortlessly a man page).

porst17 commented 9 years ago

Are there best practices regarding the formatting and content of the output of --help and --version? I am currently starting to implement command line switches. Currently, there are none, but this in on my list for a long time already.

jgmbenoit commented 9 years ago

The command line material implemented in jsurf-alggeo is fine, except that it might have a --version long options; see file /src/main/java/de/mfo/jsurf/Main.java . The implementation is built upon org.apache.commons.cli.* material. In the package,jsurf-alggeo, the man page is generated from the --help output with the tool help2man(1). Having a --help (and a --version) output compatible with help2man is a good start as help2man expects customary behaviours. I guess that a simple,basic scheme is needed here, so this approach should be sufficient. Said that, it would be nice if jsurfer-alggeo could support the same options that surfer-alggeo-gtk (which should be renamed surfer-alggeo for consistency). In particular the possibility to feed it with a jsurf script to allow surface visualization and the possibility to hide gallery information: in such a scheme, jsurf-alggeo can be used as surface viewer for Singular.

porst17 commented 9 years ago

Ok, I will do what I can. Certainly, some options of surfer-alggeo-gtk will not make it into jsurfer-alggeo. I will make it possible to load jsurf script, switch to full screen etc. But the UI is pretty much hard-coded for exhibitions and there is no easy way to hide the galleries. As I said before: I hope that these things are changed in the OpenJFX version. Unfortunately, this project has very low priority in the project we currently get our funding from.

jgmbenoit commented 9 years ago

Having the possibility to load jsurf script is far more important than the Gallery hiding.

porst17 commented 9 years ago

I am thinking about how to add the --version functionality to SURFER. For jsurf, I implemented it via manifest attributes, which is the default in the Java world.

However, jsurf is self-contained, while SURFER is a collection of several different parts:

The development of SURFER is stalled, more of less, until the new non-JavaFX-1.3.1 user interface arrives. Hence, almost all updates are to the galleries (which are of major importance in exhibition setups). And I usually just update the version number in https://github.com/IMAGINARY/SURFER1-installer/ if a gallery is added or updated. This way, I avoid the recompilation and copying of JFXSurfer.jar, if it has not changed at all.

This approach seems to be infeasible if I put the version number into JFXSurfer.jar. I would need to build and upload the blob to https://github.com/IMAGINARY/SURFER1-installer/tree/master/libs for every tiny change in the galleries, for example.

How do I solve this? Any ideas?

porst17 commented 9 years ago

I modified the ant build script to put the necessary information into the jar manifest. See also settings.properties. If you don't use the ant script for building SURFER, you have to add the necessary data to the manifest yourself. See the <manifest> tag in build.xml for reference.

jgmbenoit commented 8 years ago

I am afraid that the added material depends on commons-cli version 1.3, which is not available in Jessie stable: this material must be downgraded to commons-cli version 1.2 . I will apply a patch.