Final port to fastbuild.

Support update of game.dll separately
Made some alias and stuff
still remains the shader compiler to add to the solution.
Solution is also generated by fbuild (nice)
This commit is contained in:
2026-01-08 16:26:01 -05:00
parent 1137466472
commit 9510951aee
17 changed files with 2204 additions and 1123 deletions

View File

@@ -7,6 +7,7 @@
//------------------------------------------------------------------------------
Settings
{
.CachePath = 'C:\FASTBuild_Cache\' // Use a local SSD or network path
#if __WINDOWS__
#import TMP
.Environment = { "PATH=$VS_PATH$;$WINDOWS_SDK_2019_PATH$",
@@ -15,6 +16,14 @@ Settings
#endif
}
//------------------------------------------------------------------------------
// Global Output Paths
//------------------------------------------------------------------------------
.BinPath = 'bin'
.OutputBase = 'Intermediate'
.CommonWinLibs = ' kernel32.lib user32.lib gdi32.lib dxguid.lib Ws2_32.lib dxgi.lib'
.ProjectConfigs = {}
//------------------------------------------------------------------------------
// Config Defines
//------------------------------------------------------------------------------
@@ -22,26 +31,12 @@ Settings
[
.CompilerOptions = ' -DDEBUG -DPROFILING_ENABLED'
.CompilerOptionsC = .CompilerOptions
.BuildConfigName = 'Debug'
#if !BUILDING_FROM_TESTS
// Build writable files (Perforce "Open for edit") outside of Unity
// to improve iteration times.
// - Only in Debug as this impacts performance (inlining)
// - Only when not building from tests (FASTBuild building itself)
.UnityInputIsolateWritableFiles = true
// Also not when building on CI (which builds from git).
#if CI_BUILD
.UnityInputIsolateWritableFiles = false
#endif
#endif
]
.Profile_Config =
[
.CompilerOptions = ' -DRELEASE -DPROFILING_ENABLED'
.CompilerOptionsC = .CompilerOptions
.BuildConfigName = 'Profile'
]
.Release_Config =
@@ -49,7 +44,6 @@ Settings
.CompilerOptions = ' -DRELEASE'
.CompilerOptionsC = .CompilerOptions
.CompilerOptionsDeoptimized = .CompilerOptions
.BuildConfigName = 'Release'
]
@@ -140,24 +134,21 @@ Settings
#endif
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
.OutputBase = 'Intermediate'
//------------------------------------------------------------------------------
// VisualStudio Project Generation
//------------------------------------------------------------------------------
#if __WINDOWS__
.ProjectCommon =
[
.ProjectBuildCommand = 'cd ^$(SolutionDir)\..\..\Code\ & fbuild -vs -dist -monitor -cache ^$(ProjectName)-^$(Configuration)'
.ProjectRebuildCommand = 'cd ^$(SolutionDir)\..\..\Code\ & fbuild -vs -dist -monitor -cache -clean ^$(ProjectName)-^$(Configuration)'
.OutputDirectory = '^$(SolutionDir)\Intermediate'
.IntermediateDirectory = '^$(SolutionDir)\Intermediate'
.BuildLogFile = '^$(SolutionDir)\Intermediate\^$(ProjectName)-^$(Configuration).log'
.Platform = 'x64'
.PlatformToolset = '$VS_PlatformToolset$'
.ProjectBuildCommand = 'cd ^$(SolutionDir) & misc\fbuild -vs -dist -monitor -cache ^$(ProjectName)-^$(Configuration)'
.ProjectRebuildCommand = 'cd ^$(SolutionDir) & mics\fbuild -vs -dist -monitor -cache -clean ^$(ProjectName)-^$(Configuration)'
.OutputDirectory = '^$(SolutionDir)\bin'
.IntermediateDirectory = '^$(SolutionDir)\Intermediate'
.BuildLogFile = '^$(SolutionDir)\Intermediate\^$(ProjectName)-^$(Configuration).log'
.Platform = 'x64'
.PlatformToolset = '$VS_PlatformToolset$'
.LocalDebuggerCommand = '^$(SolutionDir)\bin\^$(Configuration)\^$(ProjectName).exe'
.LocalDebuggerWorkingDirectory = '^$(SolutionDir)\bin\^$(Configuration)\'
]
.Project_x64_Debug = [ Using( .ProjectCommon ) .SolutionPlatform = 'x64' .SolutionConfig = 'Debug' .Config = '$SolutionPlatform$-$SolutionConfig$' ]
@@ -192,7 +183,6 @@ Settings
ForEach( .BuildConfig in .BuildConfigs )
{
Using( .BuildConfig )
Alias( 'All-$Platform$-$BuildConfigName$' ) { .Targets = .'Targets_$Platform$_$BuildConfigName$' }
}
@@ -205,11 +195,7 @@ Alias( 'Exes' )
// Aliases : All-$Platform$
//------------------------------------------------------------------------------
.Platforms =
{
'x64',
'x64Clang',
}
.Platforms = { 'x64', 'x64Clang' }
.PlatformConfigs_x64 = { 'Debug', 'Profile', 'Release' }
.PlatformConfigs_x64Clang = { 'Debug', 'Profile', 'Release' }
@@ -220,20 +206,7 @@ ForEach( .Platform in .Platforms )
.Targets = {}
ForEach( .Config in .'PlatformConfigs_$Platform$' )
{
// TODO:B Exclude windows configs that don't work yet
// x64Clang Analyze config - not working yet
// x64Clang ASan config - not working yet
// x64Clang TSan config - not working yet (not supported by Clang on Windows)
// x64 ASan config - not working yet
// x64 TSan config - not working yet (not supported by MSVC on Windows)
If( !( ( .Platform == 'x64Clang' ) && ( .Config == 'Analyze' ) ) &&
!( ( .Platform == 'x64Clang' ) && ( .Config == 'ASan' ) ) &&
!( ( .Platform == 'x64Clang' ) && ( .Config == 'TSan' ) ) &&
!( ( .Platform == 'x64' ) && ( .Config == 'ASan' ) ) &&
!( ( .Platform == 'x64' ) && ( .Config == 'TSan' ) ) )
{
^Targets + { 'All-$Platform$-$Config$' }
}
}
}
}
@@ -249,3 +222,38 @@ ForEach( .Platform in .Platforms )
}
#endif
//------------------------------------------------------------------------------
// Intuitive Aliases (msvc / clang)
//------------------------------------------------------------------------------
// 1. Map 'msvc' and 'clang' to the full platform builds
Alias( 'msvc' ) { .Targets = 'All-x64' }
Alias( 'clang' ) { .Targets = 'All-x64Clang' }
// 2. Map specific compiler + config combinations
.Configs = { 'Debug', 'Profile', 'Release' }
ForEach( .Config in .Configs )
{
// Allows: fbuild msvc-debug, fbuild msvc-release, etc.
Alias( 'msvc-$Config$' ) { .Targets = 'All-x64-$Config$' }
// Allows: fbuild clang-debug, fbuild clang-release, etc.
Alias( 'clang-$Config$' ) { .Targets = 'All-x64Clang-$Config$' }
}
// 3. Map config-only aliases across both compilers
// Allows: fbuild debug, fbuild release
ForEach( .Config in .Configs )
{
Alias( '$Config$' ) { .Targets = { 'msvc-$Config$', 'clang-$Config$' } }
}
// Generate solution
VSSolution( 'GenerateSolution' )
{
.SolutionOutput = 'Juliet.sln'
.SolutionProjects = { 'Juliet', 'Game', 'JulietApp' }
.SolutionConfigs = .ProjectConfigs
.SolutionBuildProject = 'JulietApp'
}
Alias( 'gen' ) { .Targets = 'GenerateSolution' }