Files
gtav-src/tools_ng/packages/SanScriptEditor/Content/SanScript.targets
T
2025-09-29 00:52:08 +02:00

184 lines
10 KiB
XML
Executable File

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<UsingTask TaskName="SanScript.CompilerTask.SanScriptCompilerTask" AssemblyFile="SanScript.CompilerTask.dll" />
<UsingTask TaskName="SanScript.CompilerTask.FilenameValidationTask" AssemblyFile="SanScript.CompilerTask.dll" />
<UsingTask TaskName="SanScript.CompilerTask.SourceDependencyTracerTask" AssemblyFile="SanScript.CompilerTask.dll" />
<UsingTask TaskName="SanScript.CompilerTask.BuildEventTask" AssemblyFile="SanScript.CompilerTask.dll" />
<UsingTask TaskName="SanScript.CompilerTask.DetermineBuildFilesTask" AssemblyFile="SanScript.CompilerTask.dll" />
<UsingTask TaskName="SanScript.CompilerTask.CompilerTask" AssemblyFile="SanScript.CompilerTask.dll" />
<PropertyGroup>
<DestFolder>$(MSBuildProjectDirectory)\$(OutputPath)</DestFolder>
<DependencyDestFolder>$(MSBuildProjectDirectory)\$(OutputPath)\Dependencies\</DependencyDestFolder>
</PropertyGroup>
<ItemGroup>
<SourceFiles Include="@(Compile)" Exclude="$(Compile)**\*.sch" />
<SourceDependencyFiles Include="@(SourceFiles->'$(DependencyDestFolder)%(Filename).sd')" />
</ItemGroup>
<Target Name="PreBuildValidation">
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
<MakeDir Directories="$(DependencyDestFolder)" Condition="!Exists('$(DependencyDestFolder)')" />
<Message Text="$(Newline)Validating filenames...$(NewLine)" />
<FilenameValidationTask SourceFiles="@(SourceFiles->'%(FullPath)')" />
<Message Text="$(NewLine)Building files...$(NewLine)" Importance="high" />
</Target>
<Target Name="PreBuild">
<Message Text="$(NewLine)Performing pre-build step...$(NewLine)" Importance="high" />
<BuildEventTask CommandLine="$(PreBuildCommandLine)" ShouldPerform="$(UsePreBuildStep)"/>
</Target>
<Target Name="PostBuild">
<Message Text="$(NewLine)Performing post-build step...$(NewLine)" Importance="high" />
<BuildEventTask CommandLine="$(PostBuildCommandLine)" ShouldPerform="$(UsePostBuildStep)"/>
</Target>
<Target Name="Clean">
<ItemGroup>
<FilesToDelete Include="$(OutputPath)\**\*.sco" />
<DependencyFilesToDelete Include="$(OutputPath)\**\*.d" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<Delete Files="@(DependencyFilesToDelete)" />
</Target>
<Target Name="SanScriptCompilerTarget" >
<SanScriptCompilerTask SourceFiles="@(SourceFiles->'%(FullPath)')"
ProjectPath="$(MSBuildProjectDirectory)"
OutputPath="$(OutputPath)"
IncludeFile="$(IncludeFile)"
IncludeDirectories="$(IncludeDirectories)"
CompilerExecutable="$(CompilerExecutable)"
DebugParser="$(DebugParser)"
DumpThreadState="$(DumpThreadState)"
DisplayDisassembly="$(DisplayDisassembly)"
EnableHsm="$(EnableHsm)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
CompileToConfigurationFolder="$(CompileToConfigurationFolder)"
MsBuildProjectFilePath="$(MSBuildProjectFullPath)"
DependencyPath="$(DependencyDestFolder)"
CustomArguments="$(CustomArguments)"
CreateDependencyFile="$(CreateDependencyFile)"
CreateNativeFile="$(CreateNativeFile)"/>
</Target>
<Target Name="SelectedSanScriptCompilerTarget">
<SanScriptCompilerTask SourceFiles="$(Selected)"
ProjectPath="$(MSBuildProjectDirectory)"
OutputPath="$(OutputPath)"
IncludeFile="$(IncludeFile)"
IncludeDirectories="$(IncludeDirectories)"
CompilerExecutable="$(CompilerExecutable)"
DebugParser="$(DebugParser)"
DumpThreadState="$(DumpThreadState)"
DisplayDisassembly="$(DisplayDisassembly)"
EnableHsm="$(EnableHsm)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
CompileToConfigurationFolder="$(CompileToConfigurationFolder)"
BuildingSelection="True"
MsBuildProjectFilePath="$(MSBuildProjectFullPath)"
DependencyPath="$(DependencyDestFolder)"
CustomArguments="$(CustomArguments)"
CreateDependencyFile="$(CreateDependencyFile)"
CreateNativeFile="$(CreateNativeFile)"/>
</Target>
<Target Name="SelectedForPreviewSanScriptCompilerTarget">
<SanScriptCompilerTask SourceFiles="$(Selected)"
ForPreview="True"
ProjectPath="$(MSBuildProjectDirectory)"
OutputPath="$(OutputPath)"
IncludeFile="$(IncludeFile)"
IncludeDirectories="$(IncludeDirectories)"
CompilerExecutable="$(CompilerExecutable)"
PreviewFolderPath="$(PreviewFolderPath)"
DebugParser="$(DebugParser)"
DumpThreadState="$(DumpThreadState)"
DisplayDisassembly="$(DisplayDisassembly)"
EnableHsm="$(EnableHsm)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
CompileToConfigurationFolder="$(CompileToConfigurationFolder)"
BuildingSelection="True"
MsBuildProjectFilePath="$(MSBuildProjectFullPath)"
DependencyPath="$(DependencyDestFolder)"
CustomArguments="$(CustomArguments)"
CreateDependencyFile="$(CreateDependencyFile)"
CreateNativeFile="$(CreateNativeFile)"/>
</Target>
<Target Name="SourceDependencyTracerTask">
<SourceDependencyTracerTask SourceFiles="@(SourceFiles->'%(FullPath)')"
OutputPath="$(DependencyDestFolder)"
IncludeDirectories="$(IncludeDirectories)"/>
</Target>
<Target Name="SelectedSourceDependencyTracerTask">
<SourceDependencyTracerTask SourceFiles="$(Selected)"
OutputPath="$(DependencyDestFolder)"
IncludeDirectories="$(IncludeDirectories)"/>
</Target>
<Target Name="DetermineBuildFilesTask">
<DetermineBuildFilesTask SourceFiles="@(SourceFiles->'%(FullPath)')"
ProjectPath="$(MSBuildProjectDirectory)"
OutputPath="$(OutputPath)"
BuildingSelection="True"
MsBuildProjectFilePath="$(MSBuildProjectFullPath)"
DependencyPath="$(DependencyDestFolder)">
<Output ItemName="BuildFiles" TaskParameter="BuildFiles"/>
</DetermineBuildFilesTask>
</Target>
<Target Name="SelectedDetermineBuildFilesTask">
<DetermineBuildFilesTask SourceFiles="$(Selected)"
ProjectPath="$(MSBuildProjectDirectory)"
OutputPath="$(OutputPath)"
BuildingSelection="True"
MsBuildProjectFilePath="$(MSBuildProjectFullPath)"
DependencyPath="$(DependencyDestFolder)">
<Output ItemName="BuildFiles" TaskParameter="BuildFiles"/>
</DetermineBuildFilesTask>
</Target>
<Target Name="Compiler">
<CompilerTask BuildFiles="%(BuildFiles.FullPath)"
ProjectPath="$(MSBuildProjectDirectory)"
OutputPath="$(OutputPath)"
CompilerExecutable="$(CompilerExecutable)"
CustomArguments="$(CustomArguments)"
CreateDependencyFile="$(CreateDependencyFile)"
CreateNativeFile="$(CreateNativeFile)"
DebugParser="$(DebugParser)"
DumpThreadState="$(DumpThreadState)"
DisplayDisassembly="$(DisplayDisassembly)"
EnableHsm="$(EnableHsm)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
IncludeFile="$(IncludeFile)"
IncludeDirectories="$(IncludeDirectories)"/>
</Target>
<!--SanScriptCompilerTarget;PostBuild">-->
<Target Name="Build" DependsOnTargets="PreBuildValidation;PreBuild;SourceDependencyTracerTask;SanScriptCompilerTarget;PostBuild">
<Message Text="$(NewLine)All files compiled...$(NewLine)" Importance="high" />
</Target>
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="CompileFiles" DependsOnTargets="PreBuildValidation;SelectedSourceDependencyTracerTask;SelectedSanScriptCompilerTarget">
<Message Text="$(NewLine)All files compiled...$(NewLine)" Importance="high" />
</Target>
<Target Name="CompileFilesForPreview" DependsOnTargets="PreBuildValidation;SelectedSourceDependencyTracerTask;SelectedForPreviewSanScriptCompilerTarget">
<Message Text="$(NewLine)All files compiled...$(NewLine)" Importance="high" />
</Target>
<Target Name="ResolveAssemblyReferences">
<Message Text="Overridden ResolveAssemblyReferences Target..." />
</Target>
<Target Name="GetFrameworkPaths">
<Message Text="Overridden GetFrameworkPaths Target..." />
</Target>
</Project>