0
0
mirror of https://github.com/sp-tarkov/assembly-tool.git synced 2025-02-12 17:30:43 -05:00

Build Project

This creates a new Builder project which has two purposes. First, triggering a build of each of the solutions' other projects. Second, executing a PowerShell script to consolidate the project build files into a solution build directory.

The *solution* must now be built, not the individual projects.

Needs to be tested by someone who knows what they're doing.
This commit is contained in:
Refringe 2025-01-06 20:31:07 -05:00
parent f3c09303e0
commit d8c857d7d9
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
4 changed files with 113 additions and 60 deletions

23
Builder/Builder.csproj Normal file
View File

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Configuration>Debug</Configuration>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ReCodeItLib\ReCodeItLib.csproj" />
<ProjectReference Include="..\DumpLib\DumpLib.csproj" />
<ProjectReference Include="..\ReCodeItCLI\ReCodeItCLI.csproj" />
<ProjectReference Include="..\de4dot\AssemblyServer-x64\AssemblyServer-x64.csproj" />
<ProjectReference Include="..\de4dot\de4dot-x64\de4dot-x64.csproj" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="Build">
<Exec Command="pwsh -NoProfile -ExecutionPolicy Bypass .\PostBuild.ps1"
WorkingDirectory="$(ProjectDir)"
StandardOutputImportance="High"
StandardErrorImportance="High" />
</Target>
</Project>

54
Builder/PostBuild.ps1 Normal file
View File

@ -0,0 +1,54 @@
param(
[string]$Configuration = "Debug"
)
$PSStyle.OutputRendering = 'PlainText'
$solutionDir = (Resolve-Path "$PSScriptRoot\..").Path
$buildPath = Join-Path $solutionDir "Build"
if (Test-Path $buildPath) {
Write-Host "Removing existing Build folder: $buildPath"
Remove-Item -Path $buildPath -Recurse -Force
}
Write-Host "Copying ReCodeItCLI output..."
$cliOutputDir = Join-Path (Join-Path $solutionDir "ReCodeItCLI") "bin\$Configuration\net8.0"
if (Test-Path $cliOutputDir) {
New-Item -Path $buildPath -ItemType Directory -ErrorAction SilentlyContinue
Copy-Item -Path (Join-Path $cliOutputDir "*.*") -Destination $buildPath -Recurse
} else {
Write-Warning "CLI output directory not found: $cliOutputDir"
}
Write-Host "Copying de4dot output..."
$de4dotOutputDir = Join-Path $solutionDir "de4dot\$Configuration\net48"
$de4dotDest = Join-Path $buildPath "de4dot"
if (Test-Path $de4dotOutputDir) {
New-Item -Path $de4dotDest -ItemType Directory -ErrorAction SilentlyContinue
Copy-Item -Path (Join-Path $de4dotOutputDir "*.*") -Destination $de4dotDest -Recurse
} else {
Write-Warning "de4dot output directory not found: $de4dotOutputDir"
}
Write-Host "Copying template assets..."
$templatesDir = Join-Path $solutionDir "Assets\Templates"
$templatesDest= Join-Path $buildPath "Data"
if (Test-Path $templatesDir) {
New-Item -Path $templatesDest -ItemType Directory -ErrorAction SilentlyContinue
Copy-Item -Path (Join-Path $templatesDir "*.*") -Destination $templatesDest -Recurse
} else {
Write-Warning "Templates directory not found: $templatesDir"
}
Write-Host "Copying dumper configuration files..."
$configDir = Join-Path $solutionDir "DumpLib\DUMPDATA"
$configDest= Join-Path $buildPath "DUMPDATA"
if (Test-Path $configDir) {
New-Item -Path $configDest -ItemType Directory -ErrorAction SilentlyContinue
Copy-Item -Path (Join-Path $configDir "*.*") -Destination $configDest -Recurse
} else {
Write-Warning "Config directory not found: $configDir"
}
Write-Host "Build Process Completed"

View File

@ -6,7 +6,6 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
@ -16,44 +15,4 @@
<ItemGroup>
<PackageReference Include="CliFx" Version="2.3.5" />
</ItemGroup>
<PropertyGroup>
<AssemblyServerProj>$(SolutionDir)de4dot\AssemblyServer-x64\AssemblyServer-x64.csproj</AssemblyServerProj>
<de4dot-x64Proj>$(SolutionDir)de4dot\de4dot-x64\de4dot-x64.csproj</de4dot-x64Proj>
</PropertyGroup>
<Target Name="GetOutputPath" Returns="@(OutputPath)">
<!-- Emit the OutputPath property -->
<Output TaskParameter="OutputItems" ItemName="OutputPath" />
</Target>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == '$(Configuration)'">
<RemoveDir Directories="$(SolutionDir)Build\**\*.*" />
</Target>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == '$(Configuration)'">
<ItemGroup>
<de4dot Include="$(SolutionDir)de4dot\$(Configuration)\net48\*.*" />
<templates Include="$(SolutionDir)Assets\Templates\**\*.*" />
<Cli Include="$(ProjectDir)$(OutDir)\*.*" />
</ItemGroup>
<MSBuild Projects="$(AssemblyServerProj)" Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(de4dot-x64Proj)" Properties="Configuration=$(Configuration)" />
<Copy
SourceFiles="@(Cli)"
DestinationFolder="$(SolutionDir)Build\%(RecursiveDir)"
/>
<Copy
SourceFiles="@(de4dot);"
DestinationFolder="$(SolutionDir)Build\de4dot\%(RecursiveDir)"
/>
<Copy
SourceFiles="@(templates);"
DestinationFolder="$(SolutionDir)Build\Data\%(RecursiveDir)"
/>
</Target>
</Project>

