изменил структуру

This commit is contained in:
2026-03-28 13:44:26 +04:00
parent e71f9608c3
commit e4a0cc2c36
513 changed files with 99 additions and 72 deletions
+23 -36
View File
@@ -32,19 +32,9 @@ $WOW_HOME = $env:WOW_HOME
Write-Host "WOW_HOME = $WOW_HOME" Write-Host "WOW_HOME = $WOW_HOME"
# --- Paths # --- Paths
$DIST_DIR = Join-Path $ROOT "dist" $SRC_DIR = Join-Path $ROOT "src"
$DIST_DIR = Join-Path $ROOT "dist"
# --- patch-ruRU-4 $TOOL = Join-Path $ROOT "tool\target\release\tool.exe"
$INPUT_DIR_4 = Join-Path $ROOT "patch-ruRU-4"
$OUTPUT_MPQ_4 = Join-Path $WOW_HOME "Data\ruRU\patch-ruRU-4.MPQ"
$DIST_MPQ_4 = Join-Path $DIST_DIR "Data\ruRU\patch-ruRU-4.MPQ"
# --- patch-ruRU-5
$INPUT_DIR_5 = Join-Path $ROOT "patch-ruRU-5"
$OUTPUT_MPQ_5 = Join-Path $WOW_HOME "Data\ruRU\patch-ruRU-5.MPQ"
$DIST_MPQ_5 = Join-Path $DIST_DIR "Data\ruRU\patch-ruRU-5.MPQ"
$TOOL = Join-Path $ROOT "tool\target\release\tool.exe"
$RELOAD_SCRIPT = Join-Path $ROOT "reload_wow.bat" $RELOAD_SCRIPT = Join-Path $ROOT "reload_wow.bat"
# --- Ensure tool exists # --- Ensure tool exists
@@ -55,34 +45,31 @@ if (!(Test-Path $TOOL)) {
Pop-Location Pop-Location
} }
# --- Ensure directories exist # --- Build MPQ archives into dist/
$wowDataDir = Join-Path $WOW_HOME "Data\ruRU" Write-Host "Building MPQ archives from src/ -> dist/..."
if (!(Test-Path $wowDataDir)) { & $TOOL $SRC_DIR $DIST_DIR
New-Item -ItemType Directory -Force -Path $wowDataDir | Out-Null if ($LASTEXITCODE -ne 0) {
}
$distDataDir = Join-Path $DIST_DIR "Data\ruRU"
if (!(Test-Path $distDataDir)) {
New-Item -ItemType Directory -Force -Path $distDataDir | Out-Null
}
# --- Build MPQ
Write-Host "Building MPQ..."
& $TOOL $INPUT_DIR_4 $OUTPUT_MPQ_4
& $TOOL $INPUT_DIR_5 $OUTPUT_MPQ_5
# --- Verify result
if (!(Test-Path $OUTPUT_MPQ_5)) {
Write-Error "MPQ build failed!" Write-Error "MPQ build failed!"
exit 1 exit 1
} }
# --- Copy to dist # --- Verify result
Write-Host "Copying to dist..." if (!(Test-Path (Join-Path $DIST_DIR "Data"))) {
Copy-Item -Force $OUTPUT_MPQ_4 $DIST_MPQ_4 Write-Error "dist\Data not found after build!"
Copy-Item -Force $OUTPUT_MPQ_5 $DIST_MPQ_5 exit 1
}
Write-Host "MPQ created" # --- Sync dist/ -> WOW_HOME
Write-Host "Syncing dist/ -> WOW_HOME..."
robocopy $DIST_DIR $WOW_HOME /E /NFL /NDL
# robocopy exit codes 0-7 are success/warnings; 8+ are errors
if ($LASTEXITCODE -ge 8) {
Write-Error "robocopy failed with exit code $LASTEXITCODE"
exit 1
}
Write-Host "MPQ archives deployed to $WOW_HOME"
# --- Run WoW reload script # --- Run WoW reload script
Write-Host "Launching WoW..." Write-Host "Launching WoW..."
cmd /c $RELOAD_SCRIPT cmd /c $RELOAD_SCRIPT

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