Готова функция установки сценария
This commit is contained in:
12
install_scenario.ps1
Normal file
12
install_scenario.ps1
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
$fileId = "1eEBGmfh7Gu2g_KQoCiVg8XsRM9m_-DZB"
|
||||||
|
$baseUrl = "https://drive.google.com/uc?export=download&id=$fileId"
|
||||||
|
|
||||||
|
$rimworldPath = Join-Path $env:USERPROFILE "AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios"
|
||||||
|
$rimworldConfigPath = Join-Path $rimworldPath "Scenarios\RuinShip.rsc"
|
||||||
|
|
||||||
|
$response = Invoke-WebRequest -Uri $baseUrl -SessionVariable session
|
||||||
|
|
||||||
|
Write-Host "[INFO] Downloading scenario..."
|
||||||
|
Invoke-WebRequest -Uri $baseUrl -OutFile $rimworldConfigPath
|
||||||
|
|
||||||
|
Write-Host "[INFO] RuinShip.rsc was successfully downloaded." -ForegroundColor Green
|
||||||
22
setup.bat
22
setup.bat
@@ -15,6 +15,10 @@ if "%1"=="-mode" (
|
|||||||
call :ModsConfigInstall
|
call :ModsConfigInstall
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
if "%2"=="scenario" (
|
||||||
|
call :ScenarioInstall
|
||||||
|
goto end
|
||||||
|
)
|
||||||
echo Ошибка: Режима %2 не существует
|
echo Ошибка: Режима %2 не существует
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
@@ -41,8 +45,8 @@ if /i "%choice%"=="2" (
|
|||||||
goto ask
|
goto ask
|
||||||
)
|
)
|
||||||
if /i "%choice%"=="3" (
|
if /i "%choice%"=="3" (
|
||||||
|
call :ScenarioInstall
|
||||||
echo Пока функция не готова. Вам что-то ещё?
|
echo Вам что-то ещё?
|
||||||
goto ask
|
goto ask
|
||||||
)
|
)
|
||||||
if /i "%choice%"=="4" (
|
if /i "%choice%"=="4" (
|
||||||
@@ -60,15 +64,21 @@ echo Варианта %choice% не существует
|
|||||||
goto ask
|
goto ask
|
||||||
|
|
||||||
:: Функции
|
:: Функции
|
||||||
:ModsConfigInstall
|
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0install_modsconfig.ps1"
|
|
||||||
goto :eof
|
|
||||||
|
|
||||||
:modsInstall
|
:modsInstall
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0download_mods.ps1"
|
powershell -ExecutionPolicy Bypass -File "%~dp0download_mods.ps1"
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
:ScenarioInstall
|
||||||
|
powershell -ExecutionPolicy Bypass -File "%~dp0install_scenario.ps1"
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:ModsConfigInstall
|
||||||
|
powershell -ExecutionPolicy Bypass -File "%~dp0install_modsconfig.ps1"
|
||||||
|
goto :eof
|
||||||
|
|
||||||
:installAll
|
:installAll
|
||||||
|
powershell -ExecutionPolicy Bypass -File "%~dp0install_modsconfig.ps1"
|
||||||
|
powershell -ExecutionPolicy Bypass -File "%~dp0install_scenario.ps1"
|
||||||
powershell -ExecutionPolicy Bypass -File "%~dp0download_mods.ps1"
|
powershell -ExecutionPolicy Bypass -File "%~dp0download_mods.ps1"
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user