Files
gtav-src/tools_ng/etc/projgen9/sample.rules
T
2025-09-29 00:52:08 +02:00

123 lines
6.8 KiB
Plaintext
Executable File

##########################################################################################################################
# RULES FILE
# Usage & Details : https://devstar.rockstargames.com/wiki/index.php/Dev:Project_builder3#game.rules
##########################################################################################################################
#
# *** IMPORTANT : THESE RULES ARE DESIGNED TO BE *ADDITIONAL* RULES TO THE GAME.RULES, SOME SETTINGS ARE DEFINED ***
#
Rules {
# 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|.*sample_.*\.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_AdditionalIncludeDirectories +='%(AdditionalIncludeDirectories)'
Settings.Compiler.FileOverride_CompileAsWinRt = 'true'
Settings.Compiler.FileOverride_ExceptionHandling = 'Sync'
}
}
ExporterRules[Exporter=~'VS201'] { # The family of VS201X exporters ( VCXPROJ )
# Settings.General.OutputDirectoryName[Platform!='x64'&&Platform!='Gaming.Desktop.x64'] = '$(ProjectName)_<Scratch.Arch>_<Config>_$(PlatformToolset)/'
# Settings.General.IntermediateDirectoryName = '$(ProjectName)_<Scratch.Arch>_<Config>_<Scratch.VS>_int/'
Settings.General.IncludePath += '$(RAGE_DIR)/base/samples'
Settings.General.IncludePath += '$(RAGE_DIR)/suite/samples'
#NOTE: Include & Lib paths for Windows 10 x86 & x64 targets not needed as VS2017+ auto generates these
Condition [Platform=='Win32'] {
#NOTE: For Windows 8.1/VS2015 and below x86 & x64 builds only, leave commented out for Windows 10 targets
#Settings.General.IncludePath += '$(WindowsSdk_Dir)\Include\shared'
#Settings.General.IncludePath += '$(WindowsSdk_Dir)\Include\um'
#Settings.General.IncludePath += '$(DXSDK_DIR)\Include'
#Settings.General.LibraryPath += '$(WindowsSdk_Dir)\lib\win8\um\x86'
#Settings.General.LibraryPath += '$(DXSDK_DIR)\Lib\x86'
}
Condition [Platform=='x64'] {
#NOTE: For Windows 8.1/VS2015 and below x86 & x64 builds only, leave commented out for Windows 10 targets
#Settings.General.IncludePath += '$(WindowsSdk_Dir)\Include\shared'
#Settings.General.IncludePath += '$(WindowsSdk_Dir)\Include\um'
#Settings.General.IncludePath += '$(DXSDK_DIR)\Include'
#Settings.General.LibraryPath += '$(WindowsSdk_Dir)\lib\win8\um\x64'
#Settings.General.LibraryPath += '$(DXSDK_DIR)\Lib\x64'
}
Condition [ProjectType=='Exe'&&Platform=='Win32'] {
Settings.BuildEvents.PostBuild.Description = 'Compress map.'
Settings.BuildEvents.PostBuild.Command ='<Scratch.CompressMap> $(TargetDir)$(TargetName).map'
}
Condition [ProjectType=='Exe'&&Platform=='Xbox 360'] {
#-------------------------------------------------------------------------------------------
# Image
#-------------------------------------------------------------------------------------------
# Samples shouldn't depend on the game's spa file.
Settings.Image.OutputFilename = '$(OutDir)/$(ProjectName)_<Scratch.Arch>_<Config>.xex'
}
Condition [ProjectType=='Exe'&&Platform=='Durango'] {
Settings.BuildEvents.PostBuild.Description = 'Copy rfs.dat.'
# Copy rfs.dat file as only instruction.
Settings.BuildEvents.PostBuild.Command = 'copy /Y "c:\rfs.dat" "$(TargetDir)" _NEWLINE_'
}
Condition [ProjectType=='Exe'&&Platform=='Gaming.Xbox.Scarlett.x64'] {
Settings.BuildEvents.PostBuild.Description = 'Copy rfs.dat.'
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 psapi.dll file.
Settings.BuildEvents.PostBuild.Command << 'echo xcopy /D /Y "$(GXDKLatest)bin\psapi.dll" "$(LayoutDir)\Image\Loose\" _NEWLINE_'
Settings.BuildEvents.PostBuild.Command << 'xcopy /D /Y "$(GXDKLatest)bin\psapi.dll" "$(LayoutDir)\Image\Loose\" _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_'
}
Condition [ProjectType=='Exe'&&Platform=='Gaming.Xbox.XboxOne.x64'] {
Settings.BuildEvents.PostBuild.Description = 'Copy rfs.dat.'
# Copy rfs.dat file.
Settings.BuildEvents.PostBuild.Command = 'copy /Y "c:\rfs.dat" "$(TargetDir)" _NEWLINE_'
# Copy psapi.dll file.
Settings.BuildEvents.PostBuild.Command << 'echo copy /Y "$(GXDKLatest)bin\psapi.dll" "$(TargetDir)" _NEWLINE_'
Settings.BuildEvents.PostBuild.Command << 'copy /Y "$(GXDKLatest)bin\psapi.dll" "$(TargetDir)" _NEWLINE_'
}
}