Adição CabTab
This commit is contained in:
@@ -67,9 +67,7 @@ function Get-ModeVersion {
|
||||
param ([string]$Mode)
|
||||
|
||||
switch ($Mode) {
|
||||
"Portrait" { return $VersionPortrait }
|
||||
"PortraitR" { return $VersionPortraitR }
|
||||
"Dual" { return $VersionDual }
|
||||
"Dual" { return $VersionDual }
|
||||
"DualR" { return $VersionDualR }
|
||||
"Botoneira" { return $VersionBotoneira }
|
||||
default { throw "Unknown mode: $Mode" }
|
||||
@@ -80,9 +78,7 @@ function Get-ModeOrientation {
|
||||
param ([string]$Mode)
|
||||
|
||||
switch ($Mode) {
|
||||
"Portrait" { return "Portrait" }
|
||||
"PortraitR" { return "Portrait" }
|
||||
"Dual" { return "Dual" }
|
||||
"Dual" { return "Dual" }
|
||||
"DualR" { return "Dual" }
|
||||
"Botoneira" { return "Portrait" }
|
||||
default { throw "Unknown mode: $Mode" }
|
||||
@@ -93,8 +89,7 @@ function Get-ModeDisplayName {
|
||||
param ([string]$Mode)
|
||||
|
||||
switch ($Mode) {
|
||||
"Portrait" { return "Portrait Lojas" }
|
||||
"PortraitR" { return "Portrait Rua" }
|
||||
"PortraitCabTab" { return "Portrait CabTab" }
|
||||
"Dual" { return "Dual" }
|
||||
"DualR" { return "Dual Rua" }
|
||||
"Botoneira" { return "Botoneira" }
|
||||
@@ -282,6 +277,56 @@ function Disable-UACAndNotifications {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Upgrade-PortraitCabTab {
|
||||
|
||||
$CabDir="C:\PilotDownloads\CabTabInstall"
|
||||
|
||||
$files=@(
|
||||
"credentials.dat","deployAgent.bat","deployCabinet.bat","site_director.cfg","start.bat",
|
||||
"OHGDRelease-2026.05.07.1.zip","PilotGameAgentRelease-2026.6.2.1.zip",
|
||||
"PG Settings.reg","windowsdesktop-runtime-8.0.15-win-x64.exe")
|
||||
|
||||
foreach($f in $files){
|
||||
if(!(Test-Path (Join-Path $CabDir $f))){
|
||||
[System.Windows.Forms.MessageBox]::Show("Arquivo não encontrado: $f")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Copy-Item "$CabDir\credentials.dat" C:\pilotgames -Force
|
||||
Copy-Item "$CabDir\deployAgent.bat" C:\pilotgames -Force
|
||||
Copy-Item "$CabDir\deployCabinet.bat" C:\pilotgames -Force
|
||||
Copy-Item "$CabDir\site_director.cfg" C:\pilotgames -Force
|
||||
Copy-Item "$CabDir\start.bat" C:\pilotgames -Force
|
||||
Copy-Item "$CabDir\OHGDRelease-2026.05.07.1.zip" C:\pilotgames\downloads -Force
|
||||
Copy-Item "$CabDir\PilotGameAgentRelease-2026.6.2.1.zip" C:\pilotgames\downloads -Force
|
||||
|
||||
reg import "$CabDir\PG Settings.reg"
|
||||
Start-Process "$CabDir\windowsdesktop-runtime-8.0.15-win-x64.exe" -ArgumentList "/quiet /norestart" -Wait
|
||||
|
||||
Remove-Item C:\pilot -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Stop-Service PilotGameAgent -ErrorAction SilentlyContinue
|
||||
sc.exe delete PilotGameAgent
|
||||
|
||||
Rename-Item C:\pilotgames\game_agent game_agent.ND -ErrorAction SilentlyContinue
|
||||
New-Item C:\pilotgames\game_agent -ItemType Directory -Force|Out-Null
|
||||
|
||||
Push-Location C:\pilotgames
|
||||
& .\deployAgent.bat 2026.6.2.1
|
||||
& .\InstallGameAgentService.bat
|
||||
Set-Service PilotGameAgent -StartupType Automatic
|
||||
Remove-Item .\NDGDRelease*.zip -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item .\NDGDRelease.bak -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item .\BRGDRelease.bak -Recurse -Force -ErrorAction SilentlyContinue
|
||||
if(Test-Path .\NDGDRelease){Move-Item .\NDGDRelease .\NDGDRelease.bak}
|
||||
if(Test-Path .\BRGDRelease){Move-Item .\BRGDRelease .\BRGDRelease.bak}
|
||||
& .\deployCabinet.bat 2026.05.07.1
|
||||
Stop-Process -Name explorer -Force -ErrorAction SilentlyContinue
|
||||
Start-Service PilotGameAgent
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# GUI
|
||||
$form = New-Object System.Windows.Forms.Form
|
||||
$form.Text = "Pilot Installer"
|
||||
@@ -300,8 +345,7 @@ $buttonsPanel.Margin = New-Object System.Windows.Forms.Padding(0)
|
||||
$form.Controls.Add($buttonsPanel)
|
||||
|
||||
$buttons = @(
|
||||
@{ Text = "Install Portrait Lojas"; Action = { Install-Pilot -Mode "Portrait" } },
|
||||
@{ Text = "Install Portrait Rua"; Action = { Install-Pilot -Mode "PortraitR" } },
|
||||
@{ Text = "Portrait CabTab"; Action = { Upgrade-PortraitCabTab } },
|
||||
@{ Text = "Install Dual Lojas"; Action = { Install-Pilot -Mode "Dual" } },
|
||||
@{ Text = "Install Dual Rua"; Action = { Install-Pilot -Mode "DualR" } },
|
||||
@{ Text = "Install Botoneira"; Action = { Install-Pilot -Mode "Botoneira" } },
|
||||
|
||||
Reference in New Issue
Block a user