Skip to content

Commit 356ea1e

Browse files
committed
Another test at copying this file to the right place
1 parent f5642ae commit 356ea1e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

scripts/packaging/createbinariesfordocs.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,26 @@ $unityEditor = Get-ChildItem $UnityDirectory -Filter 'Unity.exe' -Recurse | Sele
3535
if (-not $unityEditor) {
3636
throw "Unable to find the Unity editor executable in $UnityDirectory"
3737
}
38-
Write-Verbose $unityEditor;
38+
Write-Verbose $unityEditor
3939

4040
function RunUnityTask {
4141
param([string]$taskName, [string]$methodToExecute)
4242
Write-Output "Starting running Unity task: $($taskName)"
4343
$logFile = New-Item -Path "Logs\Unity.$($taskName).$($Version).log" -ItemType File -Force
44-
44+
4545
$ProjectLocation = Resolve-Path "$(Get-Location)\..\"
4646
Write-Output $ProjectLocation
4747
$proc = Start-Process -FilePath "$unityEditor" -ArgumentList "-projectPath $ProjectLocation -batchmode -executeMethod $($methodToExecute) -logFile $($logFile.FullName) -nographics -quit" -PassThru
4848
$ljob = Start-Job -ScriptBlock { param($log) Get-Content "$log" -Wait } -ArgumentList $logFile.FullName
49-
49+
5050
while (-not $proc.HasExited -and $ljob.HasMoreData) {
5151
Receive-Job $ljob
5252
Start-Sleep -Milliseconds 200
5353
}
5454
Receive-Job $ljob
55-
55+
5656
Stop-Job $ljob
57-
57+
5858
Remove-Job $ljob
5959
Stop-Process $proc
6060
if ($proc.ExitCode -ge 1) {
@@ -75,14 +75,15 @@ try {
7575

7676
### Build the needed flavor for MRTK
7777
Write-Output "============ Building InEditor WSA ============ "
78-
$logFilePath = "Logs\Build.InEditor.WSA.$($Version).log"
78+
$logFilePath = "$(Get-Location)\Logs\Build.InEditor.WSA.$($Version).log"
7979
dotnet msbuild ..\NuGet\BuildSource.proj -target:BuildWSAEditor > $logFilePath
8080
if ($lastexitcode -ge 1) {
81-
Write-Error "Building InEditor WSA Failed! See log file for more information $(Get-Location)\$logFilePath";
82-
Copy-Item -Path $logFilePath -Destination "$OutputDirectory\"
81+
Write-Output "Copying $logFilePath to $OutputDirectory"
82+
Copy-Item -Path $logFilePath -Destination "$OutputDirectory"
83+
Write-Error "Building InEditor WSA Failed! See log file for more information $logFilePath"
8384
exit($lastexitcode)
8485
}
85-
86+
8687
Write-Output "============ Copying the binaries ============ "
8788
New-Item -ItemType Directory "MRTK_$($Version)"
8889
New-Item -ItemType Directory "MRTK_$($Version)\dependencies"
@@ -99,7 +100,6 @@ try {
99100
nuget install Microsoft.Windows.MixedReality.DotNetWinRT -OutputDirectory packages
100101
Copy-Item "packages\Microsoft.Windows.MixedReality.DotNetWinRT*\lib\unity\net46\Microsoft.Windows.MixedReality.DotNetWinRT.dll" "MRTK_$($Version)\dependencies\"
101102
Copy-Item -Path "MRTK_$($Version)" -Destination "$OutputDirectory" -Recurse
102-
103103
}
104104
finally {
105105
Set-Location $OriginalPath

0 commit comments

Comments
 (0)