<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=OPTION</id>
	<title>OPTION - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=OPTION"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=OPTION&amp;action=history"/>
	<updated>2026-09-26T21:16:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=OPTION&amp;diff=817&amp;oldid=prev</id>
		<title>ConvertBot: displays or defines an option tree path</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=OPTION&amp;diff=817&amp;oldid=prev"/>
		<updated>2020-04-27T22:05:07Z</updated>

		<summary type="html">&lt;p&gt;displays or defines an option tree path&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;displays or defines an option tree path&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;NAME&amp;gt; - Name of the option tree (or * to define all under specified path)&lt;br /&gt;
&amp;lt;PATH&amp;gt; - Path to the named option tree (or physical path when /CREATE&lt;br /&gt;
         is used and OPT.name is a link)&lt;br /&gt;
&lt;br /&gt;
This command is used to define a NeXtMidas option tree path. Option trees in&lt;br /&gt;
NeXtMidas are implemented using Java packages. The root package name is &amp;quot;nxm&amp;quot;,&lt;br /&gt;
followed by the &amp;quot;option name&amp;quot;, and then functional subdirectories. Use the&lt;br /&gt;
/CREATE switch to create a new option tree (see below).&lt;br /&gt;
&lt;br /&gt;
When OPTION is used with no arguments, it lists all configured option trees.&lt;br /&gt;
When used with just &amp;lt;NAME&amp;gt; it shows the location of the named option tree&lt;br /&gt;
(see below for examples).&lt;br /&gt;
&lt;br /&gt;
NOTE: The association of an option name with a particular path lasts only&lt;br /&gt;
as long as your NeXtMidas session.  When you log in the next day, that mapping&lt;br /&gt;
will be gone.  Therefore, OPTION &amp;lt;optname&amp;gt; &amp;lt;path&amp;gt; definitions which are&lt;br /&gt;
intended to be permanent are usually put in the user's %nmstartup macro.&lt;br /&gt;
&lt;br /&gt;
Option trees are typically set up in the user's nmstartup.mm macro, for example:&lt;br /&gt;
    startmacro&lt;br /&gt;
      option ice &amp;quot;/user/xmopts/ice279/&amp;quot;&lt;br /&gt;
      option geo &amp;quot;/user/geo100/nxm/geo/&amp;quot;&lt;br /&gt;
      path set ice geo&lt;br /&gt;
    endmacro&lt;br /&gt;
&lt;br /&gt;
Option trees located under $NMROOT/nxm or with a link from $NMROOT/nxm/&amp;lt;opt&amp;gt;&lt;br /&gt;
(see below) are automatically added to the list of options and can be viewed&lt;br /&gt;
using OPTION with no arguments.&lt;br /&gt;
&lt;br /&gt;
REQUIRED DIRECTORY STRUCTURE&lt;br /&gt;
----------------------------&lt;br /&gt;
  The Java package facility requires the source file directories to mirror the&lt;br /&gt;
  package naming scheme. The option path must point to a directory that contains&lt;br /&gt;
  an &amp;quot;nxm&amp;quot; directory with a directory below this MATCHING the option name.&lt;br /&gt;
&lt;br /&gt;
  The recommended approach is to create a base directory to hold all application&lt;br /&gt;
  required option trees under an &amp;quot;nxm&amp;quot; directory structure outside $NMROOT.&lt;br /&gt;
  Creating your option trees in a separate directory will allow you to easily&lt;br /&gt;
  upgrade and/or switch NeXtMidas versions without having to modify anything&lt;br /&gt;
  under the NeXtMidas baseline. For example:&lt;br /&gt;
  /path/to/nmopts&lt;br /&gt;
    +- nxm&lt;br /&gt;
    |   +- myopt&lt;br /&gt;
    |   |  +- cfg&lt;br /&gt;
    |   |  +- mcr&lt;br /&gt;
    |   |  +- prim&lt;br /&gt;
    |   |  +- test&lt;br /&gt;
    |   +- coolapp&lt;br /&gt;
    |   |  +- cfg&lt;br /&gt;
    |   |  ...&lt;br /&gt;
    |   +- yetanotheropt --&amp;gt; ../yetanotheropt102&lt;br /&gt;
    |&lt;br /&gt;
    +- yetanotheropt102   (version 1.0.2 of user option tree)&lt;br /&gt;
    |   +- cfg&lt;br /&gt;
    |   ...&lt;br /&gt;
