101 lines
5.7 KiB
Plaintext
Executable File
101 lines
5.7 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 {
|
|
# 'Architecture'
|
|
Scratch.Arch[Platform=='x64'] = 'pc'
|
|
Scratch.Arch[Platform=='Orbis'] = 'orbis'
|
|
Scratch.Arch[Platform=='Durango'] = 'durango'
|
|
Scratch.Arch[Config!~'_Clang' && Platform=='Gaming.Xbox.Scarlett.x64'] = 'scarlett'
|
|
Scratch.Arch[Config=~'_Clang' && Platform=='Gaming.Xbox.Scarlett.x64'] = 'scarlett_clang'
|
|
Scratch.Arch[Platform=='Gaming.Xbox.XboxOne.x64'] = 'xboxone_gdk'
|
|
Scratch.Arch[Platform=='Yeti'] = 'linux'
|
|
Scratch.Arch[Platform=='GGP'] = 'linux'
|
|
#Scratch.Arch[Platform=='IOS'] = 'ios'
|
|
#Scratch.Arch[Platform=='Android'] = 'android'
|
|
Scratch.Arch[Platform=='Prospero'] = 'prospero'
|
|
|
|
Scratch.DebugExt[Config=='ToolDebug' || Config =='Debug'] = 'd'
|
|
Scratch.DebugExt[Config!='ToolDebug' && Config !='Debug'] = ''
|
|
Scratch.DebugExt[Config=='ToolBeta' || Config=='Beta'] = 'b'
|
|
Scratch.DebugExt[Config == 'Debug_Clang'] = 'd'
|
|
Scratch.DebugExt[Config=='Beta_Clang'] = 'b'
|
|
|
|
Scratch.ToolExt[Config=='ToolDebug' || Config =='ToolBeta' || Config =='ToolRelease'] = '_tool'
|
|
Scratch.ToolExt[Config!='ToolDebug' && Config !='ToolBeta' && Config !='ToolRelease'] = ''
|
|
|
|
Condition [Scratch.IsLLVMClang=='true'] {
|
|
Settings.Compiler.AdditionalOptions += '-maes -mpclmul'
|
|
}
|
|
|
|
# 'XCode Version' (Used to stop XCode from trying to
|
|
# automatically update a project to it's desired settings
|
|
# Must be kept in sync with current version number of XCode
|
|
#Scratch.IOSXCodeVersion[Platform=='IOS'] = '0730'
|
|
|
|
# 'IOS VS Settings' (Settings needed to configure the VS version of the IOS project)
|
|
#Scratch.IOSVSMinOSVersion = '7'
|
|
|
|
# 'IOSArchitecture'
|
|
#Scratch.IOSSupport32Bit[Platform=='IOS'] = 'false'
|
|
#Scratch.IOSSupport64Bit[Platform=='IOS'] = 'true'
|
|
|
|
# 'Android'
|
|
#Scratch.AndroidGradleVersion[Platform=='Android'] = '3.0.0-alpha4'
|
|
#Scratch.AndroidCompileSdkVersion[Platform=='Android'] = '25'
|
|
#Scratch.AndroidBuildToolsVersion[Platform=='Android'] = '25.0.3'
|
|
#Scratch.AndroidVersionCode[Platform=='Android'] = '1'
|
|
#Scratch.AndroidVersionName[Platform=='Android'] = '1.0'
|
|
#Scratch.AndroidMinSdkVersion[Platform=='Android'] = 21
|
|
#
|
|
#Scratch.AndroidIconResourceSet[Platform=='Android'] = '..\assets\android\'
|
|
#ScratchList.AndroidProductFlavours[Platform=='Android'] += 'arm8'
|
|
}
|
|
|
|
ExporterRules[Exporter=~'VS201'] { # The family of VS201X exporters ( VCXPROJ )
|
|
|
|
# Scratch.VS is the Visual Studio version from game.rules
|
|
Settings.General.TargetName = 'lib$(ProjectName)<Scratch.DebugExt>_<Scratch.Arch><Scratch.ToolExt>_<Scratch.VS>'
|
|
Settings.Librarian.OutputFilename = '$(OutDir)$(TargetName)$(TargetExt)'
|
|
|
|
Action Settings.Compiler.DisableSpecificWarnings {
|
|
[Platform=='x64' || Platform=='Durango' || Platform=='Gaming.Xbox.Scarlett.x64'] += '4214' # eg. warning C4214: nonstandard extension used: bit field types other than int
|
|
[Platform=='x64' || Platform=='Durango' || Platform=='Gaming.Xbox.Scarlett.x64'] += '4706' # eg. warning C4706: assignment within conditional expression
|
|
}
|
|
|
|
# This is disabled because it causes linker warnings when building the game due to the .pdbs not being available with the .lib
|
|
Settings.Compiler.DebugInformationFormat = 'none'
|
|
|
|
#-------------------------------------------------------------------------------------------
|
|
# 'IOS VS Settings' (Settings needed to configure the VS version of the IOS project)
|
|
#-------------------------------------------------------------------------------------------
|
|
#Condition [Platform=='IOS'] {
|
|
# Scratch.IOSVSLibOutputDirectory = '$(RAGE_DIR)\lib\IOS_VS\<Config>\'
|
|
# Settings.General.BuildLogFilename = 'build\<Config>_BuildLog.htm'
|
|
# Settings.General.OutputDirectoryName = 'build\'
|
|
# Settings.General.IntermediateDirectoryName = 'build\'
|
|
#}
|
|
|
|
# add asm dependencies
|
|
Settings.Librarian.AdditionalDependencies[Platform=='Orbis'] += '$(OutDir)aes_asm.o;$(OutDir)aes_gcm_asm.o;$(OutDir)sha256_asm.o;$(OutDir)sha512_asm.o;$(OutDir)fe_x25519_asm.o;$(OutDir)sp_x86_64_asm.o'
|
|
Settings.Librarian.AdditionalDependencies[Platform=='Prospero'] += '$(OutDir)aes_asm.o;$(OutDir)aes_gcm_asm.o;$(OutDir)sha256_asm.o;$(OutDir)sha512_asm.o;$(OutDir)fe_x25519_asm.o;$(OutDir)sp_x86_64_asm.o'
|
|
Settings.Librarian.AdditionalDependencies[Platform=='Durango'] += '$(OutDir)aes_asm.obj;$(OutDir)sp_x86_64_asm.obj'
|
|
Settings.Librarian.AdditionalDependencies[Platform=='Gaming.Xbox.Scarlett.x64'] += '$(OutDir)aes_asm.obj;$(OutDir)sp_x86_64_asm.obj'
|
|
Settings.Librarian.AdditionalDependencies[Platform=='x64'] += '$(OutDir)aes_asm.obj;$(OutDir)sp_x86_64_asm.obj'
|
|
|
|
Settings.BuildEvents.PreBuild.Description = 'Prebuild Events'
|
|
Settings.BuildEvents.PreBuild.Command << 'prebuild.bat $(Configuration) $(Platform) $(OutDir)'
|
|
|
|
# need to use the clang runtime from clang directory instead of the one from the MSVC directory
|
|
# otherwise the game fails to link due to undefined functions such as __udivti3
|
|
# see https://developercommunity.visualstudio.com/t/no-symbol-udivti3-in-clang-rtbuiltins-x86-64lib/1510286
|
|
Settings.Librarian.AdditionalDependencies[Config=~'_Clang' && Platform=='Gaming.Xbox.Scarlett.x64'] += '$(LLVMInstallDir)\lib\clang\12.0.0\lib\windows\clang_rt.builtins-x86_64.lib'
|
|
|
|
Condition [Platform=='Orbis'||Platform=='Prospero'] {
|
|
Settings.Librarian.ThinArchive = 'false'
|
|
}
|
|
}
|