install.ps1 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $ErrorActionPreference = "Stop"
  2. & git submodule --quiet update --init --recursive
  3. Write-Host -ForegroundColor Green "`n### Installing CMake and python ###`n"
  4. & cinst --no-progress cmake python2
  5. & C:\Python27\Scripts\pip.exe install six
  6. Write-Host -ForegroundColor Green "`n### Installing sphinx ###`n"
  7. & pip install --user sphinx sphinx_rtd_theme
  8. Write-Host -ForegroundColor Green "`n### Installing Miktex ###`n"
  9. if (-not (Test-Path "c:\miktex\texmfs\install\miktex\bin\pdflatex.exe")) {
  10. & appveyor DownloadFile https://ftp.uni-erlangen.de/mirrors/CTAN/systems/win32/miktex/setup/windows-x86/miktex-portable.exe
  11. & 7z x miktex-portable.exe -oc:\miktex -bso0 -bsp0
  12. # Remove some big files to reduce size to be cached
  13. Remove-Item -Path c:\miktex\texmfs\install\doc -Recurse
  14. Remove-Item -Path c:\miktex\texmfs\install\miktex\bin\biber.exe
  15. Remove-Item -Path c:\miktex\texmfs\install\miktex\bin\a5toa4.exe
  16. }
  17. Write-Host -ForegroundColor Green "`n### Installing graphviz ###`n"
  18. & cinst --no-progress graphviz
  19. if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
  20. Write-Host -ForegroundColor Red "`n`n*** Installing graphviz failed. Exiting ... ***"
  21. exit $LASTEXITCODE
  22. }
  23. Write-Host -ForegroundColor Green "`n### Installing mbedtls ###`n"
  24. if ($env:CC_SHORTNAME -eq "mingw") {
  25. & C:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-mbedtls
  26. } elseif ($env:CC_SHORTNAME -eq "vs2015") {
  27. # we need the static version, since open62541 is built with /MT
  28. # vcpkg currently only supports VS2015 and newer builds
  29. & vcpkg install mbedtls:x86-windows-static
  30. }
  31. if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
  32. Write-Host -ForegroundColor Red "`n`n*** Installing mbedtls failed. Exiting ... ***"
  33. exit $LASTEXITCODE
  34. }
  35. if ($env:CC_SHORTNAME -eq "vs2015") {
  36. Write-Host -ForegroundColor Green "`n### Installing libcheck ###`n"
  37. & appveyor DownloadFile https://github.com/Pro/check/releases/download/0.12.0_win/check.zip
  38. & 7z x check.zip -oc:\ -bso0 -bsp0
  39. Write-Host -ForegroundColor Green "`n### Installing DrMemory ###`n"
  40. & cinst --no-progress drmemory.portable
  41. }