1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-03-26 12:17:20 +08:00

build: remove legacy UpdateGameDlls target and simplify PS1 script

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-03-22 15:44:34 +08:00
parent a894c34987
commit 93c39e2133
4 changed files with 12 additions and 81 deletions

View File

@@ -1,39 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--
UpdateGameDlls target: locates the Dyson Sphere Program installation via the
Steam registry and libraryfolders.vdf, then uses assembly-publicizer to
refresh AssemblyFromGame/ whenever the game DLLs are newer than the local copies.
Runs automatically before every build (BeforeTargets="BeforeBuild") and can
also be invoked explicitly:
dotnet build -t:UpdateGameDlls
Requires assembly-publicizer on PATH or in %USERPROFILE%\.dotnet\tools\:
dotnet tool install -g BepInEx.AssemblyPublicizer.Cli
-->
<!--
The target is conditioned to run only when building the 'UXAssist' project (the
designated first-built project in this solution), OR when either game DLL is
missing entirely (e.g. after a manual deletion). This ensures the target fires
exactly once per solution build even when projects are built in parallel (-m),
while still recovering automatically if the DLLs are absent.
The PowerShell script additionally acquires an exclusive file lock on
AssemblyFromGame/.update.lock so that the rare case where the !Exists fallback
triggers multiple projects concurrently is also handled safely.
-->
<Target Name="UpdateGameDlls" BeforeTargets="BeforeBuild"
Condition="'$(MSBuildProjectName)' == 'UXAssist'
Or !Exists('$(MSBuildThisFileDirectory)AssemblyFromGame\Assembly-CSharp.dll')
Or !Exists('$(MSBuildThisFileDirectory)AssemblyFromGame\UnityEngine.UI.dll')"
>
<Exec
Command="powershell.exe -NoProfile -ExecutionPolicy Bypass -File &quot;$(MSBuildThisFileDirectory)UpdateGameDlls.ps1&quot; -ProjectRoot &quot;$(MSBuildThisFileDirectory.TrimEnd('\\/'))&quot;"
ConsoleToMSBuild="true"
IgnoreExitCode="false"
WorkingDirectory="$(MSBuildThisFileDirectory)" />
</Target>
<!--
ZipMod target: assembles a Thunderstore-ready zip under package/.