Skip to content
Demez edited this page Aug 6, 2020 · 8 revisions

Macros are used to store a value for use later, and can be changed at any time

Creating a Macro:

macro Name Value

Using the Macro:

Key $NAME $OTHER_MACRO

The Macro can only be used in the block's values or in a condition


Base Platform Macros

Windows:

  • $WINDOWS = 1 Both 32-bit and 64-bit
  • $WIN32 = 1 Only 32-bit
  • $WIN64 = 1 Only 64-bit
  • $_BIN_EXT = .dll
  • $_STATICLIB_EXT = .lib
  • $_IMPLIB_EXT = .lib
  • $_APP_EXT = .exe

Linux:

  • $POSIX = 1 Both 32-bit and 64-bit
  • $POSIX32 = 1 Only 32-bit
  • $POSIX64 = 1 Only 64-bit
  • $LINUX = 1 Both 32-bit and 64-bit
  • $LINUX32 = 1 Only 32-bit
  • $LINUX64 = 1 Only 64-bit
  • $_APP_EXT = .so
  • $_STATICLIB_EXT = .a
  • $_IMPLIB_EXT = .so
  • $_APP_EXT =

MacOS:

  • $POSIX = 1
  • $MACOS = 1 Mac is only 64-bit, so only one macro for it

Project Script Only Macros

These are macros that are defined per project or per file

  • ROOT_DIR - Path to the root directory, relative to the project script directory
  • ROOT_DIR_ABS - Absolute path to the root directory
  • PROJECT_NAME - This macro sets the Project name in the console output, and in the IDE you're using, defaults to below
  • PROJECT_FILENAME - Name of the root project script, not affected by includes
  • PROJECT_DIR - Relative path to the root project script directory, not affected by includes
  • SCRIPT_FILENAME - Name of the current script, affected by includes
  • SCRIPT_DIR - Name of the current directory of the current script above, also affected by includes
Clone this wiki locally