&lt;br /&gt;
    Then define the above option trees:&lt;br /&gt;
    nM&amp;gt; option myopt         /path/to/nmopts/nxm/myopt&lt;br /&gt;
    nM&amp;gt; option coolapp       /path/to/nmopts/nxm/coolapp&lt;br /&gt;
    nM&amp;gt; option yetanotheropt /path/to/nmopts/nxm/yetanotheropt&lt;br /&gt;
               ^^^^^^^^^^^^^                     ^^^^^^^^^^^^^&lt;br /&gt;
    ** Notice how the &amp;lt;optname&amp;gt; must match the directory basename **&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Another approach on Unix is to have a symbolic link from $NMROOT/nxm/&amp;lt;optname&amp;gt;&lt;br /&gt;
  to the base directory of the option tree (this is the recommend approach on&lt;br /&gt;
  Unix since most IDEs will find these option trees automatically). For example:&lt;br /&gt;
       $NMROOT&lt;br /&gt;
         +- nxm&lt;br /&gt;
             +- myopt --&amp;gt; /home/smith/myopt123&lt;br /&gt;
             +- sys &amp;lt;existing&amp;gt;&lt;br /&gt;
             +- ucl &amp;lt;existing&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       /home/smith/myopt123&lt;br /&gt;
                    +- cfg&lt;br /&gt;
                    +- prim&lt;br /&gt;
                    +- mcr&lt;br /&gt;
&lt;br /&gt;
  On Unix systems, this may be a also be done via a &amp;quot;backlink&amp;quot;, pointing back to&lt;br /&gt;
  the top of the tree branching off to the areas inc/lib/cfg/prim/etc (this&lt;br /&gt;
  approach is STRONGLY DISCOURAGED and WILL CAUSE ECLIPSE, JBUILDER, ETC. TO&lt;br /&gt;
  CRASH). For example:&lt;br /&gt;
       /home/smith/myopt123&lt;br /&gt;
                    +- nxm&lt;br /&gt;
                    |   +- myopt --&amp;gt; ../ &amp;lt;recursive link&amp;gt;&lt;br /&gt;
                    +- cfg&lt;br /&gt;
                    +- prim&lt;br /&gt;
                    +- mcr&lt;br /&gt;
&lt;br /&gt;
  On Windows (which does not have symbolic links prior to Windows Vista and the&lt;br /&gt;
  mklink and junction commands) the option tree must be physically located under&lt;br /&gt;
  a nxm directory and have the option tree name as its base. The version.txt&lt;br /&gt;
  file in the option tree's root directory is the only means of identifying the&lt;br /&gt;
  option tree's version number. This approach works on all systems&lt;br /&gt;
  (Windows/Unix/etc). For example:&lt;br /&gt;
       /home/smith/myopt123&lt;br /&gt;
                    +- nxm&lt;br /&gt;
                        +- myopt&lt;br /&gt;
                            +- cfg&lt;br /&gt;
                            +- prim&lt;br /&gt;
                            +- mcr&lt;br /&gt;
JAR FILES&lt;br /&gt;
---------&lt;br /&gt;
  To use a raw Java jar (or directory of classes) with NeXtMidas, simply define&lt;br /&gt;
  the full path name as the option then use the PATH command to add this option&lt;br /&gt;
  to the path. For example:&lt;br /&gt;
      nM&amp;gt; option JYTHON /path/to/jython.jar&lt;br /&gt;
      nM&amp;gt; path add JYTHON&lt;br /&gt;
&lt;br /&gt;
&amp;quot;OPTION&amp;quot; vs &amp;quot;RES OPT&amp;quot;&lt;br /&gt;
---------------------&lt;br /&gt;
  When you use this OPTION command it lists ALL option trees and shows the base&lt;br /&gt;
  directory of the option tree (this is the directory that &amp;quot;cfg&amp;quot; and &amp;quot;prim&amp;quot; are&lt;br /&gt;
  in). The OPTION command also shows any links used (Unix only).&lt;br /&gt;
&lt;br /&gt;
  When you use RES OPT you are shown only the option trees not located under&lt;br /&gt;
  $NMROOT (option trees using a link pointing from $NMROOT/nxm/&amp;lt;opt&amp;gt; to the&lt;br /&gt;
  location of the option tree are considered to be under $NMROOT). Also&lt;br /&gt;
  RES OPT will show the root directory of the option tree (this is the directory&lt;br /&gt;
  that &amp;quot;nxm&amp;quot; is in).&lt;br /&gt;
