1012 lines
58 KiB
Plaintext
Executable File
1012 lines
58 KiB
Plaintext
Executable File
##########################################################################################################################
|
|
# RULES FILE
|
|
# Usage & Details : https://devstar.rockstargames.com/wiki/index.php/Dev:Project_builder3#game.rules
|
|
##########################################################################################################################
|
|
|
|
# Rules : independent of exporter.
|
|
Rules {
|
|
#-------------------------------------------------------------------------------------------
|
|
# Setup Scratch ( make your own vars here and reuse with <var> syntax. )
|
|
#-------------------------------------------------------------------------------------------
|
|
# Scratch.BuildDir = '$(RS_BUILDBRANCH)'
|
|
# need it to be this for now
|
|
Scratch.BuildDir = '$(RS_TITLE_UPDATE)'
|
|
Scratch.CompressMap = '"$(RS_TOOLSROOT)\bin\coding\compressmap"'
|
|
Scratch.CompressMap64 = '"$(RS_TOOLSROOT)\bin\coding\compressmap_x64"'
|
|
Scratch.Ps3Bin = '$(SCE_PS3_ROOT)\host-win32\sn\bin\ps3bin'
|
|
Scratch.DumpBin = '$(RS_TOOLSROOT)\script\util\dumpbin.rb'
|
|
Scratch.StripObjects = '$(RS_TOOLSROOT)/bin/coding/python/stripobjects.exe'
|
|
Scratch.XbeCopy = '"$(XEDK)\bin\win32\xbecopy"'
|
|
|
|
Scratch.Xbox[Platform=='Durango'||Platform=='Gaming.Xbox.XboxOne.x64'||Platform=='Gaming.Xbox.Scarlett.x64'] = 'true'
|
|
Scratch.Gdk[Platform=='Gaming.Xbox.XboxOne.x64'||Platform=='Gaming.Desktop.x64'||Platform=='Gaming.Xbox.Scarlett.x64'] = 'true'
|
|
Scratch.SCE[Platform=='Prospero'||Platform=='Orbis'] = 'true'
|
|
Scratch.Objects = '$(RS_CODEBRANCH)/objects'
|
|
Scratch.Intermediate = '<Scratch.Objects>/$(MSBuildProjectName)/$(PlatformName)_$(Configuration)/$(PlatformToolset)'
|
|
|
|
# 'Architecture'
|
|
Scratch.Arch[Platform=='PS3'] = 'psn'
|
|
Scratch.Arch[Platform=='Xbox 360'] = 'xenon'
|
|
Scratch.Arch[Platform=='Win32'] = 'win32'
|
|
Scratch.Arch[Platform=='x64'] = 'win64'
|
|
Scratch.Arch[Platform=='Orbis'] = 'orbis'
|
|
Scratch.Arch[Platform=='Prospero'] = 'prospero'
|
|
Scratch.Arch[Platform=='Durango'] = 'durango'
|
|
Scratch.Arch[Platform=='Gaming.Xbox.XboxOne.x64'] = 'durango_gdk'
|
|
Scratch.Arch[Platform=='Gaming.Desktop.x64'] = 'win64_gdk'
|
|
Scratch.Arch[Platform=='Gaming.Xbox.Scarlett.x64'] = 'scarlett'
|
|
Scratch.Arch[Platform=='IOS'] = 'ios'
|
|
Scratch.Arch[Platform=='Yeti'] = 'linux'
|
|
Scratch.Arch[Platform=='GGP'] = 'linux'
|
|
Scratch.Arch[Platform=='Android'] = 'android'
|
|
Scratch.Arch[Platform=='NX64'] = 'nx'
|
|
|
|
Scratch.ForceInclude = '_<Config>.h'
|
|
Scratch.ForceInclude[Config=='Debug_IL'] = '_debug.h'
|
|
Scratch.ForceInclude[Config=='Beta_IL'] = '_beta.h'
|
|
Scratch.ForceInclude[Config=='BankRelease_IL'] = '_bankrelease.h'
|
|
|
|
# force includes for LTCG/LTO configs
|
|
Scratch.ForceInclude[Config=='Profile_LTCG'] = '_profile.h'
|
|
Scratch.ForceInclude[Config=='Release_LTCG'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='Final_LTCG'] = '_final.h'
|
|
Scratch.ForceInclude[Config=='Release_PGI'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='BankRelease_LTCG'] = '_bankrelease.h'
|
|
|
|
# MS Clang-CL Targets
|
|
Scratch.ForceInclude[Config=='Debug_Clang'] = '_debug.h'
|
|
Scratch.ForceInclude[Config=='Beta_Clang'] = '_beta.h'
|
|
Scratch.ForceInclude[Config=='BankRelease_Clang'] = '_bankrelease.h'
|
|
Scratch.ForceInclude[Config=='BankRelease_Clang_LTCG'] = '_bankrelease.h'
|
|
Scratch.ForceInclude[Config=='Profile_Clang'] = '_profile.h'
|
|
Scratch.ForceInclude[Config=='Profile_Clang_LTCG'] = '_profile.h'
|
|
Scratch.ForceInclude[Config=='Release_Clang'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='Release_Clang_LTCG'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='Final_Clang'] = '_final.h'
|
|
Scratch.ForceInclude[Config=='Final_Clang_LTCG'] = '_final.h'
|
|
|
|
# DX11 name mangling : pain in the t*ts
|
|
Scratch.ForceInclude[Config=='Debug DX11'] = '_dx11_debug.h'
|
|
Scratch.ForceInclude[Config=='Beta DX11'] = '_dx11_beta.h'
|
|
Scratch.ForceInclude[Config=='BankRelease DX11']= '_dx11_bankrelease.h'
|
|
Scratch.ForceInclude[Config=='Release DX11'] = '_dx11_release.h'
|
|
Scratch.ForceInclude[Config=='Profile DX11'] = '_dx11_profile.h'
|
|
Scratch.ForceInclude[Config=='Final DX11'] = '_dx11_final.h'
|
|
|
|
Scratch.ForceInclude[Config=='Debug 7.0'] = '_debug.h'
|
|
Scratch.ForceInclude[Config=='Beta 7.0'] = '_beta.h'
|
|
Scratch.ForceInclude[Config=='BankRelease 7.0']= '_bankrelease.h'
|
|
Scratch.ForceInclude[Config=='Release 7.0'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='Profile 7.0'] = '_profile.h'
|
|
Scratch.ForceInclude[Config=='Final 7.0'] = '_final.h'
|
|
Scratch.ForceInclude[Config=='Master 7.0'] = '_master.h'
|
|
|
|
# force includes for Address Sanitizer configs
|
|
Scratch.ForceInclude[Config=='Release_ASAN'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='Release_ASAN_Clang'] = '_release.h'
|
|
Scratch.ForceInclude[Config=='BankRelease_ASAN'] = '_bankrelease.h'
|
|
Scratch.ForceInclude[Config=='BankRelease_ASAN_Clang'] = '_bankrelease.h'
|
|
|
|
# force includes for master configs
|
|
Scratch.ForceInclude[Config=~'Master'] = '_master.h'
|
|
|
|
# Lib suffixes for Yeti
|
|
Scratch.LibSuffix = ''
|
|
Scratch.LibSuffix[Config=~'Debug'] = 'd'
|
|
Scratch.LibSuffix[Config=~'Beta'] = 'b'
|
|
|
|
|
|
# force include for steam
|
|
Scratch.ForceInclude[Config=='SteamBeta'] = '_beta.h'
|
|
Scratch.ForceInclude[Config=='SteamRelease']= '_release.h'
|
|
Scratch.ForceInclude[Config=='SteamFinal'] = '_final.h'
|
|
Scratch.ForceInclude[Config=='SteamMaster'] = '_master.h'
|
|
|
|
# force include for Social Club DLL
|
|
Scratch.ForceInclude[Config=='RgscDebug'] = '_debug.h'
|
|
Scratch.ForceInclude[Config=='RgscRelease'] = '_final.h'
|
|
|
|
# MS specific Clang
|
|
Scratch.MSClang[Config=~'_Clang' && Platform=='Gaming.Xbox.Scarlett.x64'] = 'true'
|
|
Scratch.MSClang[Config!~'_Clang'] = ''
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# General
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.General.Rtti = 'false'
|
|
Settings.General.Rtti[Environment.RS_BRANCHNAME=='dev_gen9'] = 'true'
|
|
Settings.General.Rtti[Config=~'Beta'||Config=~'Debug'] = 'true'
|
|
|
|
Settings.General.IsolateConfigurationsOnDeploy = 'true'
|
|
|
|
Condition [Platform=='Prospero'] {
|
|
Settings.General.IncludePath += '$(RS_CODEBRANCH)\sdk\prospero\target\include'
|
|
Settings.General.LibraryPath += '$(RS_CODEBRANCH)\sdk\prospero\target\lib'
|
|
}
|
|
|
|
Condition [Platform=='Durango'] {
|
|
Settings.General.IncludePath += '$(DurangoXDK)/$(XDKEDITION)/xdk/include/winrt'
|
|
Settings.General.IncludePath += '$(DurangoXDK)/$(XDKEDITION)/xdk/include/um'
|
|
Settings.General.IncludePath += '$(DurangoXDK)/$(XDKEDITION)/xdk/include/shared'
|
|
Settings.General.LibraryPath += '$(RAGE_DIR)/lib'
|
|
Settings.General.LibraryPath += '$(DurangoXDK)/$(XDKEDITION)/xdk/lib'
|
|
Settings.General.SDKReference += 'Xbox Services API, Version=8.0'
|
|
Settings.General.SDKReference += 'Xbox.Game.Chat.2.Cpp.API, Version=8.0'
|
|
}
|
|
|
|
Condition [Scratch.Gdk!=''] {
|
|
Settings.General.IncludePath += '$(GXDKLatest)gameKit\Include;$(GXDKLatest)gameKit\Include\mf_x'
|
|
Settings.General.IncludePath[Platform=='Gaming.Desktop.x64' || Platform=='Gaming.Xbox.XboxOne.x64'] += '$(GXDKLatest)gameKit\Include\XboxOne\'
|
|
Settings.General.IncludePath[Platform=='Gaming.Xbox.Scarlett.x64'] += '$(GXDKLatest)gameKit\Include\Scarlett\'
|
|
Settings.General.IncludePath += '$(GRDKLatest)ExtensionLibraries\Xbox.Game.Chat.2.Cpp.API\DesignTime\CommonConfiguration\neutral\Include'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Scratch.Gdk!=''] {
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.XboxOne.x64' || Platform =='Gaming.Xbox.Scarlett.x64'] += 'xmem.lib;xgameruntime.lib;psapi.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.XboxOne.x64'] += 'dstorage_x.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'dstorage_xs.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.XboxOne.x64'] += 'GameChat2.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'GameChat2.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'common.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'crash_generation_client.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'crash_report_sender.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'exception_handler.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform =='Gaming.Xbox.Scarlett.x64'] += 'advapi32.lib'
|
|
|
|
Settings.Linker.AdditionalDependencies += '$(Console_Libs);%(XboxExtensionsDependencies)'
|
|
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries = '$(IgnoreSpecificDefaultLibraries);'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'advapi32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'comctl32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'comsupp.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'dbghelp.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'gdi32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'gdiplus.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'guardcfw.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'kernel32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'mmc.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'msimg32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'msvcole.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'msvcoled.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'mswsock.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ntstrsafe.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2autd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2auto.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2d.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2ui.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2uid.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oleacc.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oleaut32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oledlg.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oledlgd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oldnames.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'runtimeobject.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'shell32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'shlwapi.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'strsafe.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'urlmon.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'user32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'userenv.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'wlmole.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'wlmoled.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'onecore.lib;'
|
|
|
|
Settings.General.GDKExtLibNames = 'Xbox.Game.Chat.2.Cpp.API;Xbox.Services.API.C'
|
|
|
|
Settings.Linker.GenerateDebugInformation = 'DebugFull'
|
|
|
|
# Add this back in to strip PDB generation if needed
|
|
# Settings.Linker.GenerateDebugInformation[Config=~'Master'||Config=='Final'] = 'false'
|
|
}
|
|
|
|
Settings.General.EnableASAN[Config=~'_ASAN'] = 'true'
|
|
|
|
|
|
Condition [Platform=='Gaming.Xbox.XboxOne.x64'] {
|
|
Settings.General.LibraryPath += '$(RAGE_DIR)/lib'
|
|
|
|
Settings.General.WholeProgramOptimization[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'true'
|
|
Settings.Linker.LinkTimeCodeGeneration[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'UseLinkTimeCodeGeneration'
|
|
}
|
|
|
|
# Required for ETW. Must be after xgameplatform.lib in the link order.
|
|
Condition [ProjectType=='Exe' && Config!~'Tool' && Config!~'Final' && Config!~'Master'] {
|
|
Settings.Linker.AdditionalOptions[Platform=='Gaming.Xbox.XboxOne.x64'||Platform=='Gaming.Xbox.Scarlett.x64'] += '"onecore.lib"'
|
|
}
|
|
|
|
|
|
Condition [Platform=='Gaming.Xbox.Scarlett.x64'] {
|
|
Settings.General.LibraryPath += '$(RAGE_DIR)/lib'
|
|
Settings.General.LibraryPath[Config=~'Debug'] += '$(RAGE_DIR)/3rdparty/breakpad/x64/lib/scarlett/debug'
|
|
Settings.General.LibraryPath[Config!~'Debug'] += '$(RAGE_DIR)/3rdparty/breakpad/x64/lib/scarlett/release'
|
|
|
|
# enable /GL
|
|
Settings.General.WholeProgramOptimization[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'true'
|
|
|
|
# enable /ltcg:incremental
|
|
Settings.Linker.LinkTimeCodeGeneration[Config=~'_LTCG'||Config=~'_PGI'] = 'UseFastLinkTimeCodeGeneration'
|
|
|
|
# enable /ltcg
|
|
Settings.Linker.LinkTimeCodeGeneration[Config=~'Master'] = 'UseLinkTimeCodeGeneration'
|
|
|
|
# Set LTCG flag for any build that uses LTCG - necessary to disable tmcommands_ms linker hacks
|
|
Settings.Compiler.AdditionalOptions[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = '/D "LTCG=1"'
|
|
|
|
Settings.Compiler.SupportJustMyCode[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'false'
|
|
}
|
|
|
|
# Clang-cl doesn't know what to do with this flag so we have to manually disable it, -flto replaces it
|
|
Condition [Scratch.MSClang!=''] {
|
|
Settings.Linker.LinkTimeCodeGeneration = 'false'
|
|
Settings.Linker.AdditionalOptions += '/lldmap'
|
|
Settings.Compiler.FloatingPointModel = 'Strict' # disable fast math.
|
|
}
|
|
|
|
Condition [Platform=='Prospero' || Scratch.MSClang!=''] {
|
|
# Set LTCG flag for any build that uses LTCG - necessary to disable tmcommands_ms linker hacks
|
|
Settings.Compiler.AdditionalOptions[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = '-flto -D "LTCG=1"'
|
|
}
|
|
|
|
|
|
|
|
|
|
Condition [Platform=='Gaming.Desktop.x64'] {
|
|
Settings.General.LibraryPath += '$(RAGE_DIR)/lib'
|
|
|
|
Settings.General.WholeProgramOptimization[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'true'
|
|
Settings.Linker.LinkTimeCodeGeneration[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'UseLinkTimeCodeGeneration'
|
|
}
|
|
|
|
# Disabled all LTCG options for all PC configs (we don't intend to ship with it, but leaving it here in case this or other projects need it later)
|
|
#Condition [Platform=='x64'] {
|
|
# Settings.General.WholeProgramOptimization[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'true'
|
|
# Settings.Linker.LinkTimeCodeGeneration[Config=~'_LTCG'||Config=~'_PGI'||Config=~'Master'] = 'UseLinkTimeCodeGeneration'
|
|
#}
|
|
|
|
#
|
|
# Note the suffix for the exporter eg. _vs_2010 is not set here, this is responsibility of the exporter rules
|
|
#
|
|
|
|
Action Settings.General.OutputDirectoryName {
|
|
# These files are never checked in, so things that aren't an exe can be considered intermediate
|
|
[ProjectType!='Exe'] = '<Scratch.Intermediate>/'
|
|
[ProjectType=='Exe'&&Scratch.Xbox!='true'] = '<Scratch.BuildDir>/' # exe written directly to build directory.
|
|
|
|
# Durango cannot write directly to the build directory. The Durango build will automatically copy the contents of the $(OutDir) to the loose
|
|
# folder (in this case all of the data) to be sent to the console itself.
|
|
[ProjectType=='Exe'&&Scratch.Xbox=='true'] = '<Scratch.Intermediate>/Build/'
|
|
} # NOTE: there ARE exporter rules that augment this setting further ( if the case of unity )
|
|
|
|
Action Settings.General.IntermediateDirectoryName {
|
|
# Do not pollute the output folder with intermediate files.
|
|
[ProjectType=='Exe'] = '<Scratch.Intermediate>/'
|
|
[ProjectType!='Exe'] = '<Scratch.Intermediate>/'
|
|
} # NOTE: there ARE exporter rules that augment this setting further ( if unity )
|
|
|
|
Action Settings.General.TargetName {
|
|
= '$(ProjectName)' # All targets start out with a name.
|
|
[ProjectType=='Exe'] << '_<Scratch.Arch>_<Config>' # for EXE though we mangle with its architecture, since it will reside alongside other 'exes', for everything else a name is good enough.
|
|
[ProjectType=='Exe'&&Platform=='PS3'] << '_snc' # PS3 quirk - is this necessary?
|
|
# for when Graham changes his mind again
|
|
# << '$(RS_BRANCHSUFFIX)' # Want to make sure the exe has a different name for the branches
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Compiler
|
|
#-------------------------------------------------------------------------------------------
|
|
Action Settings.Compiler.FavourSize {
|
|
[Name=='Beta|Xbox 360'||Name=='BankRelease|Durango'||Name=='Release|Durango'||Name=='Final|Durango'||Name=='Master|Durango'] = 'true'
|
|
[Name!='Beta|Xbox 360'&&Name!='BankRelease|Durango'&&Name!='Release|Durango'&&Name!='Final|Durango'&&Name!='Master|Durango'] = 'false'
|
|
}
|
|
Action Settings.Compiler.FavourSpeed {
|
|
[Name=='Beta|Xbox 360'||Name=='BankRelease|Durango'||Name=='Release|Durango'||Name=='Final|Durango'||Name=='Master|Durango'] = 'false'
|
|
[Name!='Beta|Xbox 360'&&Name!='BankRelease|Durango'&&Name!='Release|Durango'&&Name!='Final|Durango'&&Name!='Master|Durango'] = 'true'
|
|
}
|
|
Settings.Compiler.GenerateDebugInformation = 'true'
|
|
Settings.Compiler.TreatWarningsAsErrors = 'true'
|
|
|
|
Action Settings.Compiler.StringPooling {
|
|
[ProjectType!='Exe'] = 'true'
|
|
[ProjectType=='Exe'] = 'false'
|
|
[Name=='ToolBeta|Win32'] = 'false'
|
|
}
|
|
|
|
Action Settings.Compiler.AdditionalOptions {
|
|
[Name=='Profile|Xbox 360'||Name=='Release|Xbox 360'||Name=='BankRelease|Xbox 360'||Name=='Final|Xbox 360'] += '/QVMX128'
|
|
[Name=='Master|Xbox 360'] += '/QVMX128'
|
|
[Name=='Profile|Xbox 360'] += '/callcap'
|
|
[Platform=='Orbis'] += '-frtti'
|
|
[Platform=='Durango'] += '/D "__RAGE_STD_EXCEPTIONS"' # Needed to enable exception handling in STLPort
|
|
[Platform=='Orbis'&&Config=='Bankrelease_ASAN'] += '-fsanitize=bounds,vla-bound'
|
|
[Platform=='Orbis'&&Config=='Release_ASAN'] += '-fsanitize=bounds,vla-bound'
|
|
[Platform=='Prospero'&&Config=='Bankrelease_ASAN'] += '-fsanitize=bounds,vla-bound -fsanitize-recover=address'
|
|
[Platform=='Prospero'&&Config=='Release_ASAN'] += '-fsanitize=bounds,vla-bound -fsanitize-recover=address'
|
|
}
|
|
|
|
Action Settings.Compiler.PreprocessorDefinitions {
|
|
[ProjectType!='Exe'] += '_LIB'
|
|
[ProjectType=='Exe'] += '_WINDOWS' # some settings are as I found them in the old project generator, I suspect such exe / lib variations might not actually have been intentional ( somebody please review )
|
|
[Platform=='Xbox 360'||Platform=='Win32'] += 'WIN32'
|
|
[Platform=='x64'||Scratch.Xbox=='true'||Scratch.Gdk=='true'] += 'WIN64'
|
|
[Platform=='PS3'] += '__SNC__'
|
|
[Platform=='PS3'] += 'SN_TARGET_PS3'
|
|
#[Platform=='x64'||Platform=='Win32'] += '__DXSDK=$(DXSDK_DIR)' NOTE: Commented out, not used for Windows 10 targets, causes linkage issues when used with Windows10 settings
|
|
[Config=='SteamBeta'||Config=='SteamRelease'||Config=='SteamFinal'||Config=='SteamMaster'] += '__STEAM_BUILD=1'
|
|
[Config=='RgscDebug'||Config=='RgscRelease'] += '__RGSC_DLL=1'
|
|
|
|
[Config=~'Debug'||Config=='Beta DX11'||Config=='RscBeta'||Config=='Beta 7.0'] += '_DEBUG'
|
|
[Config=~'Beta'||Config=~'Release'||Config=~'Final'||Config=~'Profile'||Config=~'Master'] += 'NDEBUG'
|
|
}
|
|
|
|
Action Settings.Compiler.ForceIncludes {
|
|
+='$(RAGE_DIR)\base\src\forceinclude\<Scratch.Arch><Scratch.ForceInclude>'
|
|
}
|
|
|
|
Action Settings.Compiler.AdditionalIncludeDirectories {
|
|
+='$(RAGE_DIR)\base\src'
|
|
+='$(RAGE_DIR)\suite\src'
|
|
+='$(ProjectDir)..'
|
|
+='$(RAGE_DIR)\naturalmotion\include'
|
|
+='$(RAGE_DIR)\naturalmotion\src'
|
|
+='$(RAGE_DIR)\script\src'
|
|
+='$(RAGE_DIR)\framework\src'
|
|
+='$(RAGE_DIR)\3rdparty'
|
|
[Config=='RscDebug'||Config=='RscBeta'||Config =='RscRelease'] += '$(XBoxOneXDKLatest)\pc\include'
|
|
[Config=='RgscDebug'||Config=='RgscRelease'] += '$(RAGE_DIR)\suite\src\rgsc\rgsc\rgsc\public_interface;'
|
|
}
|
|
|
|
Action Settings.Compiler.AdditionalLibraryDirectories {
|
|
[Platform=='Durango'] += '$(RAGE_DIR)\lib'
|
|
}
|
|
|
|
Action Settings.General.EnableAddressSanitizer {
|
|
[Platform=='Orbis'&&Config=='Release_ASAN'] = 'true'
|
|
[Platform=='Orbis'&&Config=='BankRelease_ASAN'] = 'true'
|
|
[Platform=='Prospero'&&Config=='Release_ASAN'] = 'true'
|
|
[Platform=='Prospero'&&Config=='BankRelease_ASAN'] = 'true'
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Librarian
|
|
#-------------------------------------------------------------------------------------------
|
|
Condition [ProjectType!='Exe'] {
|
|
Settings.Librarian.AdditionalOptions[Platform!='PS3' && Platform!='Orbis'] += '/ignore:4221'
|
|
}
|
|
|
|
# Clang-cl doesn't know what to do with this flag so we have to manually disable it, -flto replaces it
|
|
Condition [Scratch.MSClang!=''] {
|
|
Settings.Librarian.LinkTimeCodeGeneration = 'false'
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Exe Settings : Linker, Image & Deploy
|
|
#-------------------------------------------------------------------------------------------
|
|
Condition [ProjectType=='Exe'] {
|
|
Settings.Linker.AdditionalLibraryDirectories += '$(RAGE_DIR)\lib;$(RAGE_DIR)\3rdparty\bink2\lib'
|
|
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Orbis'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkps4\lib'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Prospero'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkps5\lib'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Durango'||Platform=='Gaming.Xbox.XboxOne.x64'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxone\lib'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Gaming.Xbox.XboxOne.x64'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxseriesx\lib'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Gaming.Xbox.Scarlett.x64'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxseriesx\lib'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='x64'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkwin\lib'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Gaming.Desktop.x64'] += '$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkwin\lib'
|
|
|
|
# Xbox One GameChat2 - June 2017 XDK and later
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='Durango'] += '$(TargetPlatformSdkPath)\ExtensionSDKs\Xbox.Game.Chat.2.Cpp.API\8.0\DesignTime\CommonConfiguration\Neutral\Lib'
|
|
|
|
# DW: I had to remove this due to errors.
|
|
#
|
|
#Settings.Linker.AdditionalOptions[Platform=='x64'] += '/MANIFEST:EMBED /MANIFESTINPUT:"$(ProjectDir)\game.manifest"'
|
|
#
|
|
|
|
|
|
Settings.Linker.AdditionalOptions[Config=='Debug' && Platform=='x64'] += '/FUNCTIONPADMIN:14'
|
|
Settings.Linker.AdditionalOptions[Config=='Debug_IL' && Platform=='x64'] += '/FUNCTIONPADMIN:14'
|
|
Settings.Linker.AdditionalOptions[Config=='Beta' && Platform=='x64'] += '/FUNCTIONPADMIN:14'
|
|
Settings.Linker.AdditionalOptions[Config=='Beta_IL' && Platform=='x64'] += '/FUNCTIONPADMIN:14'
|
|
Settings.Linker.AdditionalOptions[Config=='BankRelease' && Platform=='x64'] += '/FUNCTIONPADMIN:14'
|
|
Settings.Linker.AdditionalOptions[Config=='BankRelease_IL' && Platform=='x64'] += '/FUNCTIONPADMIN:14'
|
|
Settings.Linker.AdditionalOptions[Platform!='PS3' && Platform!='Orbis' && Platform!='Prospero' && Platform!='NX64'] += '/FIXED:NO'
|
|
Settings.Linker.AdditionalOptions[Platform!='PS3' && Platform!='Orbis' && Platform!='Prospero' && Platform!='NX64'] += '/IGNORE:4089'
|
|
Settings.Linker.AdditionalOptions[Config=='Debug' && Platform=='x64'] += '/NODEFAULTLIB:LIBCMT'
|
|
Settings.Linker.AdditionalOptions[Config=='Debug_IL' && Platform=='x64'] += '/NODEFAULTLIB:LIBCMT'
|
|
Settings.Linker.AdditionalOptions[Config=='Debug' && Platform=='Win32'] += '/NODEFAULTLIB:LIBCMT'
|
|
Settings.Linker.AdditionalOptions[Platform=='Orbis'] += '--sn-full-map'
|
|
Settings.Linker.GenerateDebugInfo = '"$(RSG_DONT_GEN_PDB_FILE)"==""?true:false'
|
|
Settings.Linker.GenerateMapFile = '"$(RSG_DONT_GEN_MAP_FILE)"==""?true:false'
|
|
Settings.Linker.GenerateMapFile[Platform=='ORBIS'||Platform=='Prospero'] = 'false'
|
|
Settings.Linker.GenerateMapFile[Platform=='NX64'] = 'false'
|
|
Settings.Linker.LinkerType[Platform=='NX64'] = 'LLDLinker'
|
|
|
|
Settings.Linker.GenerateDebugInfo = 'true'
|
|
Settings.Linker.LinkIncremental = 'false'
|
|
Settings.Linker.LinkIncremental[Config=='Debug'] = 'true' # not sure what this was set in previous project generator - verify this is what you want.
|
|
|
|
Settings.Xbox.LayoutDir[Scratch.Xbox=='true'] = '<Scratch.Objects>\Layout\$(MSBuildProjectName)\$(Platform)'
|
|
Settings.Xbox.LayoutExtensionFilter[Scratch.Xbox=='true'] = '*.pdb;*.ipdb;*.iobj;*.obj;*.pch;*.ilk;*.exp;*.lib;*.winmd;*.appxrecipe;*.log;*.tlog;*unsuccessfulbuild;*.lastbuildstate;*.copycomplete'
|
|
|
|
Settings.SCE.LocalDebuggerWorkspace[Scratch.SCE=='true' && ProjectType=='Exe'] = 'workspace1'
|
|
Settings.SCE.LocalDebuggerSystemLibraryVerification[Scratch.SCE=='true' && ProjectType=='Exe'] = 'Warn'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe' && Config=='Debug'] {
|
|
Settings.Linker.AdditionalOptions[Platform=='x64' || Platform=='Win32'] += '/NODEFAULTLIB:LIBCMT'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'] {
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries[Platform=='Gaming.Xbox.XboxOne.x64'] += 'libucrtd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries[Platform=='Gaming.Xbox.XboxOne.x64'] += 'libucrt.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries[Scratch.Gdk=='true'] += 'libcmt.lib;'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Orbis'] {
|
|
Settings.Linker.AdditionalLibraryDirectories += '$(SCE_ORBIS_SDK_DIR)\target\lib;'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='PS3'] {
|
|
Settings.Linker.DataStripping = 'StripFuncsAndData'
|
|
Settings.Linker.AdditionalLibraryDirectories += '"$(SCE_PS3_ROOT)\target\ppu\lib"'
|
|
Settings.Linker.AdditionalOptions += '--notocrestore'
|
|
Settings.Linker.AdditionalOptions += '-Wl,--disable-warning=134'
|
|
Settings.Linker.AdditionalOptions += '-Wl,--oformat=fself'
|
|
Settings.Linker.AdditionalOptions[Config=='Final'] += '-Wl,--write-fself-digest -Wl,--ppuguid'
|
|
Settings.Linker.AdditionalOptions[Config=~'Master'] += '-Wl,--write-fself-digest -Wl,--ppuguid'
|
|
Settings.Linker.AdditionalOptions += '-Wl,--strip-duplicates'
|
|
Settings.Linker.AdditionalOptions[Config=='Profile'] += '--callprof'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Xbox 360'] {
|
|
Settings.Linker.AdditionalDependencies += 'xboxkrnl.lib'
|
|
Settings.Linker.IgnoreLibraries[Config!='Release' && Config!='Final'] += 'xapilib.lib'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Image
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.Image.OutputFilename = '<Scratch.BuildDir>/$(ProjectName)_<Scratch.Arch>_<Config>.xex'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Deploy
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.Deploy.DeployFiles += '$(RemoteRoot)=$(TEMP)\rfs.dat'
|
|
Settings.Deploy.DeployFiles += '$(RemoteRoot)=$(ImagePath)'
|
|
Settings.Deploy.DeployType = 'CopyToHardDrive'
|
|
Settings.Deploy.ExecutionBucket = '85313600'
|
|
Settings.Deploy.RemoteRoot = 'xe:\$(ProjectName)'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe' && Platform=='x64' && Config=~'Master'] {
|
|
Settings.Linker.SubSystem = 'Windows'
|
|
Settings.Linker.EntryPointSymbol = 'mainCRTStartup'
|
|
}
|
|
|
|
Condition [Config=='Release_ASAN'&&Platform=='Orbis'] {
|
|
Settings.Linker.AdditionalDependencies += '-lSceDbgAddressSanitizer_stub_weak'
|
|
}
|
|
|
|
Condition [Config=='BankRelease_ASAN'&&Platform=='Orbis'] {
|
|
Settings.Linker.AdditionalDependencies += '-lSceDbgAddressSanitizer_stub_weak'
|
|
}
|
|
|
|
Condition [Config=='Release_ASAN'&&Platform=='Prospero'] {
|
|
Settings.Linker.AdditionalDependencies += '-lSceAddressSanitizer_nosubmission_stub_weak'
|
|
}
|
|
|
|
Condition [Config=='BankRelease_ASAN'&&Platform=='Prospero'] {
|
|
Settings.Linker.AdditionalDependencies += '-lSceAddressSanitizer_nosubmission_stub_weak'
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Add WinRT support for Durango Files.
|
|
#-------------------------------------------------------------------------------------------
|
|
Condition [Platform=='Durango'] {
|
|
Settings.Compiler.AdditionalUsingDirectories +='$(TargetPlatformSdkPath)ExtensionSDKs\Xbox Services API\8.0\References\CommonConfiguration\Neutral\'
|
|
Settings.Compiler.AdditionalUsingDirectories +='$(TargetPlatformSdkPath)ExtensionSDKs\Xbox.Game.Chat.2.WinRT.API\8.0\References\CommonConfiguration\Neutral\'
|
|
Settings.Compiler.AdditionalUsingDirectories +='$(Console_SdkIncludeRoot)'
|
|
Settings.Compiler.AdditionalUsingDirectories +='$(Console_SdkWindowsMetadataPath)'
|
|
Settings.Compiler.AdditionalUsingDirectories +='$(Console_SdkLibPath)'
|
|
|
|
Settings.Compiler.ForcedUsingFiles +='platform.winmd'
|
|
Settings.Compiler.ForcedUsingFiles +='windows.winmd'
|
|
|
|
Settings.Linker.AdditionalLibraryDirectories += '$(Console_SdkLibPath)'
|
|
}
|
|
|
|
Condition [ProjectType!='Exe'&&Platform=='Durango'] {
|
|
# Setting this on the Exe project causes some issues referencing its dll.
|
|
Settings.Compiler.ForcedUsingFiles +='microsoft.xbox.services.winmd'
|
|
Settings.Compiler.ForcedUsingFiles +='Microsoft.Xbox.Services.GameChat2.winmd'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Durango'] {
|
|
# These were taken from the original Durango specific porject. I don't know which ones are needed (but some are) so I added all of them.
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries = '$(IgnoreSpecificDefaultLibraries);'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'advapi32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'atl.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'atls.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'atlsd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'atlsn.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'atlsnd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'comctl32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'comsupp.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'dbghelp.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'gdi32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'gdiplus.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'guardcfw.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'kernel32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'mmc.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'msimg32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'msvcole.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'msvcoled.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'mswsock.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ntstrsafe.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2autd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2auto.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2d.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2ui.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole2uid.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ole32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oleacc.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oleaut32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oledlg.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oledlgd.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'oldnames.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'runtimeobject.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'shell32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'shlwapi.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'strsafe.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'urlmon.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'user32.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'userenv.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'uuid.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'wlmole.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'wlmoled.lib;'
|
|
Settings.Linker.IgnoreSpecificDefaultLibraries += 'ws2_32.lib;'
|
|
|
|
# Using the default value here %(AdditionalDependencies) fails on durango. For further info see
|
|
# https://forums.xboxlive.com/AnswerPage.aspx?qid=f9393f83-5d97-46ef-95cf-78df175ab1f8&tgt=1
|
|
Settings.Linker.AdditionalDependencies = 'combase.lib;'
|
|
Settings.Linker.AdditionalDependencies += 'kernelx.lib;'
|
|
Settings.Linker.AdditionalDependencies += 'uuid.lib;'
|
|
Settings.Linker.AdditionalDependencies += 'xaudio2.lib;'
|
|
Settings.Linker.AdditionalDependencies += 'ws2_32.lib;'
|
|
Settings.Linker.AdditionalDependencies += 'dxguid.lib;'
|
|
Settings.Linker.AdditionalDependencies += 'EtwPlus.lib;'
|
|
|
|
# This was set to Windows in the original Durango project and final does not work without it.
|
|
Settings.Linker.SubSystem = 'Windows'
|
|
}
|
|
|
|
#
|
|
# Override some settings at the file level for Durango
|
|
# this is limited to one pattern per target
|
|
# you may make that match multiple files but the settings will be the same.
|
|
#
|
|
Condition [Platform=='Durango'] {
|
|
|
|
#
|
|
# Match the filenames here for which we wish to override settings on a per file basis. By default these are anything ending with .winrt.cpp,
|
|
# or in a durango subdirectory. We have to specify the unity files directly.
|
|
#
|
|
Settings.Compiler.FilenamePatternOverride = '.*\.winrt\.cpp|.*\\durango\\.*\.cpp|.*Core\\main\.cpp'
|
|
|
|
#
|
|
# Override is limited to these settings only.
|
|
#
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories ='$(RAGE_DIR)\base\src'
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories +='$(RAGE_DIR)\suite\src'
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories +='$(ProjectDir)..'
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories +='$(RAGE_DIR)\naturalmotion\include'
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories +='$(RAGE_DIR)\naturalmotion\src'
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories +='$(RAGE_DIR)\script\src'
|
|
Settings.Compiler.FileOverride_AdditionalIncludeDirectories +='$(RAGE_DIR)\framework\src'
|
|
|
|
Settings.Compiler.FileOverride_CompileAsWinRt = 'true'
|
|
|
|
Settings.Compiler.FileOverride_ExceptionHandling = 'Sync'
|
|
}
|
|
|
|
} # end rules
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Exporter Rules must always be run after normal rules.
|
|
# Residing here are rules that are exporter conditional.
|
|
# Also we have 'bucket' rules that are yet to be abstracted into an independent format.
|
|
ExporterRules[Exporter=~'VS201'] { # The family of VS201X exporters ( VCXPROJ )
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Scratch ( ExporterRules )
|
|
#-------------------------------------------------------------------------------------------
|
|
Scratch.Unity[Exporter=~'_Unity'] = '_unity'
|
|
Scratch.Unity[Exporter!~'_Unity'] = ''
|
|
Scratch.VS[Exporter=~'VS2010'] = '2010'
|
|
Scratch.VS[Exporter=~'VS2012'] = '2012'
|
|
Scratch.VS[Exporter=~'VS2013'] = '2013'
|
|
Scratch.VS[Exporter=~'VS2015'] = '2015'
|
|
Scratch.VS[Exporter=~'VS2017'] = '2017'
|
|
Scratch.VS[Exporter=~'VS2019'] = '2019'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Platform Toolset
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.General.PlatformToolset[Platform=='PS3'] = 'SNC'
|
|
Settings.General.PlatformToolset[Platform=='Yeti'] = 'Yeti_Clang'
|
|
Settings.General.PlatformToolset[Platform=='GGP'] = 'GGP_Clang'
|
|
|
|
Condition [Platform=='Orbis'||Platform=='Prospero'] {
|
|
Settings.General.PlatformToolset = 'Clang'
|
|
}
|
|
|
|
Condition [Platform!='Orbis'&&Platform!='Prospero'] {
|
|
Settings.General.PlatformToolset[Exporter=~'VS2017'] = 'v141'
|
|
Settings.General.PlatformToolset[Exporter=~'VS2019'] = 'v142'
|
|
}
|
|
|
|
Settings.General.PlatformToolset[Scratch.MSClang!=''] = 'ClangCl'
|
|
|
|
|
|
# Only enable debug libs in DEBUG enabled targets
|
|
Settings.General.UseDebugLibraries = 'false'
|
|
Settings.General.UseDebugLibraries[Config=~'Debug'] = 'true'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Deactivate specific targets at export if required
|
|
#-------------------------------------------------------------------------------------------
|
|
Condition [Exporter=~'VS2010'||Exporter=~'VS2019'] {
|
|
Active[Platform=='Durango'] = 'false'
|
|
}
|
|
|
|
Condition [Exporter=~'VS2012'] {
|
|
Active[Platform=='Xbox 360'] = 'false'
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# General ( ExporterRules )
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.General.CharacterSet = 'MultiByte'
|
|
Settings.General.WholeProgramOptimization[Name=='Master|Durango'] = 'true'
|
|
# no current need to append anything to the out/int directories at the moment
|
|
# Settings.General.OutputDirectoryName[ProjectType!='Exe'] << '<Scratch.Unity>_<Scratch.VS>/' # for libs the output directory needs to be unique for unity and exporter variants
|
|
# Settings.General.IntermediateDirectoryName << '<Scratch.Unity>_<Scratch.VS>/' # for exe only the intermediate directory only is required to be elsewhere, don't worry libs will use $(OutDir) - this uses the above.
|
|
|
|
Settings.General.PlatformToolset[Exporter=~'VS2012'&&Platform=='Win32'] = 'v110_xp'
|
|
Settings.General.PlatformToolset[Exporter=~'VS2012'&&Platform=='Win32'] = 'v110_xp'
|
|
|
|
Settings.General.PlatformToolset[Exporter=~'VS2012'&&Platform=='Win32'&&Config=='RgscDebug'] = 'v110_xp'
|
|
Settings.General.PlatformToolset[Exporter=~'VS2012'&&Platform=='Win32'&&Config=='RgscRelease'] = 'v110_xp'
|
|
Settings.General.PlatformToolset[Exporter=~'VS2012'&&Platform=='x64'&&Config=='RgscDebug'] = 'v110_xp'
|
|
Settings.General.PlatformToolset[Exporter=~'VS2012'&&Platform=='x64'&&Config=='RgscRelease'] = 'v110_xp'
|
|
|
|
Action Settings.General.Exceptions { # False, Sync, SyncCThrow, Async
|
|
= 'False'
|
|
#[Name=='ToolDebug|Win32'] = 'Sync'
|
|
}
|
|
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2017'&&Platform=='Win32'] = '10.0.19041.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2017'&&Platform=='x64'] = '10.0.19041.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2017'&&Platform=='Gaming.Desktop.x64'] = '10.0.19041.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2017'&&Platform=='Gaming.Xbox.XboxOne.x64'] = '10.0.19041.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2017'&&Platform=='Gaming.Xbox.Scarlett.x64'] = '10.0.19041.0'
|
|
# 2019 allows "10.0" to specify most recent version, which may/may not be desirable
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2019'&&Platform=='Win32'] = '10.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2019'&&Platform=='x64'] = '10.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2019'&&Platform=='Gaming.Desktop.x64'] = '10.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2019'&&Platform=='Gaming.Xbox.XboxOne.x64'] = '10.0'
|
|
Settings.General.WindowsTargetPlatformVersion[Exporter=~'VS2019'&&Platform=='Gaming.Xbox.Scarlett.x64'] = '10.0'
|
|
|
|
#NOTE: DXSDK_DIR Commented out, not used for Windows 10 targets, causes linkage issues when used with Windows10 settings
|
|
#Settings.General.IncludePath[Platform=='Win32'&&Settings.General.WindowsTargetPlatformVersion==''] += '$(DXSDK_DIR)\Include'
|
|
#Settings.General.IncludePath[Platform=='x64'&&Settings.General.WindowsTargetPlatformVersion==''] += '$(DXSDK_DIR)\Include'
|
|
|
|
#Settings.General.LibraryPath[Platform=='Win32'&&Settings.General.WindowsTargetPlatformVersion==''] += '$(DXSDK_DIR)\Lib\x86'
|
|
#Settings.General.LibraryPath[Platform=='x64'&&Settings.General.WindowsTargetPlatformVersion==''] += '$(DXSDK_DIR)\Lib\x64'
|
|
|
|
Condition [Config=~'Tool' && Platform=='x64'] {
|
|
Settings.General.IncludePath += '$(GXDKLatest)toolKit\Include'
|
|
}
|
|
|
|
Settings.General.LocalDebuggerWorkingDirectory[Platform=='Prospero'||Platform=='Orbis'||Platform=='x64'||Platform=='Gaming.Desktop.x64'] = '$(OutDir)'
|
|
Settings.SCE.LocalWorkingDirectoryApp0[Platform=='Prospero'] = 'UseGP5File'
|
|
Settings.SCE.LocalGP5File[Platform=='Prospero'] = '$(RS_TITLE_UPDATE)\ps5_config\configuration.gp5'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Compiler ( ExporterRules )
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.Compiler.CompileAsWinRT[Platform=='Durango'] = 'false'
|
|
|
|
Action Settings.Compiler.FunctionLevelLink {
|
|
[ProjectType=='Exe'] = 'false' # some settings are as I found them in the old project generator, I suspect such exe / lib variations might not actually have been intentional ( somebody please review )
|
|
[ProjectType!='Exe'] = 'true'
|
|
}
|
|
|
|
Condition [Exporter=~'Unity'] {
|
|
Settings.Compiler.PreprocessorDefinitions += '__UNITYBUILD'
|
|
}
|
|
|
|
Settings.Compiler.PreprocessorDefinitions[Settings.General.WindowsTargetPlatformVersion==''] += '_WIN10=0'
|
|
Settings.Compiler.PreprocessorDefinitions[Settings.General.WindowsTargetPlatformVersion!=''] += '_WIN10=1'
|
|
Settings.Compiler.PreprocessorDefinitions += '$(RS_PREPROCESSOR)'
|
|
Settings.Compiler.PreprocessorDefinitions[Environment.RS_BRANCHNAME=~'ng'] += 'RSG_GEN9=0'
|
|
Settings.Compiler.PreprocessorDefinitions[Environment.RS_BRANCHNAME=~'gen9'] += 'RSG_GEN9=1'
|
|
|
|
Condition [Exporter=~'VS2015'||Exporter=~'VS2017'||Exporter=~'VS2019'] {
|
|
Settings.Compiler.PreprocessorDefinitions[Platform=='Orbis'||Platform=='Prospero'||Platform=='Durango'||Platform=='x64'] += '$(RSG_CODE_CONFIG)'
|
|
}
|
|
|
|
Condition [Exporter=~'VS2017'&&Platform=='Durango'] {
|
|
Settings.Compiler.CallingConvention = 'VectorCall'
|
|
|
|
# On 2017, we get much better performance with Favor Speed
|
|
Settings.Compiler.FavourSize = 'false'
|
|
Settings.Compiler.FavourSpeed = 'true'
|
|
|
|
# Disabling FavourSpeed in Debug and Beta to reduce the amount of inlined code
|
|
Settings.Compiler.FavourSize[Config=~'Beta'||Config=~'Debug'] = 'true'
|
|
Settings.Compiler.FavourSpeed[Config=~'Beta'||Config=~'Debug'] = 'false'
|
|
|
|
# Enabling bigobj on vs2017
|
|
Settings.Compiler.AdditionalOptions += '/bigobj'
|
|
}
|
|
|
|
Condition [Exporter=~'VS2019'&&Platform=='Durango'] {
|
|
Settings.Compiler.CallingConvention = 'VectorCall'
|
|
|
|
# On 2019, we get much better performance with Favor Speed
|
|
Settings.Compiler.FavourSize = 'false'
|
|
Settings.Compiler.FavourSpeed = 'true'
|
|
|
|
# Disabling FavourSpeed in Debug and Beta to reduce the amount of inlined code
|
|
Settings.Compiler.FavourSize[Config=~'Beta'||Config=~'Debug'] = 'true'
|
|
Settings.Compiler.FavourSpeed[Config=~'Beta'||Config=~'Debug'] = 'false'
|
|
|
|
# Enabling bigobj on vs2017
|
|
Settings.Compiler.AdditionalOptions += '/bigobj'
|
|
}
|
|
|
|
Condition [Platform=='Gaming.Xbox.Scarlett.x64'] {
|
|
Settings.Compiler.CallingConvention = 'VectorCall'
|
|
|
|
# Default to fast code
|
|
Settings.Compiler.FavourSize = 'false'
|
|
Settings.Compiler.FavourSpeed = 'true'
|
|
|
|
# Override for Debug + Beta builds
|
|
Settings.Compiler.FavourSize[Config=~'Beta'||Config=~'Debug'] = 'true'
|
|
Settings.Compiler.FavourSpeed[Config=~'Beta'||Config=~'Debug'] = 'false'
|
|
|
|
Settings.Compiler.AdditionalOptions += '/bigobj'
|
|
}
|
|
|
|
# Disabled, Full, MaxSpeed, MinSpace
|
|
Action Settings.Compiler.Optimization {
|
|
[Platform!='PS3'] = 'MaxSpeed'
|
|
[Config=~'Debug'&&Platform!='PS3'] = 'Disabled'
|
|
[Config=='Release'&&Platform!='PS3'] = 'Full'
|
|
[Config=='BankRelease'&&Platform!='PS3'] = 'Full'
|
|
[Config=='Profile'&&Platform!='PS3'] = 'Full'
|
|
[Config=='Final'&&Platform!='PS3'] = 'Full'
|
|
[Config=~'Master'&&Platform!='PS3'] = 'Full'
|
|
[Name=='ToolDebug|Win32'] = 'Disabled'
|
|
[Name=='Beta|Xbox 360'] = 'MinSpace'
|
|
}
|
|
|
|
Action Settings.Compiler.RunTimeLibrary { # MultiThreaded, MultiThreadedDebugDLL, MultiThreadedDebug, MultiThreadedDLL
|
|
= 'MultiThreaded'
|
|
[Config=~'Debug'&&Platform!='PS3'] = 'MultiThreadedDebug'
|
|
[Config=='ToolDebug'] = 'MultiThreadedDebugDLL'
|
|
[Config=='ToolBeta'||Config=='ToolRelease'] = 'MultiThreadedDLL'
|
|
[Config=='Debug'&&Platform=='Durango'] = 'MultiThreadedDebugDLL'
|
|
[Config!='Debug'&&Platform=='Durango'] = 'MultiThreadedDLL'
|
|
[Config=~'Debug'&&Scratch.Gdk=='true'] = 'MultiThreadedDebugDLL'
|
|
[Config!~'Debug'&&Scratch.Gdk=='true'] = 'MultiThreadedDLL'
|
|
}
|
|
|
|
Action Settings.Compiler.InlineFunctionExpansion { # Disabled, AnySuitable, OnlyExplicitInline
|
|
= 'OnlyExplicitInline'
|
|
[ProjectType!='Exe'&&Platform=='Xbox 360'] = 'AnySuitable'
|
|
[Name=~'Master'&&Platform=='Durango'] = 'AnySuitable'
|
|
[Name=~'Master'&&Platform=='x64'] = 'AnySuitable'
|
|
[Name=='BankRelease|Durango'||Name=='Release|Durango'||Name=='Final|Durango'||Name=='Profile|Durango'||Name=='BankRelease|x64'||Name=='Release|x64'||Name=='Final|x64'||Name=='Profile|x64'] = 'AnySuitable'
|
|
[Name=='ToolDebug|Win32'] = 'Default' # not compatible with DebugInformationFormat=EditAndContinue
|
|
[Platform=='Gaming.Xbox.Scarlett.x64'&&Config!='Beta'&&Config!='Debug'] = 'AnySuitable'
|
|
}
|
|
|
|
Action Settings.Compiler.DisableSpecificWarnings {
|
|
[Platform=='Win32'] += '4100' # eg. warning C4100: 'hasFocus' : unreferenced formal parameter
|
|
[Platform=='PS3'] += '552'
|
|
[Platform=='PS3'] += '178'
|
|
}
|
|
|
|
Settings.Compiler.CppExceptions[Platform=='ORBIS'] = 'true'
|
|
|
|
Settings.Compiler.BasicRuntimeChecks = 'default'
|
|
Settings.Compiler.BasicRuntimeChecks[Name=='ToolDebug|Win32'] = 'EnableFastChecks'
|
|
Settings.Compiler.BufferSecurityCheck = 'false'
|
|
Settings.Compiler.BufferSecurityCheck[Name=='ToolBeta|Win32'||Name=='Final|Durango'||Name=='Master|Durango'] = 'true'
|
|
Settings.Compiler.CompileAs = 'default'
|
|
Settings.Compiler.DebugInformationFormat = 'ProgramDatabase'
|
|
#Settings.Compiler.DebugInformationFormat[Config='ToolDebug'&&Platform=='Win32'] = 'EditAndContinue'
|
|
Settings.Compiler.ForceConformanceInForLoopScope = 'true'
|
|
Settings.Compiler.IntrinsicFunctions[ProjectType!='Exe'] = 'true' # some settings are as I found them in the old project generator, I suspect such exe / lib variations might not actually have been intentional ( somebody please review )
|
|
Settings.Compiler.IntrinsicFunctions[ProjectType=='Exe'] = 'false'
|
|
Settings.Compiler.MinimalRebuild[Name=='ToolDebug|Win32'] = 'true'
|
|
Settings.Compiler.OmitFramePointers[Name=='ToolBeta|Win32'] = 'false'
|
|
Settings.Compiler.OptimizationLevel[Platform=='PS3'] = 'Levels'
|
|
Settings.Compiler.OptimizationLevel[Name=='Debug|PS3'] = 'Leveld' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.OptimizationLevel[Platform=='ORBIS'||Platform=='Prospero'] = 'Level3' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.OptimizationLevel[Name=='Beta|ORBIS'||Name=='Beta|Prospero'] = 'Level2' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.OptimizationLevel[Name=='Debug|ORBIS'||Name=='Debug|Prospero'] = 'Level0' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.OptimizationLevel[Name=='Debug 7.0|ORBIS'] = 'Level0' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.OptimizationLevel[Name=~'_ASAN|ORBIS'] = 'Levels' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.OptimizationLevel[Name=~'_ASAN|Prospero'] = 'Levels' # note name here OptimizationLevel NOT Optimization
|
|
Settings.Compiler.PrecompiledHeader = 'NotUsing'
|
|
# Settings.Compiler.PrecompiledHeaderFile = ''
|
|
Settings.Compiler.MultiProcessorCompilation = ' true'
|
|
Settings.Compiler.ProgramDataBaseFileName = '$(IntDir)$(TargetName).pdb'
|
|
Settings.Compiler.TrapIntegerDividesOptimization[ProjectType!='Exe'&&Platform=='Xbox 360'] = 'true' # some settings are as I found them in the old project generator, I suspect such exe / lib variations might not actually have been intentional ( somebody please review )
|
|
Settings.Compiler.TrapIntegerDividesOptimization[ProjectType=='Exe'&&Platform=='Xbox 360'] = 'false'
|
|
Settings.Compiler.FunctionLevelLink[ProjectType=='Exe'&&Config=='Debug'] = 'true' # copied from VS2008 settings - is this what is desired?
|
|
Settings.Compiler.FunctionLevelLink[ProjectType!='Exe'&&Config!='Debug'] = 'true'
|
|
Settings.Compiler.WarningLevel = 'Level4' # Off, Level1, Level2, Level3, Level4
|
|
Settings.Compiler.OpenMPSupport [Platform=='Win32'||Platform=='x64'] = 'true'
|
|
Settings.Compiler.ExceptionHandling [Platform=='Durango'] = 'sync'
|
|
|
|
# Overrides for everything except debug win32 builds.
|
|
Condition [Config!='Debug'&&Config!='Debug DX11'&&Config!='RscDebug'&&Config!='ToolDebug'&&Platform!='ORBIS'&&Platform!='ORBIS 7.0'&&Platform!='Xbox 360'&&Platform!='PS3'&&Platform!='Durango'&&Platform!='Gaming.Xbox.Scarlett.x64'] {
|
|
Settings.Compiler.OmitFramePointers = 'true'
|
|
Settings.Compiler.EnableFiberSafeOptimizations = 'true'
|
|
Settings.Compiler.FloatingPointModel = 'Fast'
|
|
Settings.Compiler.IntrinsicFunctions = 'true'
|
|
Settings.Compiler.Optimization = 'Full'
|
|
Settings.Compiler.FavourSpeed = 'false'
|
|
Settings.Compiler.FavourSize = 'true'
|
|
}
|
|
Condition [Platform=='Gaming.Xbox.Scarlett.x64'&&Config!='Debug'&&Config!='Beta'] {
|
|
Settings.Compiler.IntrinsicFunctions = 'true'
|
|
Settings.Compiler.FunctionLevelLink = 'true'
|
|
Settings.Compiler.Optimization = 'Full'
|
|
}
|
|
Condition [Config=='ToolRelease'] {
|
|
Settings.Compiler.Optimization = 'MaxSpeed'
|
|
Settings.Compiler.FavourSpeed = 'true'
|
|
Settings.Compiler.FavourSize = 'false'
|
|
}
|
|
Condition [Platform=='Win32'] {
|
|
Settings.Compiler.EnableEnhancedInstructionSet = 'StreamingSIMDExtensions2'
|
|
}
|
|
Settings.Compiler.EnableEnhancedInstructionSet[Platform=='Durango'] = 'AdvancedVectorExtensions'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Librarian ( ExporterRules )
|
|
#-------------------------------------------------------------------------------------------
|
|
Settings.Librarian.ModuleDefinitionFile[Platform=='PS3'&&ProjectType!='Exe'] = '3'
|
|
|
|
Condition [ProjectType=='Exe'] {
|
|
Settings.Linker.MapFilename = '$(TargetDir)$(TargetName).map'
|
|
Settings.Linker.OutputFilename = '$(TargetPath)'
|
|
Settings.Linker.EnableCOMDATFolding = 'true'
|
|
Settings.Linker.OptimizeReferences = 'true'
|
|
Settings.Linker.LargeAddressAware[Platform=='Win32'] = 'true'
|
|
}
|
|
|
|
Condition [Config=~'_ASAN'&&Scratch.MSClang=='true'] {
|
|
Settings.General.EnableASAN = 'false'
|
|
Settings.Compiler.AdditionalOptions[Platform=='x64'||Platform=='Gaming.Xbox.Scarlett.x64'] += '-fsanitize=address'
|
|
Settings.Linker.AdditionalLibraryDirectories[Platform=='x64'||Platform=='Gaming.Xbox.Scarlett.x64'] += '$(VC_LibraryPath_VC_x64)'
|
|
Settings.Linker.EnableCOMDATFolding[Platform=='x64'||Platform=='Gaming.Xbox.Scarlett.x64'] = 'false' # COMDAT folding causes false positives with address sanitizer
|
|
Settings.Linker.AdditionalDependencies[Platform=='x64'] += 'clang_rt.asan-x86_64.lib'
|
|
Settings.Linker.AdditionalDependencies[Platform=='Gaming.Xbox.Scarlett.x64'] += 'clang_rt.asan_dynamic-x86_64.lib;clang_rt.asan_dynamic_runtime_thunk-x86_64.lib'
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# Build Events ( ExporterRules )
|
|
#-------------------------------------------------------------------------------------------
|
|
|
|
Condition [ProjectType=='Exe'] {
|
|
Settings.BuildEvents.PreLink.Description = 'Delete Compressed Map.'
|
|
Settings.BuildEvents.PreLink.Command << 'setlocal _NEWLINE_'
|
|
Settings.BuildEvents.PreLink.Command << 'set dst_map="$(TargetDir)$(TargetName).cmp" _NEWLINE_'
|
|
Settings.BuildEvents.PreLink.Command << 'if exist %dst_map% ( _NEWLINE_'
|
|
Settings.BuildEvents.PreLink.Command << 'echo Found previous compressed map file at %dst_map%, deleting _NEWLINE_'
|
|
Settings.BuildEvents.PreLink.Command << 'del %dst_map% _NEWLINE_'
|
|
Settings.BuildEvents.PreLink.Command << ') _NEWLINE_'
|
|
}
|
|
|
|
|
|
Condition [ProjectType=='Exe'] {
|
|
Settings.BuildEvents.PostBuild.Description = 'Post Build Steps.'
|
|
Settings.BuildEvents.PostBuild.Command = 'setlocal _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'] {
|
|
Settings.BuildEvents.PostBuild.Description[Platform=='Orbis'||Platform=='Prospero'] = 'Generate cmp from nm.'
|
|
# We are using prospero-llvm-nm for both Orbis and Prospero - it is twice faster than orbis-nm
|
|
Settings.BuildEvents.PostBuild.Command[Platform=='Orbis'||Platform=='Prospero'] << 'if "$(RSG_DONT_GEN_MAP_FILE)"=="" call "$(RS_TOOLSROOT)\bin\coding\compressmap.bat" "$(TargetPath)" "$(TargetDir)$(TargetName).cmp" -prospero _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Durango'] {
|
|
Settings.BuildEvents.PostBuild.Command << 'call "$(RS_TOOLSROOT)\bin\coding\compressmap.bat" "$(TargetDir)$(TargetName).map" "$(TargetDir)$(TargetName).cmp" -durango _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='x64'] {
|
|
Settings.BuildEvents.PostBuild.Command << 'call "$(RS_TOOLSROOT)\bin\coding\compressmap.bat" "$(TargetDir)$(TargetName).map" "$(TargetDir)$(TargetName).cmp" -x64 _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Gaming.Xbox.Scarlett.x64'] {
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.MSClang==''] << 'call "$(RS_TOOLSROOT)\bin\coding\compressmap.bat" "$(TargetDir)$(TargetName).map" "$(TargetDir)$(TargetName).cmp" -durango _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.MSClang=='true'] << 'call "$(RS_TOOLSROOT)\bin\coding\compressmap.bat" "$(TargetDir)$(TargetName).map" "$(TargetDir)$(TargetName).cmp" -llvm _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Durango'] {
|
|
# Copy build output excluding the uncompressed map
|
|
Settings.BuildEvents.PostBuild.Command << 'robocopy /S /NP /NDL /NFL /NJH "$(TargetDir.TrimEnd('\'))" "$(RS_BUILDBRANCH)" /XF "*.map" _NEWLINE_'
|
|
|
|
# Copy rfs.dat file.
|
|
Settings.BuildEvents.PostBuild.Command << 'echo copy /Y "c:\rfs.dat" "$(TargetDir)" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'copy /Y "c:\rfs.dat" "$(TargetDir)" _NEWLINE_'
|
|
|
|
# Copy logos to the build folder so that they can be included when builds are ready.
|
|
# NOTE: These might want to be removed from here and manually added to the build folder!
|
|
Settings.BuildEvents.PostBuild.Command << 'copy /Y "$(ProjectDir)*.png" "$(RS_BUILDBRANCH)" _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Gaming.Xbox.XboxOne.x64'] {
|
|
# Copy build output excluding the uncompressed map
|
|
# Settings.BuildEvents.PostBuild.Command << 'robocopy /S /NP /NDL /NFL /NJH "$(TargetDir.TrimEnd('\'))" "$(RS_BUILDBRANCH)" /XF "*.map" _NEWLINE_'
|
|
|
|
# Copy rfs.dat file.
|
|
Settings.BuildEvents.PostBuild.Command << 'echo copy /Y "c:\rfs.dat" "$(TargetDir)" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'copy /Y "c:\rfs.dat" "$(TargetDir)" _NEWLINE_'
|
|
|
|
# Copy logos to the build folder so that they can be included when builds are ready.
|
|
# NOTE: These might want to be removed from here and manually added to the build folder!
|
|
Settings.BuildEvents.PostBuild.Command << 'copy /Y "$(ProjectDir)*.png" "$(RS_BUILDBRANCH)" _NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Gaming.Xbox.Scarlett.x64'] {
|
|
# Copy build output excluding the uncompressed map
|
|
|
|
Settings.BuildEvents.PostBuild.Command << 'echo if NOT EXIST "$(LayoutDir)\Image\Loose" md "$(LayoutDir)\Image\Loose" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'if NOT EXIST "$(LayoutDir)\Image\Loose" md "$(LayoutDir)\Image\Loose" _NEWLINE_'
|
|
|
|
# Copy rfs.dat file.
|
|
Settings.BuildEvents.PostBuild.Command << 'echo xcopy /D /Y "c:\rfs.dat" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'xcopy /D /Y "c:\rfs.dat" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
|
|
|
|
# Copy logos to the build folder so that they can be included when builds are ready.
|
|
# NOTE: These might want to be removed from here and manually added to the build folder!
|
|
Settings.BuildEvents.PostBuild.Command << 'copy /Y "$(ProjectDir)*.png" "$(RS_BUILDBRANCH)" _NEWLINE_'
|
|
|
|
# Bink
|
|
Settings.BuildEvents.PostBuild.Command << 'echo xcopy /D /Y "$(RAGE_DIR)\3rdparty\bink2\redist\Bink2Scarlett.dll" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'xcopy /D /Y "$(RAGE_DIR)\3rdparty\bink2\redist\Bink2Scarlett.dll" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
|
|
|
|
# Copy oo2core dll
|
|
Settings.BuildEvents.PostBuild.Command << 'echo xcopy /D /Y "$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxseriesx\redist\oo2core_8_xboxseriesx.dll" "$(TargetDir)" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'xcopy /D /Y "$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxseriesx\redist\oo2core_8_xboxseriesx.dll" "$(TargetDir)" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'echo xcopy /D /Y "$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxseriesx\redistdebug\oo2core_8_xboxseriesx_debug.dll" "$(TargetDir)" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'xcopy /D /Y "$(RAGE_DIR)\3rdparty\Oodle\oodle2sdkxboxseriesx\redistdebug\oo2core_8_xboxseriesx_debug.dll" "$(TargetDir)" _NEWLINE_'
|
|
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.GameExe=='true'] << 'echo Updating Scarlett game binaries _NEWLINE_'
|
|
# The way the props are setup, the Microsoft.Config file is copied *after* post build, so copy it here
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.GameExe=='true'] << 'xcopy /D /Y "$(MSBuildProjectDirectory)\MicrosoftGame.Config" "$(RS_TITLE_UPDATE)\scarlett_loose"_NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.GameExe=='true'] << 'if NOT EXIST "$(RS_TITLE_UPDATE)\scarlett_loose" md "$(RS_TITLE_UPDATE)\scarlett_loose"_NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.GameExe=='true'] << 'for /R "$(TargetDir)" %%e in ($(TargetName).exe $(TargetName).cmp $(TargetName).pdb) do xcopy /D /Y "%%e" "$(RS_TITLE_UPDATE)\"_NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.GameExe=='true'] << 'for /f %%e in ('dir /b $(TargetDir) ^| findstr /v /I "game_scarlett"') do xcopy /D /Y "$(TargetDir)%%e" "$(RS_TITLE_UPDATE)\scarlett_loose\"_NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command[Scratch.GameExe=='true'] << '(robocopy "$(LayoutDir)\Image\Loose\\" "$(RS_TITLE_UPDATE)\scarlett_loose\\" /XF game_scarlett*.* /XF rfs.dat) ^& IF %ERRORLEVEL% LEQ 2 exit /b 0_NEWLINE_'
|
|
}
|
|
|
|
Condition [ProjectType=='Exe'&&Platform=='Gaming.Xbox.Scarlett.x64'&&Config=~'_ASAN'] {
|
|
Settings.BuildEvents.PostBuild.Command << 'echo xcopy /D /Y "$(VC_ExecutablePath_x64_x64)\clang_rt.asan_dynamic-x86_64.dll" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
|
|
Settings.BuildEvents.PostBuild.Command << 'xcopy /D /Y "$(VC_ExecutablePath_x64_x64)\clang_rt.asan_dynamic-x86_64.dll" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
|
|
}
|
|
}
|