Skip to content

Commit

Permalink
Fix activation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKahr committed Oct 29, 2023
1 parent fdccfff commit f623864
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
11 changes: 9 additions & 2 deletions dist/platforms/windows/activate.ps1
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion dist/platforms/windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion dist/platforms/windows/entrypoint.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
9 changes: 8 additions & 1 deletion dist/platforms/windows/return_license.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f623864

Please sign in to comment.