aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/postbuild.ps1
diff options
context:
space:
mode:
authorrtm516 <rtm516@users.noreply.github.com>2026-03-02 07:05:46 +0000
committerGitHub <noreply@github.com>2026-03-02 14:05:46 +0700
commit8810566bf6ec4b26e35103b7ae56317db7b0cfcc (patch)
treee9db35ba6f53fce023cde5ca1eac91c6622ff042 /Minecraft.Client/postbuild.ps1
parent7eac79acc3437982795b0ab0f7260f29de11ad1b (diff)
Move to a postbuild.ps1 script and Set the working dir at runtime as output dir (#91)
Diffstat (limited to 'Minecraft.Client/postbuild.ps1')
-rw-r--r--Minecraft.Client/postbuild.ps141
1 files changed, 41 insertions, 0 deletions
diff --git a/Minecraft.Client/postbuild.ps1 b/Minecraft.Client/postbuild.ps1
new file mode 100644
index 00000000..aca98cd2
--- /dev/null
+++ b/Minecraft.Client/postbuild.ps1
@@ -0,0 +1,41 @@
+param(
+ [string]$OutDir,
+ [string]$ProjectDir
+)
+
+Write-Host "Post-build script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
+
+$directories = @(
+ "music",
+ "Windows64\GameHDD",
+ "Common\Media",
+ "Common\res",
+ "Common\Trial",
+ "Common\Tutorial",
+ "Windows64Media"
+)
+
+foreach ($dir in $directories) {
+ New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
+}
+
+$copies = @(
+ @{ Source = "music"; Dest = "music" },
+ @{ Source = "Windows64\GameHDD"; Dest = "Windows64\GameHDD" },
+ @{ Source = "Common\Media"; Dest = "Common\Media" },
+ @{ Source = "Common\res"; Dest = "Common\res" },
+ @{ Source = "Common\Trial"; Dest = "Common\Trial" },
+ @{ Source = "Common\Tutorial"; Dest = "Common\Tutorial" },
+ @{ Source = "DurangoMedia"; Dest = "Windows64Media" },
+ @{ Source = "Windows64Media"; Dest = "Windows64Media" },
+ @{ Source = "Durango\Sound"; Dest = "Windows64Media\Sound" }
+)
+
+foreach ($copy in $copies) {
+ $src = Join-Path $ProjectDir $copy.Source
+ $dst = Join-Path $OutDir $copy.Dest
+
+ if (Test-Path $src) {
+ xcopy /q /y /i /s /e "$src" "$dst" 2>$null
+ }
+}