BuildingWindowsDependencies: 0ad-build-Fcollada.ps1

File 0ad-build-Fcollada.ps1, 2.4 KB (added by stanislas69, 2 years ago)
Line 
1# Sonar Qube Analysis Script
2# $boostlocation = "$librarieslocation/win32/boost/include"
3# /d:sonar.cxx.msbuild.reportPath="$buildlogfilename" `
4
5$jobs = 8
6$PSScriptRootFixed = $PSScriptRoot -replace "\\", "/"
7Write-Output "Building Fcollada. with $jobs job(s)."
8$buildlogfilename = "$PSScriptRootFixed/buildlog-fcollada.log"
9
10function get_elapsed_time($start_time)
11{
12 Write-Output "Time taken: $((Get-Date).Subtract($start_time).Minutes) minutes(s) $((Get-Date).Subtract($start_time).Seconds) second(s)"
13}
14
15if((Test-Path "$buildlogfilename"))
16{
17 Remove-Item "$buildlogfilename"
18}
19
20Remove-Item -Path "$PSScriptRootFixed/libraries/source/fcollada/lib/FCollada.lib" -Force
21Remove-Item -Path "$PSScriptRootFixed/binaries/system/FCollada.dll" -Force
22Remove-Item -Path "$PSScriptRootFixed/binaries/system/FCollada.pdb" -Force
23Remove-Item -Path "$PSScriptRootFixed/libraries/source/fcollada/lib/FColladaD.lib" -Force
24Remove-Item -Path "$PSScriptRootFixed/binaries/system/FColladaD.dll" -Force
25Remove-Item -Path "$PSScriptRootFixed/binaries/system/FColladaD.pdb" -Force
26
27Write-Output "======================================="
28Write-Output "Running Msbuild"
29Write-Output "======================================="
30
31Set-Location "$PSScriptRootFixed/libraries/source/fcollada/src/FCollada/"
32$start_time = Get-Date
33MSBuild.exe "FCollada.vcxproj" /v:q /m:${jobs} /t:Clean,Rebuild /p:PlatformToolset=v140_xp /p:Configuration="Release DLL" /p:Platform="Win32" | Out-File -Encoding UTF8 -FilePath "$buildlogfilename"
34get_elapsed_time($start_time)
35Move-Item "Output/FCollada.lib" "$PSScriptRootFixed/libraries/source/fcollada/lib/FCollada.lib"
36Move-Item "Output/Release DLL Win32/FCollada.dll" "$PSScriptRootFixed/binaries/system/FCollada.dll"
37Move-Item "Output/Release DLL Win32/FCollada/FCollada.pdb" "$PSScriptRootFixed/binaries/system/FCollada.pdb"
38
39$start_time = Get-Date
40MSBuild.exe "FCollada.vcxproj" /v:q /m:${jobs} /t:Clean,Rebuild /p:PlatformToolset=v140_xp /p:Configuration="Debug DLL" /p:Platform="Win32" | Out-File -Encoding UTF8 -FilePath "$buildlogfilename"
41get_elapsed_time($start_time)
42Move-Item "Output/FColladaD.lib" "$PSScriptRootFixed/libraries/source/fcollada/lib/FColladaD.lib"
43Move-Item "Output/Debug DLL Win32/FColladaD.dll" "$PSScriptRootFixed/binaries/system/FColladaD.dll"
44Move-Item "Output/Debug DLL Win32/FCollada/FCollada.pdb" "$PSScriptRootFixed/binaries/system/FColladaD.pdb"
45Set-Location "$PSScriptRootFixed"
46