Predefined node variables

Each Project Manager node has a defined set of variables containing values determined at runtime.

These variables can be used in:

Note: For further details about the locations where you can set the environment variables, see What determines the value of an environment variable.
Table 1. Predefined node variables (X indicates available for the node)
Variable Description Group Application Library File Package
$(BAFilePath) Absolute path of the 4ba file. X X X X
$(BinaryName) Name of the binary to execute. X X X
$(BuildInputFileDirs) List of all file directories for source files used by a build rule. For example, D:\My Genero Files\test\src\. X X
$(BuildInputFileNames) List of all source files for a build rule. For example, main.4gl form.4fd test.per toto.4gl. X X
$(BuildInputFilePaths) List of absolute file paths for source files used by a build rule. For example, D:\My Genero Files\test\src\main.4gl D:\My Genero Files\test\src\form.4fd. X X
$(BuildOutputBaseNames) List names of all output files for a build rule, without extension or path. For example, main form test toto X X
$(BuildOutputFileNames) List of all output files for a build rule. X X
$(BuildOutputFilePaths) List of absolute file paths for build output files. X X
$(CommandLineArgs) Arguments passed to the application when it is launched. X
$(CompilerOptions) Options to be passed to the compiler. For example, -S dumps Static SQL messages found in the source. X X X X
$(Dependencies) List of link output files (link results) of all dependencies binary nodes. For example, your Application depends on 2 libraries, lib1 and lib2. The lib1 link rule creates the $(TargetDir)/lib1.42x output file, and the lib2 link rule creates the $(TargetDir)/lib2.42x output file. The Application Dependencies is a list of these paths: {$(TargetDir)//lib1.42x $(TargetDir)//lib2.42x} X X
$(DistDir) Value of the Distribution directory property. X
$(ExecutableName) Executable name. X
$(ExternalDependencies) Value of the node property External dependencies. See Setting external dependencies. X X
$(GSTDIR) Genero Studio installation directory path. X X X X X
$(GSTSETUPDIR) Application Generator template directory path. X X X X
$(Implicit) FGL argument -implicit=none X
$(InputBaseName) Input file base name, without extension. X
$(InputDir) Absolute directory of the input file. X
$(InputExtension) Input file extension. X
$(InputMimeType) Input file MIME type. X
$(InputName) Input file name, with extension. X
$(InputPath) Absolute path of the input file. X
$(IntermediateFilePaths) List of intermediate file paths. X X
$(Language) The programming language to be used when building a node. See Languages. X X X X
$(LinkerOptions) Options to be passed when linking. X X X
$(LinkOutputFileBaseNames) List names of all output files for a link rule, without extension or path. For example, Application.42r X X
$(LinkOutputFileNames) List of all output files for a link rule. For example, Application.42r X X
$(LinkOutputFilePaths) List of absolute file paths for output files used by a link rule. X X
$(PackageName) Value of the PackageName property. X
$(ProjectDir) The directory where the 4pw file is located. X X X X
$(RelativeDir) A list of directory names, corresponding to the path difference between the source directory and the current directory. For example, the source directory is $(ProjectDir)/src, and the file path is $(ProjectDir)/src/com/d1/Account.java. The relative directory would be the string list {com d1}.
To use, you typically join with a separator:
  • For paths that use the backslash:
    $(RelativeDir|/)
  • For a java package using a period:
    $(RelativeDir|.)
X X
$(TargetDir) Target directory of the compiled files. X X X X
$(TargetPaths) List of target directories of all dependencies. X X X X
$(XCFFilePath) Path of the XCF file found for the application. X X

List Expansion

For all variables that contain a list of files, for example $(BuildInputFiles), special syntax is used to expand the list.

To get a list with a specific file extension, use a colon:
$(variableName:.extension)

For example, $(BuildInputFiles:.4gl) returns all files with a 4gl extension in the $(BuildInputFiles) list, separated by a space.

To get a list with a specific separator, use the pipe symbol:
$(variableName|separator)   

For example, $(BuildInputFiles|#) returns all the files in the $(BuildInputFiles) list, separated by a #.