By experimentation, the templates listed below seem to be supported in the Arguments to MLOpen
and Launch command
boxes. For each template, a sample expansion is shown as produced by Mathematica 11 under OS X on my machine.
Templates for Directories
`baseDirectory`
expands to /Library/Mathematica
`homeDirectory`
expands to /Users/sakra
`installDirectory`
expands to /Applications/Mathematica.app/Contents
`jlinkDirectory`
expands to /Applications/Mathematica.app/Contents/SystemFiles/Links/JLink
`userbaseDirectory`
expands to /Users/sakra/Library/Mathematica
`userdocumentsDirectory`
expands to /Users/sakra/Documents
Templates for Files
`executable`
expands to wolfram
`java`
expands to /Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin/java
`javaw`
expands to /Applications/Mathematica.app/Contents/SystemFiles/Java/MacOSX-x86-64/bin/java
`jlinkjar`
expands to /Applications/Mathematica.app/Contents/SystemFiles/Links/JLink/JLink.jar
`mathkernel`
expands to /Applications/Mathematica.app/Contents/MacOS/WolframKernel
`mathssh`
expands to /Applications/Mathematica.app/Contents/SystemFiles/Java/WolframSSH.jar
`wolframkernel`
expands to /Applications/Mathematica.app/Contents/MacOS/WolframKernel
`wolframssh`
expands to /Applications/Mathematica.app/Contents/SystemFiles/Java/WolframSSH.jar
Templates for Environment
`ipaddress`
expands to 192.168.1.11
`machinename`
expands to host.example.com
`username`
expands to sakra
Templates for WSTP
The expansion of the following templates depends on the WSTP link actually created by the options entered in the Arguments to MLOpen
box.
Templates for a TCPIP
WSTP link
Templates for a SharedMemory
WSTP link
`linkname`
expands to dr6hn_shm
`dataport`
expands to dr6hn_shm
`messageport`
expands to empty string
`socketname`
expands to dr6hn_shm
Quoting
Under OS X and Linux both single quotes and double quotes can be used for quoting arguments in the expected way.
Under Windows the launch command is passed to cmd.exe
in the following way:
C:\Windows\system32\cmd.exe /c "launch command"
That means that the quoting rules for cmd.exe /c
apply, i.e. double quotes work as expected.