View File

@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "de4dot-x64", "de4dot\de4dot
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "de4dot", "de4dot", "{B12B2700-C6F1-48F8-82AD-8A8C9083D66F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Builder", "Builder\Builder.csproj", "{55E928FA-93D2-410C-8AF6-C074C63D126B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -40,7 +42,6 @@ Global
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Debug|ARM.ActiveCfg = Debug|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Debug|ARM.Build.0 = Debug|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -59,8 +60,8 @@ Global
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Release|x64.Build.0 = Release|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Release|x86.ActiveCfg = Release|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Release|x86.Build.0 = Release|Any CPU
{FDA58DB6-E114-4FE0-AAF1-C3DEE44AEF99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Debug|ARM.Build.0 = Debug|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -79,8 +80,8 @@ Global
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Release|x64.Build.0 = Release|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Release|x86.ActiveCfg = Release|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Release|x86.Build.0 = Release|Any CPU
{E404EC0B-06D2-4964-8ABA-A634F259655C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Debug|ARM.Build.0 = Debug|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -99,8 +100,8 @@ Global
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Release|x64.Build.0 = Release|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Release|x86.ActiveCfg = Release|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Release|x86.Build.0 = Release|Any CPU
{D0837899-F129-46DB-8BDB-7C9AFB72BD30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Debug|ARM.ActiveCfg = Debug|Any CPU
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Debug|ARM.Build.0 = Debug|Any CPU
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -120,7 +121,6 @@ Global
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Release|x86.ActiveCfg = Release|Any CPU
{7C68B124-809B-4D4A-960B-467B2DAF2A0A}.Release|x86.Build.0 = Release|Any CPU
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Debug|ARM.ActiveCfg = Debug|Any CPU
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Debug|ARM.Build.0 = Debug|Any CPU
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -140,7 +140,6 @@ Global
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Release|x86.ActiveCfg = Release|Any CPU
{2BCD50E1-77D5-47E3-B317-04568BF051AB}.Release|x86.Build.0 = Release|Any CPU
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Debug|ARM.Build.0 = Debug|Any CPU
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -160,7 +159,6 @@ Global
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Release|x86.ActiveCfg = Release|Any CPU
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C}.Release|x86.Build.0 = Release|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Debug|ARM.ActiveCfg = Debug|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Debug|ARM.Build.0 = Debug|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -179,8 +177,8 @@ Global
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Release|x64.Build.0 = Release|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Release|x86.ActiveCfg = Release|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Release|x86.Build.0 = Release|Any CPU
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Debug|ARM.ActiveCfg = Debug|Any CPU
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Debug|ARM.Build.0 = Debug|Any CPU
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -200,7 +198,6 @@ Global
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Release|x86.ActiveCfg = Release|Any CPU
{02FBA28C-E86C-49DC-8B44-A69CC542F693}.Release|x86.Build.0 = Release|Any CPU
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Debug|ARM.Build.0 = Debug|Any CPU
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -220,7 +217,6 @@ Global
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Release|x86.ActiveCfg = Release|Any CPU
{8365D905-3BC4-42A0-B072-035598C6AF8C}.Release|x86.Build.0 = Release|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Debug|ARM.Build.0 = Debug|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@ -239,20 +235,41 @@ Global
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Release|x64.Build.0 = Release|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Release|x86.ActiveCfg = Release|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Release|x86.Build.0 = Release|Any CPU
{3D0F9399-7814-4EB9-8436-D56BA87F874C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|ARM.Build.0 = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|ARM64.Build.0 = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|x64.ActiveCfg = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|x64.Build.0 = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|x86.ActiveCfg = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Debug|x86.Build.0 = Debug|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|Any CPU.Build.0 = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|ARM.ActiveCfg = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|ARM.Build.0 = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|ARM64.ActiveCfg = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|ARM64.Build.0 = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|x64.ActiveCfg = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|x64.Build.0 = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|x86.ActiveCfg = Release|Any CPU
{55E928FA-93D2-410C-8AF6-C074C63D126B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7C68B124-809B-4D4A-960B-467B2DAF2A0A} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{2BCD50E1-77D5-47E3-B317-04568BF051AB} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{02FBA28C-E86C-49DC-8B44-A69CC542F693} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{8365D905-3BC4-42A0-B072-035598C6AF8C} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{3D0F9399-7814-4EB9-8436-D56BA87F874C} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C2C7C51D-6773-404D-B51D-BC279AC9B923}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{02FBA28C-E86C-49DC-8B44-A69CC542F693} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{CF1A1A5E-292B-42DE-AAA0-6801AD1AD407} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{3D0F9399-7814-4EB9-8436-D56BA87F874C} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{8365D905-3BC4-42A0-B072-035598C6AF8C} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{C3C1267E-CDB9-4C47-B7F1-C929A6F2F31C} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{2BCD50E1-77D5-47E3-B317-04568BF051AB} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
{7C68B124-809B-4D4A-960B-467B2DAF2A0A} = {B12B2700-C6F1-48F8-82AD-8A8C9083D66F}
EndGlobalSection
EndGlobal