JAL-3830 JAL-4160 Remove --noheadless as --gui does this. Simplifies wrapper scripts
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 17 Aug 2023 11:43:26 +0000 (12:43 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 17 Aug 2023 11:43:26 +0000 (12:43 +0100)
help/help/html/features/clarguments-basic.html
help/help/html/features/clarguments-reference.html
help/help/html/features/clarguments.html
help/help/icons/jalview_docs_logo.png [new file with mode: 0644]
src/jalview/bin/argparser/Arg.java
src/jalview/bin/argparser/BootstrapArgs.java
utils/conda/jalview.sh
utils/getdown/bin/jalview.sh

index 7a87602..e2f984f 100644 (file)
   </p>
 
   <p>
   </p>
 
   <p>
-  <em>Important!</em> If you use <code>--output</code> or any other argument that outputs a file, then it will be assumed you want to run Jalview in headless mode (as if you had specified <code>--headless</code>).  To use Jalview with <code>--output</code> and not assume headless mode, use the <code>--gui</code> or <code>--noheadless</code> argument (the order doesn't matter).
+  <em>Important!</em> If you use <code>--output</code> or any other argument that outputs a file, then it will be assumed you want to run Jalview in headless mode (as if you had specified <code>--headless</code>).  To use Jalview with <code>--output</code> and not assume headless mode, use the <code>--gui</code> argument (the order doesn't matter).
   </p>
 
   <h3><a name="format"></a><code>--format</code></h3>
   </p>
 
   <h3><a name="format"></a><code>--format</code></h3>
index dd0bd52..3532af4 100644 (file)
     <tr valign="top"><td><code>&#8209;&#8209;help&#8209;all</code></td><td>Help for all arguments</td></tr>
 
     <tr valign="top">
     <tr valign="top"><td><code>&#8209;&#8209;help&#8209;all</code></td><td>Help for all arguments</td></tr>
 
     <tr valign="top">
-    <td><code>&#8209;&#8209;headless / &#8209;&#8209;noheadless</code></td>
-    <td>Run Jalview in headless (/ or not in headless) mode.  In headless mode, no GUI interface will be created and Jalview will quit after all arguments have been processed.
+    <td><code>&#8209;&#8209;headless</code></td>
+    <td>Run Jalview in headless mode.  In headless mode, no GUI interface will be created and Jalview will quit after all arguments have been processed.
     <br/>
     <br/>
-    If you use a command line argument to specify an output file of some kind (<code>--output</code>, <code>--image</code> or <code>--structureimage</code>) then <strong>headless mode will be assumed</strong>.  If you don't want this behaviour use <code>--noheadless</code> or <code>--gui</code>.
+    If you use a command line argument to specify an output file of some kind (<code>--output</code>, <code>--image</code> or <code>--structureimage</code>) then <strong>headless mode will be assumed</strong>.  If you don't want this behaviour use <code>--gui</code>.
     </td>
     </tr>
 
     </td>
     </tr>
 
index b763a81..7c2e9d5 100644 (file)
   <strong>If you specify an argument for an output file</strong> (one or more of <code>--output</code>, <code>--image</code> or <code>--structureimage</code>) then it will be assumed that you wish to <strong>run in headless mode</strong>.
   </p>
   <p>
   <strong>If you specify an argument for an output file</strong> (one or more of <code>--output</code>, <code>--image</code> or <code>--structureimage</code>) then it will be assumed that you wish to <strong>run in headless mode</strong>.
   </p>
   <p>
-  You can force Jalview to run in graphical mode using the <code>--gui</code> or <code>--noheadless</code> arguments.
+  You can force Jalview to run in graphical mode using the <code>--gui</code> argument.
   </p>
 
   <p>
   </p>
 
   <p>
diff --git a/help/help/icons/jalview_docs_logo.png b/help/help/icons/jalview_docs_logo.png
new file mode 100644 (file)
index 0000000..21f5386
Binary files /dev/null and b/help/help/icons/jalview_docs_logo.png differ
index 2f25978..ec915f5 100644 (file)
@@ -29,8 +29,8 @@ public enum Arg
           Opt.UNARY, Opt.BOOTSTRAP),
   HEADLESS(Type.CONFIG,
           "Run Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed. "
           Opt.UNARY, Opt.BOOTSTRAP),
   HEADLESS(Type.CONFIG,
           "Run Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed. "
-                  + "Headless mode is assumed if an output file is to be generated, this can be overridden with --noheadless or --gui.",
-          Opt.BOOLEAN, Opt.BOOTSTRAP),
+                  + "Headless mode is assumed if an output file is to be generated, this can be overridden with --gui.",
+          Opt.UNARY, Opt.BOOTSTRAP),
   GUI(Type.CONFIG,
           "Do not run Jalview in headless mode.  This overrides the assumption of headless mode when an output file is to be generated.",
           Opt.UNARY, Opt.BOOTSTRAP),
   GUI(Type.CONFIG,
           "Do not run Jalview in headless mode.  This overrides the assumption of headless mode when an output file is to be generated.",
           Opt.UNARY, Opt.BOOTSTRAP),
@@ -93,11 +93,10 @@ public enum Arg
                   + "turn-propensity,\n" + "buried-index,\n"
                   + "nucleotide,\n" + "nucleotide-ambiguity,\n"
                   + "purine-pyrimidine,\n" + "rna-helices,\n"
                   + "turn-propensity,\n" + "buried-index,\n"
                   + "nucleotide,\n" + "nucleotide-ambiguity,\n"
                   + "purine-pyrimidine,\n" + "rna-helices,\n"
-                  + "t-coffee-scores,\n" + "sequence-id.\n"
-                  +"\n"
+                  + "t-coffee-scores,\n" + "sequence-id.\n" + "\n"
                   + "Names of user defined colourschemes will also work,\n"
                   + "Names of user defined colourschemes will also work,\n"
-                 +"and jalview colourscheme specifications like\n"
-                  +"--colour=\"D,E=red; K,R,H=0022FF; C,c=yellow\"",
+                  + "and jalview colourscheme specifications like\n"
+                  + "--colour=\"D,E=red; K,R,H=0022FF; C,c=yellow\"",
           Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
   FEATURES(Type.OPENING, "Add a feature file or URL to the open alignment.",
           Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
           Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
   FEATURES(Type.OPENING, "Add a feature file or URL to the open alignment.",
           Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
index 4b7b180..f51e4c5 100644 (file)
@@ -362,7 +362,7 @@ public class BootstrapArgs
     }
     else if (this.contains(Arg.HEADLESS))
     {
     }
     else if (this.contains(Arg.HEADLESS))
     {
-      // --headless, --noheadless specified => use value
+      // --headless has been specified on the command line => headless
       isHeadless = this.getBoolean(Arg.HEADLESS);
     }
     else if (this.argsHaveOption(Opt.OUTPUTFILE))
       isHeadless = this.getBoolean(Arg.HEADLESS);
     }
     else if (this.argsHaveOption(Opt.OUTPUTFILE))
index c9ec026..995195f 100755 (executable)
@@ -66,21 +66,19 @@ HEADLESS=0
 GUI=0
 HELP=0
 DEBUG=0
 GUI=0
 HELP=0
 DEBUG=0
-for ARG in "${@}"; do
+for RAWARG in "${@}"; do
+  ARG="${RAWARG%%=*}"
   case "${ARG}" in
   case "${ARG}" in
-    "--headless")
+    --headless|--output|--image|--structureimage)
       HEADLESS=1
       ;;
       HEADLESS=1
       ;;
