feat: update submodule, more proper 4JLibs checks

This commit is contained in:
2026-08-08 19:58:37 -04:00
parent 8055f4dfc7
commit 9cba342973
127 changed files with 137 additions and 103 deletions
+1
View File
@@ -2,3 +2,4 @@
path = Minecraft.Client/Windows64/4JLibs
url = https://gitea.str1k3r.xyz/str1k3r/4JLibs-VS2012
ignore = untracked
branch = main
@@ -0,0 +1,69 @@
param(
[string]$ProjectDir,
[string]$Platform,
[string]$Configuration
)
switch ($Platform) {
"x64" { $LibsDir = Join-Path $ProjectDir "Windows64\4JLibs\"; $ExpectedCount = 4; $PlatformName = "Windows64" }
"Durango" { $LibsDir = Join-Path $ProjectDir "Durango\4JLibs\"; $ExpectedCount = 4; $PlatformName = "Durango" }
"Xbox 360" { $LibsDir = Join-Path $ProjectDir "Xbox\4JLibs\"; $ExpectedCount = 5; $PlatformName = "Xbox" }
"PS3" { $LibsDir = Join-Path $ProjectDir "PS3\4JLibs\"; $ExpectedCount = 4; $PlatformName = "PS3" }
"Orbis" { $LibsDir = Join-Path $ProjectDir "Orbis\4JLibs\"; $ExpectedCount = 4; $PlatformName = "Orbis" }
"PSVita" { $LibsDir = Join-Path $ProjectDir "PSVita\4JLibs\"; $ExpectedCount = 4; $PlatformName = "PSVita" }
default { Write-Host "4JLibs: Unknown platform: '$Platform'"; exit 1 }
}
if ($Configuration -match "ContentPackage" -or $Configuration -match "Release") {
$BuildConfig = "Release"
} else {
Write-Host "4JLibs: Configuration did not match Release or ContentPackage, defaulting to Debug"
$BuildConfig = "Debug"
}
if (-not (Test-Path $LibsDir)) {
Write-Host "4JLibs: $PlatformName 4JLibs directory not found"
exit 1
} elseif (-not (Test-Path "$LibsDir\Headers\$PlatformName")) {
Write-Host "4JLibs: $PlatformName 4JLibs Headers directory not found"
exit 1
} elseif (-not (Test-Path "$LibsDir\Headers")) {
Write-Host "4JLibs: Headers directory not found"
exit 1
}
$incPath = Join-Path $LibsDir "inc"
$libsPath = Join-Path $LibsDir "libs"
$incCount = (Get-ChildItem -Path $incPath -Filter "*.h" -ErrorAction SilentlyContinue).Count
if ($BuildConfig -eq "Release") {
$libCount = (Get-ChildItem -Path $libsPath -Filter "*_r.lib" -ErrorAction SilentlyContinue).Count
} else {
$libCount = (Get-ChildItem -Path $libsPath -Filter "*_d.lib" -ErrorAction SilentlyContinue).Count
}
if ($incCount -lt $ExpectedCount) {
Write-Host "4JLibs: Copying header files for $PlatformName"
xcopy "$LibsDir\Headers\$PlatformName\*" "$incPath" /E /I /Y
} else {
Write-Host "4JLibs: inc files already present, skipping copy."
}
if ($libCount -lt $ExpectedCount) {
Write-Host "4JLibs: Building 4JLibs for $PlatformName in $BuildConfig"
& "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" `
(Join-Path $LibsDir "4JLibs.sln") `
/p:Configuration=$BuildConfig `
/p:Platform=$PlatformName `
/v:minimal `
/m
if ($LASTEXITCODE -ne 0) {
Write-Host "4JLibs: Build failed with exit code: $LASTEXITCODE"
exit $LASTEXITCODE
}
} else {
Write-Host "4JLibs: libs already present, skipping build."
}

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 308 KiB

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 252 KiB

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Some files were not shown because too many files have changed in this diff Show More