install.ps1 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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\python.exe -m pip install --upgrade pip
  6. & C:\Python27\Scripts\pip.exe install six
  7. Write-Host -ForegroundColor Green "`n### Installing sphinx ###`n"
  8. & C:\Python27\Scripts\pip.exe install --user sphinx sphinx_rtd_theme
  9. Write-Host -ForegroundColor Green "`n### Installing Miktex ###`n"
  10. if (-not (Test-Path "c:\miktex\texmfs\install\miktex\bin\pdflatex.exe")) {
  11. & appveyor DownloadFile https://ftp.uni-erlangen.de/mirrors/CTAN/systems/win32/miktex/setup/windows-x86/miktex-portable.exe
  12. & 7z x miktex-portable.exe -oc:\miktex -bso0 -bsp0
  13. # Remove some big files to reduce size to be cached
  14. Remove-Item -Path c:\miktex\texmfs\install\doc -Recurse
  15. Remove-Item -Path c:\miktex\texmfs\install\miktex\bin\biber.exe
  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. }