### Verify FASTBuild Installation Source: https://www.fastbuild.org/docs/quickstartguide This command verifies that FASTBuild is correctly installed and accessible in your system's PATH. It outputs the FASTBuild version information. ```bash fbuild -version ``` -------------------------------- ### FASTBuild Library Function Example Source: https://www.fastbuild.org/docs/syntaxguide Demonstrates the basic syntax for defining a library in FASTBuild, including setting properties like the compiler. It shows how properties can be set directly or inherited from variables. ```FASTBuild ; Example A Library( "mylib" ) { .Compiler = "cl.exe" } ; Example B .Compiler = "cl.exe" Library( "mylib" ) { } ``` -------------------------------- ### FASTBuild Library Build-Time Substitution Example Source: https://www.fastbuild.org/docs/syntaxguide Shows how to use build-time substitutions within the Library function for compiler options. It explains the use of %1 and %2 placeholders for input and output paths, which are dynamically replaced during the build. ```FASTBuild Library( "mylib" ) { ; NOTE: some option omitted for brevity .CompilerInputPath = 'Code\' ; will build all cpp files in this directory .CompilerOutputPath= 'Tmp\' .CompilerOptions = '%1 /Fo%2 /nologo /c' ; substitutions detailed below } ``` -------------------------------- ### FASTBuild User Function Definitions Source: https://www.fastbuild.org/docs/syntaxguide Provides examples of defining user-defined functions in FASTBuild. It shows how to declare functions with zero or more arguments and a function body, including conditional logic and printing output. ```FASTBuild function FunctionA() { Print( 'Hello' ) } function FunctionB( .Arg .Arg2 ) { If( .Arg1 == .Arg2 ) { Print( 'Equal' ) } } ``` -------------------------------- ### VSProjectExternal Configuration Example Source: https://www.fastbuild.org/docs/functions/vsprojectexternal Demonstrates how to configure VSProjectExternal with mandatory and optional parameters. This includes specifying the external project path, GUID, and build configurations. ```bff VSProjectExternal("MyExternalProject") { .ExternalProjectPath = 'Setup\Source\ExtProject\ExtProject.wixproj' .ProjectGuid = '{FA3D597E-38E6-4AE6-ACA1-22D2AF16F6A2}' .ProjectTypeGuid = '{930c7802-8a8c-48f9-8165-68863bccd9dd}' .DebugConfig = [ .Platform = 'Win32' .Config = 'Debug' ] .ReleaseConfig = [ .Platform = 'Win32' .Config = 'Release' ] .ProjectConfigs = { .DebugConfig, .ReleaseConfig } } ``` -------------------------------- ### FASTBuild User Function Invocations Source: https://www.fastbuild.org/docs/syntaxguide Demonstrates how to invoke user-defined functions in FASTBuild. Examples include calling a function with no arguments and calling a function with literal string and previously declared string arguments. ```FASTBuild FunctionA() FunctionB( 'ALiteralString' .APreviouslyDeclaredString ) ``` -------------------------------- ### Build a Specific Target Source: https://www.fastbuild.org/docs/quickstartguide This command initiates the build process for a specific target defined in the 'fbuild.bff' file. You can specify the target by its output file path or its alias. ```bash fbuild Out\LibA\LibA.lib ``` ```bash fbuild libA ``` -------------------------------- ### Copy Directory Example Source: https://www.fastbuild.org/docs/functions/copydir Demonstrates the basic usage of CopyDir to copy files from a source directory to a destination directory, replicating the directory structure. ```fastbuild CopyDir( 'CopyExample' ) { .SourcePaths = 'folder\' .Dest = 'out\' } ``` -------------------------------- ### FASTBuild Alias Configuration Example Source: https://www.fastbuild.org/docs/errors/1101 Demonstrates the correct configuration for an Alias in FASTBuild, specifically addressing the 'Targets' property. This example shows how to define the targets for an alias, which is a common requirement. ```FASTBuild Alias( 'name' ) { .Targets = { 'MyLib' } } ``` -------------------------------- ### RemoveDir with Pre-Build Dependencies Example Source: https://www.fastbuild.org/docs/functions/removedir Shows how to specify pre-build dependencies for the RemoveDir function. This ensures that other specified targets are built and up-to-date before the RemoveDir operation commences. ```fastbuild RemoveDir( 'name' ) { .RemovePaths = 'output/' .PreBuildDependencies = 'CompileCode' } RemoveDir( 'name' ) { .RemovePaths = 'temp/' .PreBuildDependencies = { 'GenerateFiles', 'ProcessData' } } ``` -------------------------------- ### FASTBuild Variable Construction from Other Variables Source: https://www.fastbuild.org/docs/syntaxguide Illustrates how to construct new string variables in FASTBuild by referencing and combining other variables. The '$' syntax is used for variable expansion. ```FASTBuild .StringA = "hello" .StringB = "$StringA$ FASTBuild user!" ``` -------------------------------- ### Define Project Configurations for XCode Project Source: https://www.fastbuild.org/docs/functions/xcodeproject This example demonstrates how to define specific project configurations (like Debug, Release) within the XCodeProject. Each configuration can be associated with a FASTBuild target, SDK, and debugging working directory. ```FASTBuild XCodeProject( 'alias' ) { .ProjectOutput = 'tmp/XCode/MyProject.xcodeproj/project.pbxproj' .ProjectConfigs { .Config = 'Debug' .Target = 'MyTargetDebug' .XCodeBaseSDK = 'iphoneos' .XCodeDebugWorkingDir = 'build/Debug/' .XCodeIphoneOSDeploymentTarget = '13.0' } { .Config = 'Release' .Target = 'MyTargetRelease' } } ``` -------------------------------- ### FASTBuild Library Alias Argument Source: https://www.fastbuild.org/docs/syntaxguide Illustrates how to use an optional alias argument with the Library function in FASTBuild, allowing for a user-friendly name when targeting the library on the command line. ```FASTBuild Library( "mylib" ) ; can target "mylib"... { .LibrarianOutput = "out\libs\mylib.lib" ; ...instead of this } ``` -------------------------------- ### FASTBuild Pushing Variables to Parent Scope Source: https://www.fastbuild.org/docs/syntaxguide Demonstrates how to push variables to the last used parent scope in FASTBuild using the '^' prefix. This is useful for accumulating values across scopes. ```FASTBuild .CompilerOptions = '/c "%1" -o "%2"' .IncPaths = { 'libA/inc/', 'libB/inc/' } ForEach( .IncPath in .IncPaths ) { ^CompilerOptions + ' /I"$IncPath$"' } ``` -------------------------------- ### Configure Input Paths for XCode Project Generation Source: https://www.fastbuild.org/docs/functions/xcodeproject This example shows how to specify input directories for the XCodeProject generator. Files within these directories will be included in the generated Xcode project. It also demonstrates excluding specific subdirectories and files using patterns. ```FASTBuild XCodeProject( 'alias' ) { .ProjectOutput = 'tmp/XCode/MyProject.xcodeproj/project.pbxproj' .ProjectInputPaths = 'Code/Lib/Folder/' .ProjectInputPathsExclude = 'Code/Lib/FolderToExclude/' .ProjectPatternToExclude = '*/OSX/*' } ``` -------------------------------- ### Set Project Root Namespace Source: https://www.fastbuild.org/docs/functions/vcxproject Configures the RootNamespace for a project. This is typically used to organize code within namespaces. The example shows how to set it to 'MyProject'. ```text .RootNamespace = 'MyProject' ``` -------------------------------- ### FASTBuild Looping Through Struct Arrays Source: https://www.fastbuild.org/docs/syntaxguide Shows a common FASTBuild pattern of looping through an array of structs to configure build settings dynamically. The 'Using' function is used within the loop to apply settings from each struct. ```FASTBuild .ConfigX86 = [ .Compiler = "compilers/x86/cl.exe" .ConfigName = "x86" ] .ConfigX64 = [ .Compiler = "compilers/x64/cl.exe" .ConfigName = "x64" ] .Configs = { .ConfigX86, .ConfigX64 } ForEach( .Config in .Configs ) { Using( .Config ) Library( "Util-$ConfigName$" ) { .CompilerInputPath = 'libs/util/' .CompilerOutputPath = 'out/$ConfigName$/' .LibrarianOutput = 'out/$ConfigName$/Util.lib' } } ``` -------------------------------- ### FASTBuild Using Function for Struct Members Source: https://www.fastbuild.org/docs/syntaxguide Explains the 'Using' function in FASTBuild, which pushes all members of a struct into the current scope. This allows for easier access to struct properties and enables inheritance-like behavior. ```FASTBuild Using( .MyStruct ) ``` -------------------------------- ### FASTBuild Variable Declaration and Types Source: https://www.fastbuild.org/docs/syntaxguide Demonstrates how to declare variables of different types (String, Integer, Boolean, Array) in FASTBuild. Variable types are inferred from their initial assignment. ```FASTBuild .MyString = "hello" .MyBool = true .MyInt = 7 .MyArray = { "aaa", "bbb", "ccc" } ``` -------------------------------- ### FASTBuild Dynamic Variable Construction Source: https://www.fastbuild.org/docs/syntaxguide Demonstrates dynamic variable name construction in FASTBuild at parse time. This allows variable names to be formed based on other variable values. ```FASTBuild .Config = 'Debug' .Platform = 'X64' .Options = ."CompilerOptions_$Config$_$Platform$" // expands to .CompilerOptions_Debug_X64 ``` -------------------------------- ### RemoveDir Filtering Options Example Source: https://www.fastbuild.org/docs/functions/removedir Illustrates how to use filtering options within the RemoveDir function. This includes specifying patterns for files to delete and defining paths or files to exclude during the deletion process. ```fastbuild // Example 1: Delete only *.obj files RemoveDir( 'name' ) { .RemovePaths = 'folder\' .RemovePatterns = '*.obj' } // Example 2: Delete specific file types in subdirectories RemoveDir( 'name' ) { .RemovePaths = 'folder\' .RemovePatterns = { 'subdir/*.exe', 'subdir/*.pdb' } } // Example 3: Exclude specific subdirectories RemoveDir( 'name' ) { .RemovePaths = 'folder\' .RemoveExcludePaths = 'folderA/' } // Example 4: Exclude multiple subdirectories and files RemoveDir( 'name' ) { .RemovePaths = 'folder\' .RemoveExcludePaths = { 'folderA/', 'FolderB/' } .RemoveExcludeFiles = { 'fileA.txt', 'fileB.txt' } } ``` -------------------------------- ### RemoveDir Basic Usage Example Source: https://www.fastbuild.org/docs/functions/removedir Demonstrates the basic usage of the RemoveDir function to delete contents of specified directories. It highlights the required '.RemovePaths' parameter and optional parameters like '.RemovePathsRecurse', '.RemoveDirs', and '.RemoveRootDir'. ```fastbuild // Example 1: Delete contents of a single folder RemoveDir( 'name' ) { .RemovePaths = 'folder\' } // Example 2: Delete contents of multiple folders RemoveDir( 'name' ) { .RemovePaths = { 'folderA\', 'folderB\' } } // Example 3: Disable recursion and directory deletion RemoveDir( 'name' ) { .RemovePaths = 'folder\' .RemovePathsRecurse = false .RemoveDirs = false } // Example 4: Disable top-level directory removal RemoveDir( 'name' ) { .RemovePaths = 'folder\' .RemoveRootDir = false } ``` -------------------------------- ### Configure Windows Hello World Build with FastBuild (fbuild.bff) Source: https://www.fastbuild.org/docs/examples/helloworld_windows This FastBuild configuration file (fbuild.bff) sets up the build environment for a 'Hello World' application on Windows using the Visual Studio 2013 compiler. It defines compiler and linker paths, options, include/library paths, and build targets for object files and the final executable. ```bff // HelloWorld //------------------------------------------------------------------------------ // Windows Platform (VS 2013 Compiler, Windows 7.1A SDK) //------------------------------------------------------------------------------ .VSBasePath = 'C:\Program Files (x86)\Microsoft Visual Studio 12.0' .WindowsSDKBasePath = 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A' // Settings //------------------------------------------------------------------------------ Settings { .Environment = { "PATH=$VSBasePath$\\Common7\\IDE\\;$VSBasePath$\\VC\\bin\", "TMP=C:\\Windows\\Temp", "SystemRoot=C:\\Windows" } } // X86 ToolChain //------------------------------------------------------------------------------ .Compiler = '$VSBasePath$\\VC\\bin\\cl.exe' .CompilerOptions = '"%1"' // Input + ' /Fo"%2"' // Output (in .obj) + ' /Z7' // Debug format + ' /c' // Compile only + ' /nologo' // No compiler spam + ' /W4' // Warning level 4 + ' /WX' // Warnings as errors .Linker = '$VSBasePath$\\VC\\bin\\link.exe' .LinkerOptions = ' /OUT:"%2"' // Output + ' "%1"' // Input + ' /WX' // Warnings as errors + ' /NOLOGO' // No linker spam + ' /DEBUG' // Keep debug info when linking + ' /NODEFAULTLIB' // We'll specify the libs explicitly // Include paths //------------------------------------------------------------------------------ .BaseIncludePaths = ' /I"./"' + ' /I"$VSBasePath$\\VC\\include/"' .CompilerOptions += .BaseIncludePaths // Library paths //------------------------------------------------------------------------------ .LibPaths = ' /LIBPATH:"$WindowsSDKBasePath$\\Lib"' + ' /LIBPATH:"$VSBasePath$\\VC\\lib"' .LinkerOptions += .LibPaths // HelloWorld //------------------------------------------------------------------------------ ObjectList( 'HelloWorld-Lib' ) { .CompilerInputPath = '\' .CompilerOutputPath = 'Out\' } Executable( 'HelloWorld' ) { .Libraries = { "HelloWorld-Lib" } .LinkerOutput = 'Out\\HelloWorld.exe' .LinkerOptions += ' libcmt.lib' // Std Lib (Multi-Threaded, Static, Release) + ' kernel32.lib' // Kernel functions } // All //------------------------------------------------------------------------------ Alias( 'all' ) { .Targets = { 'HelloWorld' } } ``` -------------------------------- ### Intellisense Configuration Source: https://www.fastbuild.org/docs/functions/vcxproject Configure settings for Intellisense, including preprocessor definitions, include paths, and forced includes. ```APIDOC ## Intellisense Configuration ### Description Configure settings for Intellisense, including preprocessor definitions, include paths, and forced includes. ### Method N/A (Configuration Settings) ### Endpoint N/A (Configuration Settings) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ## Configuration Options: - **PreprocessorDefinitions** (String) - (Optional) - Preprocessor definitions for Intellisense. Example: `.PreprocessorDefinitions = 'DEBUG;MY_LIB_DEFINE;__WINDOWS__;'` - **IncludeSearchPath** (String) - (Optional) - Include search paths for Intellisense. Example: `.IncludeSearchPath = 'Code/Core/;Code/Engine/;'` - **ForcedIncludes** (String) - (Optional) - Force included files for Intellisense. Example: `.ForcedIncludes = 'forced.h'` - **AssemblySearchPath** (String) - (Optional) - Assembly search paths for Intellisense. Example: `.AssemblySearchPath = '$WindowsSDK$/References/CommonConfiguration/Neutral'` - **ForcedUsingAssemblies** (String) - (Optional) - Forced using assemblies for Intellisense. Example: `.ForcedUsingAssemblies = 'AssemblyName'` - **AdditionalOptions** (String) - (Optional) - Additional compiler options for Intellisense. Example: `.AdditionalOptions = '/Zm100'` ``` -------------------------------- ### Compile C++ Hello World Application (Windows) Source: https://www.fastbuild.org/docs/examples/helloworld_windows This snippet shows the C++ code for a basic 'Hello World' program. It includes the standard input/output library and a main function that prints 'Hello!' to the console. This is the source file to be compiled by FastBuild. ```cpp #include "stdio.h" int main(int, char[]) { printf( "Hello!\n" ); return 0; } ``` -------------------------------- ### Define Library Targets in fbuild.bff Source: https://www.fastbuild.org/docs/quickstartguide This snippet demonstrates how to define library build targets within the 'fbuild.bff' configuration file. It sets common compiler and librarian options and then defines two libraries, 'libA' and 'libB', specifying their input and output paths. ```bff .Compiler = 'Bin\VC\cl.exe' .Librarian = 'Bin\VC\lib.exe' .CompilerOptions = '%1 /Fo%2 /c /Z7' .LibrarianOptions = '/NODEFAULTLIB /OUT:%2 %1' Library( 'libA' ) { .CompilerInputPath = 'Src\LibA\' .CompilerOutputPath= 'Out\LibA\' .LibrarianOutput = 'Out\LibA\libA.lib' } Library( 'libB' ) { .CompilerInputPath = 'Src\LibB\' .CompilerOutputPath= 'Out\LibB\' .LibrarianOutput = 'Out\LibB\libB.lib' } ``` -------------------------------- ### Set Linux Project Type GUID Source: https://www.fastbuild.org/docs/functions/vcxproject Assigns a specific project type GUID for Linux projects. This can be used by IDEs or build systems to identify and handle Linux projects correctly. ```FASTBuild Configuration .LinuxProjectType = '{D51BCBC9-82E9-4017-911E-C93873C4EA2B}' ``` -------------------------------- ### FASTBuild: Unterminated String Example and Fix Source: https://www.fastbuild.org/docs/errors/1002 Demonstrates the FASTBuild error #1002 where a string literal is not properly terminated. The example shows the incorrect configuration, the resulting error message, and the corrected configuration. ```FASTBuild .String = 'Unterminated ``` ```FASTBuild .String = 'Terminated' ``` -------------------------------- ### FASTBuild: Undefined Variable Reference Example Source: https://www.fastbuild.org/docs/errors/1009 This example demonstrates the FASTBuild error #1009 where an undefined variable is used in another variable's assignment. The error occurs because '.Var' attempts to use '$OtherVar$' which has not been defined. ```FASTBuild .Var = '$OtherVar$' ``` -------------------------------- ### Define Pre-Build Dependencies Source: https://www.fastbuild.org/docs/functions/copydir Illustrates the use of .PreBuildDependencies to ensure that other build targets complete successfully before the CopyDir operation begins. This is crucial when copying generated files. ```fastbuild CopyDir( 'CopyGeneratedScripts' ) { .SourcePaths = 'generated\scripts\' .Dest = 'out\scripts\' .PreBuildDependencies = 'GenerateScriptFiles' } ``` -------------------------------- ### FASTBuild Function Argument Mismatch Example and Fix Source: https://www.fastbuild.org/docs/errors/1111 Demonstrates the FASTBuild error #1111 where a function call has an incorrect number of arguments. The example shows the incorrect invocation and the corrected version that matches the function's parameter list. ```FASTBuild function Func( .Arg1 .Arg2 ){} Func( 'OnlyOneArg' ) ``` ```FASTBuild function Func( .Arg1 .Arg2 ){} Func( 'FirstArg', 'SecondArg' ) ``` -------------------------------- ### Configure VSSolution Basic Options Source: https://www.fastbuild.org/docs/functions/vssolution Configures the basic settings for generating a Visual Studio Solution file. This includes specifying the output path for the .sln file and optionally listing projects to include at the root level. ```FASTBuild VSSolution( 'MySolution' ) { .SolutionOutput = 'tmp/VisualStudio/MySolution.sln' .SolutionProjects = { 'LibraryA-proj', 'LibraryB-proj', 'Exe-proj' } } ``` -------------------------------- ### FASTBuild Error 1104 Example and Fix Source: https://www.fastbuild.org/docs/errors/1104 This snippet shows an example of FASTBuild error 1104, where a 'Test' function references an undefined 'TestExecutable'. The 'Fix' section demonstrates how to correctly define the executable using 'Executable()' before using it in the 'Test' function. ```FASTBuild Test( 'RunTest' ) { .TestOutput = 'tmp/' .TestExecutable = 'test.exe' } ``` ```FASTBuild Executable( 'Test' ) { .LinkerOutput = 'test.exe' } Test( 'RunTest' ) { .TestOutput = 'tmp/' .TestExecutable = 'test.exe' } ``` -------------------------------- ### FASTBuild Unity Function Integer Range Error Example Source: https://www.fastbuild.org/docs/errors/1054 Demonstrates the FASTBuild error 1054 when the 'UnityNumFiles' property is set to a value exceeding the maximum allowed range. The example shows the incorrect configuration, the resulting error message, and the corrected configuration. ```FASTBuild Unity( 'name' ) { .UnityInputPath = 'Code/' .UnityOutputPath = 'Tmp/' .UnityNumFiles = 99999999 // Too big } ``` ```FASTBuild c:\Test\fbuild.bff(1):(1) FASTBuild Error #1054 - Unity() - Integer 'UnityNumFiles' must be in range 1 to 999. Unity( 'name' ) ^ \--here ``` ```FASTBuild Unity( 'name' ) { .UnityInputPath = 'Code/' .UnityOutputPath = 'Tmp/' .UnityNumFiles = 10 } ``` -------------------------------- ### ListDependencies Function Example (FASTBuild BFF) Source: https://www.fastbuild.org/docs/functions/listdependencies This example demonstrates how to use the ListDependencies function within a FASTBuild build file (BFF). It defines an object compilation and then uses ListDependencies to export the source's file dependencies to a text file. The SourcePattern filters which files are included in the output. ```bff ObjectList( 'SimpleObject' ) { .CompilerInputFiles = "C:/Test/SimpleObject.cpp" .CompilerOutputPath = "C:/Test/Output" } ListDependencies( 'SimpleDependencies' ) { .Source = 'SimpleObject' .SourcePattern = { '*.h', '*.c', '*.cpp' } .Dest = 'C:/Test/Output/Dependencies.txt' } ``` -------------------------------- ### VCXProject Intellisense Configuration Source: https://www.fastbuild.org/docs/functions/vcxproject Sets up Intellisense options for a VCXProject. This includes defining preprocessor definitions, include search paths, forced includes, assembly search paths, and additional compiler options to improve code completion and analysis within Visual Studio. ```FASTBuild // Intellisense Options (optional) .PreprocessorDefinitions // (optional) Preprocessor definitions. .IncludeSearchPath // (optional) Include search paths. .ForcedIncludes // (optional) Force included files. .AssemblySearchPath // (optional) Assembly search paths. .ForcedUsingAssemblies // (optional) Forced Using assemblies. .AdditionalOptions // (optional) Additional compiler options. ``` -------------------------------- ### FASTBuild ForEach Loop Example with Mismatched Arrays Source: https://www.fastbuild.org/docs/errors/1204 This snippet demonstrates the incorrect usage of a ForEach loop in FASTBuild where the provided arrays have different lengths, leading to Error #1204. The example shows the configuration that triggers the error and the resulting output. ```FASTBuild .Configs = { 'debug', 'release', 'master' } .Options = { 'a', 'b' } ForEach( .Config in .Configs, .Option in .Options ) { } ``` -------------------------------- ### Manually Specify Include Search Paths for Intellisense Source: https://www.fastbuild.org/docs/functions/vcxproject Enables manual configuration of include search paths for Intellisense. FASTBuild can auto-detect these based on compiler flags, but manual settings take precedence. ```FASTBuild Configuration .IncludeSearchPath = 'Code/Core/;Code/Engine/;' ``` -------------------------------- ### FASTBuild Alias Function Syntax Correction Source: https://www.fastbuild.org/docs/errors/1023 This snippet demonstrates the correct syntax for defining an Alias function in FASTBuild. The error occurs when the function is called without its header, as shown in the 'Output' example. The 'Fix' example illustrates the proper way to include the function header. ```FASTBuild Alias( 'MyAlias' ) { .Targets = { 'a', 'b' } } ``` -------------------------------- ### Project Configuration Options Source: https://www.fastbuild.org/docs/functions/vcxproject This section outlines the available configuration parameters for a FastBuild project, including paths for debugging symbols, Android-specific build and debug settings, and deployment configurations for Xbox360. ```APIDOC ## Project Configuration Parameters ### Description This endpoint details the various optional parameters that can be used to configure a FastBuild project. ### Method N/A (Configuration parameters) ### Endpoint N/A (Configuration parameters) ### Parameters #### Query Parameters - **AdditionalSymbolSearchPaths** (String) - Optional - Path to additional symbols to be used when debugging. - **AndroidApkLocation** (String) - Optional - Location of APK for Android Game Development Extension. - **AndroidDebugComponent** (String) - Optional - Debug component for Android Game Development Extension. - **AndroidDebugTarget** (String) - Optional - Debug target for Android Game Development Extension. - **AndroidJdb** (String) - Optional - JDB for Android Game Development Extension. - **AndroidLldbPostAttachCommands** (String) - Optional - LLDB post attach commands for Android Game Development Extension. - **AndroidLldbStartupCommands** (String) - Optional - LLDB startup commands for Android Game Development Extension. - **AndroidPostApkInstallCommands** (String) - Optional - Post APK install commands for Android Game Development Extension. - **AndroidPreApkInstallCommands** (String) - Optional - Pre APK install commands for Android Game Development Extension. - **AndroidSymbolDirectories** (String) - Optional - Symbol dirs for Android Game Development Extension. - **AndroidWaitForDebugger** (String) - Optional - Wait for Debugger for Android Game Development Extension. - **LaunchFlags** (String) - Optional - Launch flags for Android Game Development Extension. - **PlatformToolset** (String) - Optional - Specify PlatformToolset. Example: `.PlatformToolset = 'v120'` - **DeploymentType** (String) - Optional - Specify deployment type for Xbox360. - **DeploymentFiles** (String) - Optional - Specify files to add to deployment for Xbox360. - **RootNamespace** (String) - Optional - Set the RootNamespace for a project. Example: `.RootNamespace = 'MyProject'` ### Request Example ```json { "AdditionalSymbolSearchPaths": "/path/to/symbols", "AndroidApkLocation": "/path/to/app.apk", "PlatformToolset": "v140", "DeploymentType": "Network", "RootNamespace": "MyGame" } ``` ### Response #### Success Response (200) N/A (Configuration parameters are applied directly) #### Response Example N/A ``` -------------------------------- ### FASTBuild Alias Syntax Error: Missing String Start Token Source: https://www.fastbuild.org/docs/errors/1001 This error occurs in FASTBuild configuration files when the 'Alias' directive expects a quoted string for its name parameter, but the opening quote is missing. Ensure the alias name is enclosed in single or double quotes. ```FASTBuild Alias( name ) { } // Output: c:\Test\fbuild.bff(1):(8) FASTBuild Error #1001 - Alias() - Missing string start token " or '. Alias( name ) ^ \--here // Fix: Alias( 'name' ) { } ``` -------------------------------- ### Copy with Pre-Build Dependencies in FastBuild Source: https://www.fastbuild.org/docs/functions/copy Demonstrates using .PreBuildDependencies to ensure that source files are generated or updated before the copy operation. This is crucial for build reliability when source files are dynamically created. ```FastBuild Copy( 'CopyGeneratedFiles' ) { .Source = { 'generated/scripts/program.exe', 'generated/scripts/program.pdb' } .Dest = 'bin/' .PreBuildDependencies = 'Compile' } ``` -------------------------------- ### FASTBuild Struct Concatenation Source: https://www.fastbuild.org/docs/syntaxguide Illustrates how structs can be concatenated using the '+' operator in FASTBuild. The operation is applied recursively to each member within the structs. ```FASTBuild .StructA = [ .ArrayOfStrings = { 'String1', 'String2' } .String = 'String' ] .StructB = [ .ArrayOfStrings = { 'String3' } .String = '!' ] .StructC = .StructA + .StructB // StructC now contains .ArrayOfStrings = { 'String1', 'String2', 'String3' } and .String = 'String!' ``` -------------------------------- ### Executable Build Task Source: https://www.fastbuild.org/docs/functions/executable Configures the build process for creating an executable by linking libraries. It supports various linker options and build-time substitutions. ```APIDOC ## Executable Build Task ### Description Builds an executable by linking together one or more libraries. This task allows for detailed configuration of the linking process, including specifying the linker, output, options, libraries, and more. ### Method BUILD ### Endpoint /websites/fastbuild/executable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **alias** (string) - Optional - An alias for the executable. - **Linker** (string) - Optional - The linker executable to use. - **LinkerOutput** (string) - Optional - The output path for the linker. - **LinkerOptions** (string) - Optional - Options to pass to the linker. - **Libraries** (array of strings) - Required - Libraries to link into the executable. - **Libraries2** (array of strings) - Optional - Secondary libraries to link into the executable. - **LinkerLinkObjects** (boolean) - Optional - Use link objects instead of libraries (default: false). - **LinkerAssemblyResources** (array of strings) - Optional - List of assembly resources to use. - **LinkerStampExe** (string) - Optional - Executable to run post-link to stamp the executable. - **LinkerStampExeArgs** (string) - Optional - Arguments to pass to LinkerStampExe. - **LinkerType** (string) - Optional - Specify the linker type (e.g., auto, msvc, gcc, clang-orbis). Default is 'auto'. - **LinkerAllowResponseFile** (boolean) - Optional - Allow response files if not auto-detected (default: false). - **LinkerForceResponseFile** (boolean) - Optional - Force use of response files (default: false). - **PreBuildDependencies** (array of strings) - Optional - Force targets to be built before this Executable. - **ConcurrencyGroupName** (string) - Optional - Concurrency group for this task. - **Environment** (object) - Optional - Environment variables to use for local build. ### Request Example ```json { "alias": "myApp", "Linker": "msvc", "LinkerOutput": "bin/myApp.exe", "LinkerOptions": "/SUBSYSTEM:WINDOWS", "Libraries": ["lib/core.lib", "lib/utils.lib"], "Libraries2": ["lib/plugin.lib"], "LinkerType": "msvc" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the build status (e.g., 'success', 'failed'). - **message** (string) - A message detailing the build outcome. #### Response Example ```json { "status": "success", "message": "Executable 'myApp' built successfully." } ``` ### Build-Time Substitutions #### LinkerOptions - **%1** - Input file(s) for the link, as specified by the 'Libraries' and 'Libraries2' parameters. - **%1[0]** - Input file(s) for the link, as specified by 'Libraries' only. - **%1[1]** - Input file(s) for the link, as specified by 'Libraries2' only. - **%2** - Output assembly as specified by 'LinkerOutput'. - **%3** - AssemblyResources as specified in 'LinkerAssemblyResources'. For use with /ASSEMBLYRESOURCE"%3" (MSVC Only) ``` -------------------------------- ### Specify Platform Toolset Source: https://www.fastbuild.org/docs/functions/vcxproject Allows specifying the PlatformToolset for the project. This determines which toolchain (e.g., compiler, linker) is used. The example demonstrates setting it to 'v120'. ```text .PlatformToolset = 'v120' ``` -------------------------------- ### Configure VSSolution Configurations Source: https://www.fastbuild.org/docs/functions/vssolution Defines the platform and configuration pairs that will appear in the Visual Studio Solution. This allows for fine-grained control over build configurations, including custom solution-level configurations that may differ from project-level ones. ```FASTBuild // Basic Solution Configurations .Solution_Config_Debug = [ .Platform = 'Win32', .Config = 'Debug' ] .Solution_Config_Release = [ .Platform = 'Win32', .Config = 'Release' ] .SolutionConfigs = { .Solution_Config_Debug, .Solution_Config_Release } // Custom Solution Configurations .DebugDirectX = [ .Config = 'Debug-DirectX', .Platform = 'Win32', .SolutionConfig = 'Debug', .SolutionPlatform = 'Win32-DirectX' ] .DebugOpenGL = [ .Config = 'Debug-OpenGL', .Platform = 'Win32', .SolutionConfig = 'Debug', .SolutionPlatform = 'Win32-OpenGL' ] ``` -------------------------------- ### FASTBuild Struct Inheritance and Extension Source: https://www.fastbuild.org/docs/syntaxguide Demonstrates how the 'Using' function can be used to inherit and override properties from other structs in FASTBuild. StructB inherits from StructA and adds its own property. ```FASTBuild .StructA = [ .StringA = 'a' ] .StructB = [ Using( .StructA ) // "inherit" - StructB now has a StringA property .StringB = 'b' // "extend" - An additional property ] ``` -------------------------------- ### FASTBuild Struct Declaration Source: https://www.fastbuild.org/docs/syntaxguide Shows how to declare a struct in FASTBuild, which allows grouping of variables. Structs can contain variables of any type, including other structs and arrays of structs. ```FASTBuild .MyStruct = [ .MyString = "string" .MyInt = 7 ] ``` -------------------------------- ### Solution Build and Deploy Projects Source: https://www.fastbuild.org/docs/functions/vssolution Specify which projects within the solution should be built or deployed when the solution is built or deployed. ```APIDOC ## Solution Build and Deploy Projects ### Description Defines which projects are included when a solution build is triggered and which projects are targeted for deployment. ### Method Configuration directive ### Endpoint N/A (Configuration file directive) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```fastbuild .SolutionBuildProjects = 'Project' // Or an array of strings .SolutionDeployProjects = 'Project' // Or an array of strings ``` ### Response #### Success Response (200) N/A (Configuration directive) #### Response Example N/A ``` -------------------------------- ### Project Build Configuration Source: https://www.fastbuild.org/docs/functions/vcxproject Configure build commands, output paths, and related settings for FASTBuild projects. ```APIDOC ## Project Build Configuration ### Description Configure build commands, output paths, and related settings for FASTBuild projects. ### Method N/A (Configuration Settings) ### Endpoint N/A (Configuration Settings) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ## Configuration Options: - **ProjectCleanCommand** (String) - (Optional) - Command to clean the project. Example: `.ProjectCleanCommand = 'cd ^$(SolutionDir)\..\..Code & fbuild -ide Clean-$(ProjectName)-^$(Configuration)'` - **Output** (String) - (Optional) - Output generated by compilation. Example: `.Output = 'tmp/Debug/bin/MyExe.exe'` - **OutputDirectory** (String) - (Optional) - Output directory for Visual Studio. Example: `.OutputDirectory = 'tmp/Debug/bin/'` - **IntermediateDirectory** (String) - (Optional) - Intermediate directory for Visual Studio. Example: `.IntermediateDirectory = 'tmp/'` - **BuildLogFile** (String) - (Optional) - Build log file for Visual Studio. Example: `.BuildLogFile = 'tmp/^$(ProjectName)-^$(Configuration).log'` - **LayoutDir** (String) - (Optional) - Directory to prepare Layout (for XboxOne). Example: `.LayoutDir = 'tmp/Layout/'` - **LayoutExtensionFilter** (String) - (Optional) - Files to filter from Layout (for XboxOne). Example: `.LayoutExtensionFilter = '.pdb;.map;'` ``` -------------------------------- ### FASTBuild Variable Scoping Source: https://www.fastbuild.org/docs/syntaxguide Explains variable scoping in FASTBuild. Variables declared in a scope are valid in sub-scopes. Modifications within a sub-scope do not affect the parent scope. ```FASTBuild .MyString = 'hello' { .MyString = 'goodbye' } ; Mystring contains 'hello' again { .MyString + ' hello' ; string contains 'hello hello' } ; Mystring contains 'hello' again ``` -------------------------------- ### Copy Single File with FastBuild Source: https://www.fastbuild.org/docs/functions/copy Demonstrates how to copy a single file to a specified destination directory using the Copy function. The .Source parameter specifies the file to copy, and .Dest specifies the target directory. ```FastBuild Copy( 'CopyFile' ) { .Source = 'library/library.dll' .Dest = 'out/bin/' } ``` -------------------------------- ### Manually Specify Preprocessor Definitions for Intellisense Source: https://www.fastbuild.org/docs/functions/vcxproject Allows manual specification of preprocessor definitions for Intellisense. If the .Target is set, FASTBuild can auto-detect these, but manual settings override auto-detection. ```FASTBuild Configuration .PreprocessorDefinitions = 'DEBUG;MY_LIB_DEFINE;__WINDOWS__;' ``` -------------------------------- ### FASTBuild Variable Modification and Concatenation Source: https://www.fastbuild.org/docs/syntaxguide Shows how to modify existing variables in FASTBuild, including concatenation with the '+' operator and subtraction with the '-' operator. Re-assignment is also demonstrated. ```FASTBuild ; Declaration .MyString = "hello" ; Concatenation .MyString + " there" + " FASTBuild user" ; Subtraction .MyString - " user" - "hello " ; Re-assignment .MyString = "hello" ``` -------------------------------- ### FASTBuild Project Build Commands Source: https://www.fastbuild.org/docs/functions/vcxproject Defines the commands to be executed when 'build project' or 'rebuild project' is selected in Visual Studio. Supports runtime macro substitution for dynamic command generation. ```FASTBuild .ProjectBuildCommand = 'fbuild -ide -dist -cache MyProject-X64-Debug' .ProjectBuildCommand = 'cd ^$(SolutionDir)\..\..\Code\ & fbuild -ide -dist -cache ^$(ProjectName)-^$(Configuration)' .ProjectRebuildCommand = 'fbuild -ide -clean -dist -cache MyProject-X64-Debug' .ProjectRebuildCommand = 'cd ^$(SolutionDir)\..\..\Code\ & fbuild -ide -clean -dist -cache ^$(ProjectName)-^$(Configuration)' ``` -------------------------------- ### Manually Specify Assembly Search Paths for Intellisense Source: https://www.fastbuild.org/docs/functions/vcxproject Configures the paths where Intellisense should look for .NET assemblies. This is useful for projects referencing external libraries. ```FASTBuild Configuration .AssemblySearchPath = '$WindowsSDK$/References/CommonConfiguration/Neutral' ``` -------------------------------- ### BFF Print Function Example Source: https://www.fastbuild.org/docs/functions/print Demonstrates how to use the Print() function within a BFF file to output variable values during parsing. This helps in debugging and understanding the configuration process. ```bff .X86_Debug = [ .Config = 'Debug' .Platform = 'X86' ] .X86_Release = [ .Config = 'Release' .Platform = 'X86' ] .X64_Debug = [ .Config = 'Debug' .Platform = 'X64' ] .X64_Release = [ .Config = 'Release' .Platform = 'X64' ] .Configs = { .X86_Debug, .X86_Release, .X64_Debug, .X64_Release } ForEach( .Config in .Configs ) { Using( .Config ) .TargetName = '$Platform$-$Config$' Print( 'TargetName = $TargetName$' ) } ``` -------------------------------- ### Specify Build Log File for Visual Studio Source: https://www.fastbuild.org/docs/functions/vcxproject Defines the path for the build log file. This allows for detailed logging of the compilation process, optionally including project and configuration names. ```FASTBuild Configuration .BuildLogFile = 'tmp/^$(ProjectName)-^$(Configuration).log' ``` -------------------------------- ### FASTBuild: Fixing Undefined Variable Reference Source: https://www.fastbuild.org/docs/errors/1009 This example shows the fix for FASTBuild Error #1009. By defining '.OtherVar' before it is referenced in the assignment of '.Var', the error is resolved. ```FASTBuild .OtherVar = 'String' .Var = '$OtherVar$' ``` -------------------------------- ### Specify Additional Compiler Options for Intellisense Source: https://www.fastbuild.org/docs/functions/vcxproject Provides a way to add extra compiler options that Intellisense should consider. This can be used to fine-tune Intellisense behavior or include specific compiler flags. ```FASTBuild Configuration .AdditionalOptions = '/Zm100' ```