&lt;br /&gt;
  The reason for this difference is both practical and historical. The OPTION&lt;br /&gt;
  command shows the directory that users will be working in (when you use&lt;br /&gt;
  &amp;quot;nmd . &amp;lt;opt&amp;gt;&amp;quot; this is where you go). Using RES OPT shows the directory that&lt;br /&gt;
  Java needs to use on the classpath (RES OPT excludes option trees under&lt;br /&gt;
  $NMROOT since it is already part of the classpath).&lt;br /&gt;
&lt;br /&gt;
  In general users should only use OPTION to find out where an option tree is&lt;br /&gt;
  located. Macros that need to find the location of an option tree should NOT&lt;br /&gt;
  use RES.&amp;lt;opt&amp;gt; since it does not include all option trees and is not&lt;br /&gt;
  platform-independent (future releases of NeXtMidas may deprecate use of the&lt;br /&gt;
  OPT table). Macro users should use the following for getting directories in&lt;br /&gt;
  an option tree:&lt;br /&gt;
        nM&amp;gt; invoke path nxm.sys.lib.OptionTree.getOptPath(&amp;lt;opt&amp;gt;,&amp;lt;area&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
CREATING TREES AUTOMATICALLY&lt;br /&gt;
----------------------------&lt;br /&gt;
  The /CREATE switch may be used to create the option tree defined by the&lt;br /&gt;
  result parameter OPT.&amp;lt;optname&amp;gt; where tree is the name of the option tree.&lt;br /&gt;
  There are a number of options for creating your option tree ALL of which must&lt;br /&gt;
  obey the Java package naming rule.&lt;br /&gt;
&lt;br /&gt;
  1. Create a new option tree called myopt (this is the recommend approach on&lt;br /&gt;
     Windows and works well on Unix too). This approach also allows you to&lt;br /&gt;
     easily upgrade your NeXtMidas version without having to modify it:&lt;br /&gt;
       nM&amp;gt; option/create myopt /home/smith/myopt123/nxm/myopt&lt;br /&gt;
&lt;br /&gt;
     Creates the following:&lt;br /&gt;
       /home/smith/myopt123&lt;br /&gt;
                    +- nxm&lt;br /&gt;
                        +- myopt&lt;br /&gt;
                            +- cfg&lt;br /&gt;
                            |   +- commands.cnf&lt;br /&gt;
                            +- prim&lt;br /&gt;
                            +- mcr&lt;br /&gt;
&lt;br /&gt;
  2. (Unix Only) Create a &amp;quot;flat&amp;quot; option tree (similar to X-Midas) called myopt&lt;br /&gt;
     with a symbolic link to it from $NMROOT/nxm/&amp;lt;opt&amp;gt;. This  approach is no&lt;br /&gt;
     longer recommended since it requires you to create a symbolic link under&lt;br /&gt;
     the NeXtMidas baseline (under $NMROOT/nxm/ directory):&lt;br /&gt;
       nM&amp;gt; option/create/link=nxm myopt /home/smith/myopt123&lt;br /&gt;
&lt;br /&gt;
     Creates the following:&lt;br /&gt;
       $NMROOT&lt;br /&gt;
         +- nxm&lt;br /&gt;
             +- myopt --&amp;gt; /home/smith/myopt123&lt;br /&gt;
             +- sys &amp;lt;existing&amp;gt;&lt;br /&gt;
             +- ucl &amp;lt;existing&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       /home/smith/myopt123&lt;br /&gt;
                    +- cfg&lt;br /&gt;
                    |   +- commands.cnf&lt;br /&gt;
                    +- prim&lt;br /&gt;
                    +- mcr&lt;br /&gt;
&lt;br /&gt;
  3. (Unix Only) Create a link outside of $NMROOT/nxm pointing to the physical&lt;br /&gt;
     option tree path (this works well for existing X-Midas option trees).&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; option/create/link=&amp;quot;/home/midas/nxm/&amp;quot; myopt /home/midas/myopt123&lt;br /&gt;
&lt;br /&gt;
  4. (Unix Only) Create a new option tree called myopt with a recursive link.&lt;br /&gt;
     This keeps the option tree &amp;quot;flat&amp;quot; (X-Midas style) but uses a &amp;quot;back-link&amp;quot;&lt;br /&gt;
     to maintain the Java package names.&lt;br /&gt;
           (** THIS WILL CAUSE ECLIPSE, JBUILDER, ETC. TO CRASH **)&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; option/create/link=recursive myopt /home/smith/myopt123&lt;br /&gt;
&lt;br /&gt;
     Creates the following:&lt;br /&gt;
       /home/smith/myopt123&lt;br /&gt;
                    +- nxm&lt;br /&gt;
                    |   +- myopt --&amp;gt; ../ &amp;lt;recursive link&amp;gt;&lt;br /&gt;
                    +- cfg&lt;br /&gt;
                    |   +- commands.cnf&lt;br /&gt;
                    +- prim&lt;br /&gt;
                    +- mcr&lt;br /&gt;
&lt;br /&gt;
  5. The entire option tree can be placed under $NMROOT/nxm/ (like the option&lt;br /&gt;
     trees that come with NeXtMidas). This will work on all platforms, but is&lt;br /&gt;
     strongly discouraged since your option tree may be lost when you upgrade&lt;br /&gt;
     to a new version of NeXtMidas; hence, there is no OPTION/CREATE that will&lt;br /&gt;
     do this for you.&lt;br /&gt;
&lt;br /&gt;
CONFIGURING EXISTING X-MIDAS OPTION TREES (Unix Only)&lt;br /&gt;
-----------------------------------------------------&lt;br /&gt;
  There are a number of ways to configure an existing X-Midas option tree&lt;br /&gt;
  for NeXtMidas use.&lt;br /&gt;
&lt;br /&gt;
  1. The recommended approach is to create a base directory to hold your option&lt;br /&gt;
     trees under an &amp;quot;nxm&amp;quot; directory structure outside $NMROOT (see &amp;quot;REQUIRED&lt;br /&gt;
     DIRECTORY STRUCTURE&amp;quot; section above).&lt;br /&gt;
&lt;br /&gt;
  2. Create a link under $NMROOT/nxm which points to the existing option tree&lt;br /&gt;
     (this is not recommend since it requires you to modify your NeXtMidas&lt;br /&gt;
     distribution directory).&lt;br /&gt;
&lt;br /&gt;
        nM&amp;gt; opt/create/link=NXM myopt &amp;quot;/home/midas/myxmopt123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  3. Create a directory called 'nxm' which is at the same level as the existing&lt;br /&gt;
     option tree. Then place a link under 'nxm' pointing to the existing tree.&lt;br /&gt;
     (this approach is DISCOURAGED since it can cause Eclipse and JBuilder&lt;br /&gt;
     to crash if used to edit the NeXtMidas files in the option tree).&lt;br /&gt;
&lt;br /&gt;
        nM&amp;gt; opt/create/link=&amp;quot;/home/midas/xmopts/nxm/&amp;quot; myxmopt &amp;amp;&lt;br /&gt;
                            &amp;quot;/home/midas/xmopts/myxmopt123&amp;quot;&lt;br /&gt;
&lt;br /&gt;
USE STAR OPTION NAME (to define all option tree under specified path):&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
  All option trees under a specified path can be defined using the star &amp;quot;*&amp;quot;&lt;br /&gt;
  character as the name for the option tree. This will ignore sub-directories&lt;br /&gt;
  with dots (since that is not a valid option tree name). Since NeXtMidas 2.9.3.&lt;br /&gt;
&lt;br /&gt;
    nM&amp;gt; option * /path/to/nmopts/nxm/&lt;br /&gt;
&lt;br /&gt;
    The above will define the following option trees using example&lt;br /&gt;
    directory structure from the REQUIRED DIRECTORY STRUCTURE section above:&lt;br /&gt;
      myopt         = /path/to/nmopts/nxm/myopt&lt;br /&gt;
      coolapp       = /path/to/nmopts/nxm/coolapp&lt;br /&gt;
      yetanotheropt = /path/to/nmopts/nxm/yetanotheropt&lt;br /&gt;
&lt;br /&gt;
FIND and DEFINE OPTION TREE from CLASSPATH:              (Since NeXtMidas 3.3.0)&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
  Option trees in the CLASSPATH can be found via the /FIND switch or found and&lt;br /&gt;
  defined using reserved &amp;quot;CLASSPATH&amp;quot; (upper-case) word for the &amp;lt;path&amp;gt; argument.&lt;br /&gt;
&lt;br /&gt;
  1. Find and define option tree from CLASSPATH (errors if MYOPT is not found)&lt;br /&gt;
    nM&amp;gt; option MYOPT &amp;quot;CLASSPATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  2. Find option tree and save it's URL/path to results, and define it if found:&lt;br /&gt;
    option/find=myres MYOPT&lt;br /&gt;
    if myres NisNull then&lt;br /&gt;
      option MYOPT myres&lt;br /&gt;
      path add MYOPT&lt;br /&gt;
    else&lt;br /&gt;
      warning &amp;quot;Unable to find MYOPT option tree...&amp;quot;&lt;br /&gt;
    endif&lt;br /&gt;
&lt;br /&gt;
EXAMPLES:&lt;br /&gt;
  (See above for examples of using OPTION/CREATE to create option trees.)&lt;br /&gt;
&lt;br /&gt;
  1. Show all configured option trees:&lt;br /&gt;
        nM&amp;gt; OPTION&lt;br /&gt;
        Available Option Trees (&amp;lt;n&amp;gt; = index on path):&lt;br /&gt;
               AUDIO  = /home/smith/nxm240/nxm/audio/&lt;br /&gt;
           &amp;lt;1&amp;gt; DSP    = /home/smith/nxm240/nxm/dsp/&lt;br /&gt;
           &amp;lt;2&amp;gt; HWC    = /home/smith/nxm240/nxm/hwc/&lt;br /&gt;
               MAP    = /home/smith/nxm240/nxm/map/ -&amp;gt; /home/smith/map120/&lt;br /&gt;
           &amp;lt;3&amp;gt; SYS    = /home/smith/nxm240/nxm/sys/&lt;br /&gt;
               UCL    = /home/smith/nxm240/nxm/ucl/&lt;br /&gt;
&lt;br /&gt;
  2. Show a single option tree:&lt;br /&gt;
        nM&amp;gt; OPTION UCL&lt;br /&gt;
        UCL = /home/smith/nxm240/nxm/ucl/&lt;br /&gt;
&lt;br /&gt;
  3. Define an option tree definition for MYOPT located under the&lt;br /&gt;
     /midas/nmopts/nxm/myopt directory:&lt;br /&gt;
        nM&amp;gt; option MYOPT /midas/nmopts/nxm/myopt/&lt;br /&gt;
&lt;br /&gt;
  4. Undefine (remove) the MAP option tree definition&lt;br /&gt;
        nM&amp;gt; option/delete map&lt;br /&gt;
&lt;br /&gt;
  5. Define all option trees under the /path/to/nmopts/nxm/ directory.&lt;br /&gt;
        nM&amp;gt; option * /path/to/nmopts/nxm/&lt;br /&gt;
&lt;br /&gt;
SWITCHES:&lt;br /&gt;
  /CREATE    - Creates the subdirectories and a stub commands.cnf for the&lt;br /&gt;
               option tree.&lt;br /&gt;
  /DELETE    - Logically remove the specified option tree definition. The&lt;br /&gt;
               directory is NOT removed; that must be done explicitly with the&lt;br /&gt;
               appropriate operating system commands. I.e. this will NOT delete&lt;br /&gt;
               option trees created with links in $NMROOT.         (Since 2.7.0)&lt;br /&gt;
  /FIND=&amp;lt;res&amp;gt;- Find &amp;lt;name&amp;gt; option tree in CLASSPATH and save path to specified&lt;br /&gt;
               results label if specified.                         (Since 3.3.0)&lt;br /&gt;
  /GET=&amp;lt;res&amp;gt; - Get a comma separated list of ALL defined option trees (not&lt;br /&gt;
               just those on the path)&lt;br /&gt;
  /INFO=&amp;lt;res&amp;gt;- Get option tree information parsed from version.txt/manifest.mf&lt;br /&gt;
               such as version and required option trees. If no results label is&lt;br /&gt;
               given then info is displayed to terminal.           (Since 3.3.0)&lt;br /&gt;
               See nxm.sys.lib.OptionTree.getInfo(..) for details of output.&lt;br /&gt;
  /LINK=     - Creates a link named by the given option tree when using /CREATE.&lt;br /&gt;
               [DEF=null]&lt;br /&gt;
               Options are:&lt;br /&gt;
                 NXM    - Creates a link in $NMROOT/nxm&lt;br /&gt;
                 BACK   - TBD - Creates an nxm directory with a back link to the&lt;br /&gt;
                          option tree directory&lt;br /&gt;
                 &amp;lt;path&amp;gt; - Creates a link in the given &amp;lt;path&amp;gt;. The path must be&lt;br /&gt;
                          quoted, i.e. inside double quotes and should generally&lt;br /&gt;
                          end with a &amp;quot;nxm&amp;quot; directory name.&lt;br /&gt;
  /NOEXIT    - Prevent class reloading via shell restart when option tree is&lt;br /&gt;
               defined that has ever been added to the PATH.       (Since 2.9.3)&lt;br /&gt;
               [DEF=FALSE in command-line;TRUE in macro]&lt;br /&gt;
&lt;br /&gt;
See Also: PATH, CONFIGURE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>