Remove old ps1 build scripts

This commit is contained in:
rtm516 2026-03-17 21:16:12 +00:00
parent 6c51eb0611
commit 91c28468bb
No known key found for this signature in database
GPG key ID: 331715B8B007C67A
2 changed files with 0 additions and 81 deletions

View file

@ -1,43 +0,0 @@
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 = "Common\Media"; Dest = "Common\Media" },
@{ Source = "Common\res"; Dest = "Common\res" },
@{ Source = "Common\Trial"; Dest = "Common\Trial" },
@{ Source = "Common\Tutorial"; Dest = "Common\Tutorial" },
@{ Source = "Windows64\GameHDD"; Dest = "Windows64\GameHDD" },
@{ Source = "Windows64\Sound"; Dest = "Windows64\Sound" },
@{ Source = "Windows64Media"; Dest = "Windows64Media" }
)
foreach ($copy in $copies) {
$src = Join-Path $ProjectDir $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
# Copy the files using xcopy, forcing overwrite and suppressing errors, and only copying if the source is newer than the destination
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
}
}
git restore "**/BuildVer.h"

View file

@ -1,38 +0,0 @@
$sha = (git rev-parse --short=7 HEAD)
if ($env:GITHUB_REPOSITORY) {
$ref = "$env:GITHUB_REPOSITORY/$(git symbolic-ref --short HEAD)"
} else {
$remoteUrl = (git remote get-url origin)
# handle github urls only, can't predict other origins behavior
if ($remoteUrl -match '(?:github\.com[:/])([^/:]+/[^/]+?)(?:\.git)?$') {
$ref = "$($matches[1])/$(git symbolic-ref --short HEAD)"
}else{
# fallback to just symbolic ref in case remote isnt what we expect
$ref = "UNKNOWN/$(git symbolic-ref --short HEAD)"
}
}
$build = 560 # Note: Build/network has to stay static for now, as without it builds wont be able to play together. We can change it later when we have a better versioning scheme in place.
$suffix = ""
# TODO Re-enable
# If we are running in GitHub Actions, use the run number as the build number
# if ($env:GITHUB_RUN_NUMBER) {
# $build = $env:GITHUB_RUN_NUMBER
# }
# If we have uncommitted changes, add a suffix to the version string
if (git status --porcelain) {
$suffix = "-dev"
}
@"
#pragma once
#define VER_PRODUCTBUILD $build
#define VER_PRODUCTVERSION_STR_W L"$sha$suffix"
#define VER_FILEVERSION_STR_W VER_PRODUCTVERSION_STR_W
#define VER_BRANCHVERSION_STR_W L"$ref"
#define VER_NETWORK VER_PRODUCTBUILD
"@ | Set-Content "Common/BuildVer.h"