Menu

Command_line_interface

Hugh Greene

A Command Line Interface (CLI) is a way to communicate with/use a
program exclusively through a command line, or terminal. This is
especially useful in a Headless
system
or for scripts,
such as performing operations in bulk, or for users who prefer the
command line or don't have a Graphical User Interface
(GUI)
. Because
of this, most compilers and linux software provide a CLI in addition to,
or in place of, a GUI.

Brief ENIGMA history

Enigma started out as a CLI exe only. LateralGM
was forced to communicate to it through this limited fashion, writing
the game to a file, passing the filename to the exe, and pipe-reading
ENIGMA's output from the exe and files that it produced, which was much
slower than it had to be.

One day, IsmAvatar figured out how to get
Java and C++ to communicate via DLL with the use of
JNA, which allows LGM and ENIGMA to share memory structures and make
interactive calls to each others functions, which is much faster and
much more dynamic. Since then, ENIGMA has redirected itself towards
being a DLL, and the build process has been streamlined for that
purpose. As a result, ENIGMA became almost exclusively a GUI program.

Due to the thee-tier architecture of LateralGM (front-end back-end
separation), it isn't hard to use a headless LateralGM - that is, just
the data and logic tiers, without the front-end presentation tier. As
such, it wasn't long before this fact was exploited, and combined with
the Plugin to communicate with the dll, to
construct a Java CLI for ENIGMA.

Usage

Currently, ENIGMA's CLI is very primitive. Its usage is as follows:

  1. Ensure that ENIGMA is already fully checked out and compiled
  2. cd to ENIGMA's directory.
  3. java <jvm options=""> -jar plugins/enigma.jar \<game_file.gmx></jvm>

The only options available are optional jvm options (e.g. max heap size,
so you don't run out of memory: -Xmx=500m) and the game file that you
wish to compile (mandatory). Everything else is assumed as defaults,
such as the compilation platform (usually the same platform that you're
running from) and the outname (simply replaces game_file's extension
with the target extension, like exe on windows).


Related

Wiki: CLI
Wiki: DLL
Wiki: ENIGMA\it
Wiki: ENIGMA
Wiki: LateralGM
Wiki: Linux
Wiki: Mac_OS_X
Wiki: Plugin
Wiki: Windows

MongoDB Logo MongoDB