GeMA
The GeMA main application
Path macros

When providing a file path in calls to dofile() or in calls to process functions or scriptLib functions that expect a file path as a parameter, like io.saveMeshFile(), some macros can be included in the file path and will be translated to the correct location by GeMA. Understood macros are:

  • $APP: Expands to the directory where the application lives, stripped of debug or release subdirs.
  • $CURRENT: Expands to the directory where the application was run.
  • $LOG: Expands to the directory where the log file is written. Equal to $CURRENT unless explicitly initialized through the -l command line option.
  • $APPCONFIG: Expands to the directory from where the config file was read.
  • $SCRIPTS: Expands to the configured directory used for loading auxiliary Lua scripts.
  • $SIMULATIONDIR: Expands to the directory where the master simulation file was read.
  • $SIMULATIONNAME: Expands to the base name (without extension) of the master simulation file.
  • $BUILDMODE: Expands to release or debug if either are present in the original (unstripped) application path or to an empty string if not present.
  • $INPUT: Expands to an input directory. Equal to $SIMULATIONDIR unless explicitly initialized through the -i command line option.
  • $OUTPUT: Expands to an output directory. Equal to $SIMULATIONDIR unless explicitly initialized through the -o command line option.
  • $yy: Expands to the year of the simulation execution with 2 digits.
  • $MM: Expands to the month of the simulation execution with 2 digits.
  • $dd: Expands to the day of the simulation execution with 2 digits.
  • $hh: Expands to the hour of the simulation execution with 2 digits.
  • $mm: Expands to the minute of the simulation execution with 2 digits.
  • $ss: Expands to the second of the simulation execution with 2 digits.

When using path macros in the configuration file, the following macros are not available since the needed information was not loaded yet:

  • $SCRIPTS
  • $SIMULATIONDIR
  • $SIMULATIONNAME
  • $INPUT
  • $OUTPUT