-    "--help")
+    --help|--help-*|--version)
       HELP=1
       ;;
       HELP=1
       ;;
-    --help-*)
-      HELP=1
-      ;;
-    "--gui")
+    --gui)
       GUI=1
       ;;
       GUI=1
       ;;
-    "--debug")
+    --debug)
       DEBUG=1
       ;;
   esac
       DEBUG=1
       ;;
   esac
@@ -174,7 +172,7 @@ fi
 JVMARGS=( "${JVMARGS[@]}" "-DCONSOLEWIDTH=${COLUMNS}" )
 
 if [ "${DEBUG}" = 1 ]; then
 JVMARGS=( "${JVMARGS[@]}" "-DCONSOLEWIDTH=${COLUMNS}" )
 
 if [ "${DEBUG}" = 1 ]; then
- echo Shell running: "${JAVA}" "${JVMARGS[@]}" -jar \""${JARPATH}"\" jalview.bin.Launcher "${ARGS[@]}"
+ echo Shell running: "${JAVA}" "${JVMARGS[@]}" -jar \""${JARPATH}"\" "${ARGS[@]}"
 fi
 
 fi
 
-"${JAVA}" "${JVMARGS[@]}" -jar "${JARPATH}" jalview.bin.Launcher "${ARGS[@]}"
+"${JAVA}" "${JVMARGS[@]}" -jar "${JARPATH}" "${ARGS[@]}"
index 371bfcd..9281be2 100755 (executable)
@@ -41,21 +41,19 @@ HEADLESS=0
 GUI=0
 HELP=0
 DEBUG=0
 GUI=0
 HELP=0
 DEBUG=0
-for ARG in "${@}"; do
+for RAWARG in "${@}"; do
+  ARG="${RAWARG%%=*}"
   case "${ARG}" in
   case "${ARG}" in
-    "--headless")
+    --headless|--output|--image|--structureimage)
       HEADLESS=1
       ;;
       HEADLESS=1
       ;;
-    "--help")
+    --help|--help-*|--version)
       HELP=1
       ;;
       HELP=1
       ;;
-    --help-*)
-      HELP=1
-      ;;
-    "--gui")
+    --gui)
       GUI=1
       ;;
       GUI=1
       ;;
-    "--debug")
+    --debug)
       DEBUG=1
       ;;
   esac
       DEBUG=1
       ;;
   esac