Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

App object

Markus edited this page Nov 25, 2020 · 3 revisions

Structure

{
  name = name,                                                -- The name of the app
  group = string.sub(GLOBALS.currentPath, 1, -2),             -- The group this app is part of
  group = string.sub(group, 1, string.find(group, "/[^/]*$"))
  currentPath = GLOBALS.currentPath,                          -- Path to the app
  location = name .. "/",                                     -- The location of the project files
  objectDir = "Output/" .. name .. "/Obj/",                   -- The path where intermediate files end up at
  outputDir = "Output/" .. name .. "/Bin/",                   -- The path where binary files end up at
  libraryDir = "Output/" .. name .. "/Lib/",                  -- The path where library files end up at
  includeDir = name .. APP.includeFolder,                     -- The include path of the app
  sourceDir = name .. APP.sourceFolder,                       -- The source path of the app
  resourceDir = name .. APP.debugFolder .. "assets/",         -- The resource path of the app
  debugDir = name .. APP.debugFolder,                         -- The path to where to run the project from
  cppDialect = "C++17",                                       -- The C++ version
  rtti = "Off",                                               -- Should Runtime-Type Information be available in the app
  exceptionHandling = "On",                                   -- Should the app be able to handle exceptions using C++ exception handling
  warnings = "Default",                                       -- The warning level of the app
  dependencies = {},                                          -- table of app's
  states = {},                                                -- Table of state objects
  flags = { "MultiProcessorCompile" }                         -- Table of flags
}

Functions

ToString

Syntax:

local string = app.ToString()

Return values:

string = string - It returns a debug string for the app.

AddFlag

Syntax:

app.AddFlag(flag)

Parameters:

flag = string - The flag to be added.

GetLocalFilePath

Syntax:

local path = app.GetLocalFilePath(file)

Parameters:

file = string - The file to get the local file path of.

Return values:

path = string - The local file path of the file.

AddFile

Syntax:

app.AddFile(file)

Parameters:

file = string - The local file to be included

AddDependency

Syntax:

app.AddDependency(dependency)

Parameters:

dependency = app - The dependency to add to this app

AddState

Syntax:

app.AddState(filter, func)

Parameters:

filter = string or table of strings - The filter of the state
func = function - The function to call

GetAllIncludedDirectories

Syntax:

app.GetAllIncludedDirectories(includeDirs)

Parameters:

includeDirs = table of strings - A table to add the directories to