feat: update submodule, more proper 4JLibs checks
@@ -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: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
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: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 250 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 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: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 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: 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: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 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 |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |