install.ps1 2.1 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/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\icudt58.dll
  16. Remove-Item -Path c:\miktex\texmfs\install\miktex\bin\a5toa4.exe
  17. }
  18. Write-Host -ForegroundColor Green "`n### Installing graphviz ###`n"
  19. & cinst --no-progress graphviz
  20. if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
  21. Write-Host -ForegroundColor Red "`n`n*** Installing graphviz failed. Exiting ... ***"
  22. exit $LASTEXITCODE
  23. }
  24. Write-Host -ForegroundColor Green "`n### Installing mbedtls ###`n"
  25. if ($env:CC_SHORTNAME -eq "mingw") {
  26. & C:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-mbedtls
  27. } elseif ($env:CC_SHORTNAME -eq "vs2015") {
  28. # we need the static version, since open62541 is built with /MT
  29. # vcpkg currently only supports VS2015 and newer builds
  30. & vcpkg install mbedtls:x86-windows-static
  31. }
  32. if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
  33. Write-Host -ForegroundColor Red "`n`n*** Installing mbedtls failed. Exiting ... ***"
  34. exit $LASTEXITCODE
  35. }
  36. if ($env:CC_SHORTNAME -eq "vs2015") {
  37. Write-Host -ForegroundColor Green "`n### Installing libcheck ###`n"
  38. & appveyor DownloadFile https://github.com/Pro/check/releases/download/0.12.0_win/check.zip
  39. & 7z x check.zip -oc:\ -bso0 -bsp0
  40. Write-Host -ForegroundColor Green "`n### Installing DrMemory ###`n"
  41. & cinst --no-progress drmemory.portable
  42. }