Skip to content

Latest commit

 

History

History
96 lines (72 loc) · 2.5 KB

test.md

File metadata and controls

96 lines (72 loc) · 2.5 KB

The following command-line arguments are supported:

--help

Shows argument help

--help-md

Shows argument help, in Markdown

Inputs

<path>

A relative or absolute path to a C/C++ file to scan.
You can specify multiple of these!
May contain * in file name for simple wildcard matches (test/lib_*.cpp).

--index <path>

Scans the file for typedefs/usings, but will not mirror structs from it.

Outputs

--cpp <path>

A path to a file where auto-generated C++ functions will be.
Usually this is a file in your C++ project.

--gml <path>

A path to a file where auto-generated GML functions will be.
Usually this is a file in your GM extension.

--gml-constructors <path>

If you are using constructor+method comment tags, this is where the generated GML constructor functions will reside.

Functions and tags

--prefix <snip>

Sets the prefix for GML helper functions (default: ext)

--function-tag <tag>

Changes the macro-tag for unmangled functions (default: dllg)
The tool will only generate wrappers for functions prepended with this tag.

--function-tag-m <tag>

Changes the macro-tag for mangled/YYRunnerInterface functions (default: dllgm)

--export-tag <tag>

Changes the tag/macro for generated unmangled functions (default: dllx)

--export-tag-m <tag>

Changes the tag/macro for generated mangled functions (default: dllm)

C++ file

--prepend <line>

Adds a line of code at the beginning of the auto-generated C++ file.

--append <line>

Adds a line of code at the end of the auto-generated C++ file.

--include <path>

Adds an #include "<path>" to the auto-generated C++ file.

Esoteric

--struct <value>

Changes how C++ structs are converted to/from GML:

  • 1: always uses GML structs for C++ structs
  • 0: always uses arrays for C++ structs
  • auto: generates GmxGen-specific wrapper, like:
    // GMS >= 2.3
    struct-based code
    /*/
    array-based code
    //*/
  • Other values: uses the value as a condition, like:
    // GMS >= 2.3
    if (value) {
    	struct-based code
    } else //*/
    {
    	array-based code
    }

--prefer-ds

Prefer ds_maps and ds_lists over arrays in GM versions without structs.

--wasm

Enables WebAssembly-specific tweaks to code generation.

--gmk <path>

A path to a file where GM8.1 scripts will be.
These will follow 8.1 constraints (such as using lists instead of arrays) and will generate additional code to make up for lacking API.