2023-10-28 19:21:10 +00:00
|
|
|
Get-Process
|
|
|
|
|
2025-06-07 21:11:18 +00:00
|
|
|
# Copy .upmconfig.toml if it exists
|
|
|
|
if (Test-Path "C:\githubhome\.upmconfig.toml") {
|
|
|
|
Write-Host "Copying .upmconfig.toml to $Env:USERPROFILE\.upmconfig.toml"
|
|
|
|
Copy-Item -Path "C:\githubhome\.upmconfig.toml" -Destination "$Env:USERPROFILE\.upmconfig.toml" -Force
|
|
|
|
} else {
|
|
|
|
Write-Host "No .upmconfig.toml found at C:\githubhome"
|
|
|
|
}
|
|
|
|
|
2022-01-25 21:18:15 +00:00
|
|
|
# Import any necessary registry keys, ie: location of windows 10 sdk
|
|
|
|
# No guarantee that there will be any necessary registry keys, ie: tvOS
|
2024-02-19 01:39:26 +00:00
|
|
|
Get-ChildItem -Path c:\regkeys -File | ForEach-Object { reg import $_.fullname }
|
2022-01-25 21:18:15 +00:00
|
|
|
|
|
|
|
# Register the Visual Studio installation so Unity can find it
|
|
|
|
regsvr32 C:\ProgramData\Microsoft\VisualStudio\Setup\x64\Microsoft.VisualStudio.Setup.Configuration.Native.dll
|
|
|
|
|
2023-10-28 19:21:10 +00:00
|
|
|
# Kill the regsvr process
|
|
|
|
Get-Process -Name regsvr32 | ForEach-Object { Stop-Process -Id $_.Id -Force }
|
|
|
|
|
2023-03-28 08:05:31 +00:00
|
|
|
# Setup Git Credentials
|
2023-11-15 14:17:55 +00:00
|
|
|
. "c:\steps\set_gitcredential.ps1"
|
2023-03-28 08:05:31 +00:00
|
|
|
|
2025-05-17 17:17:08 +00:00
|
|
|
if ($env:ENABLE_GPU -eq "true") {
|
|
|
|
# Install LLVMpipe software graphics driver
|
|
|
|
. "c:\steps\install_llvmpipe.ps1"
|
|
|
|
}
|
|
|
|
|
2023-03-28 08:05:31 +00:00
|
|
|
# Activate Unity
|
2024-02-19 01:39:26 +00:00
|
|
|
if ($env:SKIP_ACTIVATION -ne "true") {
|
|
|
|
. "c:\steps\activate.ps1"
|
2023-03-28 08:05:31 +00:00
|
|
|
|
2024-02-19 01:39:26 +00:00
|
|
|
# If we didn't activate successfully, exit with the exit code from the activation step.
|
|
|
|
if ($ACTIVATION_EXIT_CODE -ne 0) {
|
2023-11-25 07:24:16 +00:00
|
|
|
exit $ACTIVATION_EXIT_CODE
|
2024-02-19 01:39:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Write-Host "Skipping activation"
|
2023-11-25 07:24:16 +00:00
|
|
|
}
|
|
|
|
|
2022-01-25 21:18:15 +00:00
|
|
|
# Build the project
|
2023-11-15 14:17:55 +00:00
|
|
|
. "c:\steps\build.ps1"
|
2022-01-25 21:18:15 +00:00
|
|
|
|
|
|
|
# Free the seat for the activated license
|
2024-02-19 01:39:26 +00:00
|
|
|
if ($env:SKIP_ACTIVATION -ne "true") {
|
|
|
|
. "c:\steps\return_license.ps1"
|
|
|
|
}
|
2023-10-28 19:21:10 +00:00
|
|
|
|
|
|
|
Get-Process
|
2023-11-15 14:17:55 +00:00
|
|
|
|
|
|
|
exit $BUILD_EXIT_CODE
|