Добавлена функция установки конфига; Изменена архитектура bat файла для работы с аргументами -mode

This commit is contained in:
2025-08-12 00:47:21 +07:00
parent 5b29ebfb5d
commit 5b877693da
4 changed files with 65 additions and 9 deletions

View File

@@ -17,12 +17,12 @@ if ($form) {
$uriBuilder.Query = $queryString
$downloadUrl = $uriBuilder.Uri.AbsoluteUri
Write-Host "[INFO] Downloading..."
Write-Host "[INFO] Downloading mods..."
Invoke-WebRequest -Uri $downloadUrl -WebSession $session -OutFile $outputFile
Write-Host "[INFO] The file was successfully downloaded with confirmation."
}
else {
Write-Host "[INFO] Downloading..."
Write-Host "[INFO] Downloading mods..."
Invoke-WebRequest -Uri $baseUrl -OutFile $outputFile
Write-Host "[INFO] The file was successfully downloaded directly."
}
@@ -31,6 +31,9 @@ $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
$rimworldMods = Resolve-Path (Join-Path $scriptDir "..")
$sourceFolder = Get-ChildItem $outputFile | Select-Object -First 1
Move-Item -Path $sourceFolder.FullName -Destination $rimworldMods
Copy-Item -Path $sourceFolder.FullName -Destination $rimworldMods
Write-Host "[INFO] Cleaning up..."
Remove-Item $outputFile
Write-Host "[INFO] The ruinship_mods.rar file has been installed to the path $rimworldMods. Please extract it to install all the necessary mods." -ForegroundColor Green