diff --git a/dist/platforms/windows/entrypoint.ps1 b/dist/platforms/windows/entrypoint.ps1 index b5255d11..68491131 100644 --- a/dist/platforms/windows/entrypoint.ps1 +++ b/dist/platforms/windows/entrypoint.ps1 @@ -1,3 +1,10 @@ +# +# Create directory for license activation +# + +ACTIVATE_LICENSE_PATH="$($Env:GITHUB_WORKSPACE)/_activate-license" +mkdir $ACTIVATE_LICENSE_PATH + # Activate Unity & "c:\steps\activate.ps1" @@ -13,3 +20,9 @@ regsvr32 C:\ProgramData\Microsoft\VisualStudio\Setup\x64\Microsoft.VisualStudio. # Free the seat for the activated license & "c:\steps\return_license.ps1" + +# +# Remove license activation directory +# + +Remove-Item -Path $ACTIVATE_LICENSE_PATH -Recurse diff --git a/dist/platforms/windows/steps/activate.ps1 b/dist/platforms/windows/steps/activate.ps1 index d2e1a5ab..76a4b878 100644 --- a/dist/platforms/windows/steps/activate.ps1 +++ b/dist/platforms/windows/steps/activate.ps1 @@ -1,6 +1,10 @@ +Push-Location $ACTIVATE_LICENSE_PATH + # Activates Unity & "C:\Program Files\Unity\Hub\Editor\$Env:UNITY_VERSION\Editor\Unity.exe" -batchmode -quit -nographics ` -username $Env:UNITY_EMAIL ` -password $Env:UNITY_PASSWORD ` -serial $Env:UNITY_SERIAL ` -logfile | Out-Host + +Pop-Location diff --git a/dist/platforms/windows/steps/return_license.ps1 b/dist/platforms/windows/steps/return_license.ps1 index 126b6f62..363ebd3b 100644 --- a/dist/platforms/windows/steps/return_license.ps1 +++ b/dist/platforms/windows/steps/return_license.ps1 @@ -1,6 +1,10 @@ +Push-Location $ACTIVATE_LICENSE_PATH + # Return the active Unity license & "C:\Program Files\Unity\Hub\Editor\$Env:UNITY_VERSION\Editor\Unity.exe" -batchmode -quit -nographics ` -username $Env:UNITY_EMAIL ` -password $Env:UNITY_PASSWORD ` -returnlicense ` -logfile | Out-Host + +Pop-Location