From f623864c70ab8d31d230ad54ee1b266804f8221a Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Sun, 29 Oct 2023 16:18:44 -0700 Subject: [PATCH] Fix activation scripts --- dist/platforms/windows/activate.ps1 | 11 +++++++++-- dist/platforms/windows/build.ps1 | 2 +- dist/platforms/windows/entrypoint.ps1 | 3 ++- dist/platforms/windows/return_license.ps1 | 9 ++++++++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dist/platforms/windows/activate.ps1 b/dist/platforms/windows/activate.ps1 index 55051c122..bfaef5c09 100644 --- a/dist/platforms/windows/activate.ps1 +++ b/dist/platforms/windows/activate.ps1 @@ -1,7 +1,14 @@ # Activates Unity -& "$Env:UNITY_PATH\Editor\Unity.exe" -batchmode -quit -nographics ` + +Write-Output "" +Write-Output "###########################" +Write-Output "# Activating #" +Write-Output "###########################" +Write-Output "" + +& "$Env:UNITY_PATH/Editor/Unity.exe" -batchmode -quit -nographics ` -username $Env:UNITY_EMAIL ` -password $Env:UNITY_PASSWORD ` -serial $Env:UNITY_SERIAL ` -projectPath "c:/BlankProject" ` - -logfile - + -logfile - | Out-Host diff --git a/dist/platforms/windows/build.ps1 b/dist/platforms/windows/build.ps1 index 1a92d6d85..e87276187 100644 --- a/dist/platforms/windows/build.ps1 +++ b/dist/platforms/windows/build.ps1 @@ -163,10 +163,10 @@ $process = Start-Process -FilePath "$Env:UNITY_PATH\Editor\Unity.exe" ` while (!$process.HasExited) { if ($process.HasExited) { + Start-Sleep -Seconds 5 Get-Process Start-Sleep -Seconds 10 - Get-Process # Display results diff --git a/dist/platforms/windows/entrypoint.ps1 b/dist/platforms/windows/entrypoint.ps1 index fb3ccc102..f156863d9 100644 --- a/dist/platforms/windows/entrypoint.ps1 +++ b/dist/platforms/windows/entrypoint.ps1 @@ -1,4 +1,5 @@ Get-Process +Start-Sleep -Seconds 3 # Import any necessary registry keys, ie: location of windows 10 sdk # No guarantee that there will be any necessary registry keys, ie: tvOS @@ -22,5 +23,5 @@ Get-Process -Name regsvr32 | ForEach-Object { Stop-Process -Id $_.Id -Force } # Free the seat for the activated license & "c:\steps\return_license.ps1" -Start-Sleep 3 +Start-Sleep -Seconds 3 Get-Process diff --git a/dist/platforms/windows/return_license.ps1 b/dist/platforms/windows/return_license.ps1 index 180f42de3..709c38958 100644 --- a/dist/platforms/windows/return_license.ps1 +++ b/dist/platforms/windows/return_license.ps1 @@ -1,7 +1,14 @@ # Return the active Unity license + +Write-Output "" +Write-Output "###########################" +Write-Output "# Return License #" +Write-Output "###########################" +Write-Output "" + & "$Env:UNITY_PATH\Editor\Unity.exe" -batchmode -quit -nographics ` -username $Env:UNITY_EMAIL ` -password $Env:UNITY_PASSWORD ` -returnlicense ` -projectPath "c:/BlankProject" ` - -logfile - + -logfile - | Out-Host