diff --git a/Directory.Build.props b/Directory.Build.props index 9f9da59..7d97508 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,6 +3,7 @@ 3.0.3.0 1.1.6.26219 Stable + public 2.2.2 5.9.1 2.8.13 diff --git a/Download-Game.ps1 b/Download-Game.ps1 index bde4aa6..e9d8fb4 100644 --- a/Download-Game.ps1 +++ b/Download-Game.ps1 @@ -5,11 +5,13 @@ Param( $Branch = "stable" ) -$CurrentBeta = "1.2.0" +$DepotVersion = Get-Content $PWD\Directory.Build.props | Select-String -Pattern "([\w.-]+)<\/DepotName>" | ForEach-Object { $($_.Matches.Groups[1]).Value } + +$GameDirectory = If ($Branch -eq "stable") { "bannerlord-stable" } ElseIf ($Branch -eq "beta") { "bannerlord-beta" } Else { throw "Invalid branch name!" } $SteamCmdUrl = "https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip"; -Write-Host "Downloading / updating game for branch [$Branch]" -ForegroundColor Cyan +Write-Host "Downloading game for branch [$Branch ($DepotVersion)] into [$GameDirectory]" -ForegroundColor Cyan Write-Host "Checking if SteamCMD is installed... " -NoNewline @@ -54,8 +56,4 @@ Else Return } -$GameDirectory = If ($Branch -eq "stable") { "bannerlord-stable" } ElseIf ($Branch -eq "beta") { "bannerlord-beta" } Else { throw "Invalid branch name!" } - -$GameBranch = If ($Branch -eq "stable") { "public" } ElseIf ($Branch -eq "beta") { $CurrentBeta } Else { throw "Invalid branch name!" } - -&"$PWD\bin\steamcmd\steamcmd.exe" +force_install_dir "$PWD\bin\$GameDirectory" +login $Credentials[0] $Credentials[1] "+app_update 261550 -beta $GameBranch validate" +quit +&"$PWD\bin\steamcmd\steamcmd.exe" +force_install_dir "$PWD\bin\$GameDirectory" +login $Credentials[0] $Credentials[1] "+app_update 261550 -beta $DepotVersion validate" +quit