You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install_dependencies.cmd 3.2KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. setlocal enableextensions
  4. REM The dependencies are hosted by Inria
  5. set PROXYPASS=anon:anon
  6. set URL=http://openvibe.inria.fr/dependencies/win32/3.1.0/
  7. set base_dir=%~dp0
  8. set dependencies_prefix=%base_dir%\dependencies
  9. set platform_target=x64
  10. :parameter_parse
  11. if /i "%1"=="-h" (
  12. echo Usage: install_dependencies.cmd [--dependencies-dir directoryprefix]
  13. echo --
  14. pause
  15. exit /B 0
  16. ) else if /i "%1"=="--help" (
  17. echo Usage: install_dependencies.cmd [--dependencies-dir directoryprefix]
  18. echo --
  19. pause
  20. exit /B 0
  21. ) else if /i "%1"=="--dependencies-dir" (
  22. set dependencies_prefix=%2
  23. SHIFT
  24. SHIFT
  25. Goto parameter_parse
  26. ) else if /i "%1"=="--platform-target" (
  27. set platform_target=%2
  28. SHIFT
  29. SHIFT
  30. Goto parameter_parse
  31. ) else if /i "%1" neq "" (
  32. echo Unknown parameter "%1"
  33. exit /b 1
  34. )
  35. if /i "%platform_target%"=="x86" (
  36. set dep_dir=%dependencies_prefix%
  37. set designer_manifest_file=.\windows-dependencies.txt
  38. ) else (
  39. set dep_dir=%dependencies_prefix%_%platform_target%
  40. set designer_manifest_file=.\windows-dependencies-%platform_target%.txt
  41. )
  42. echo Installing dependencies for build target %platform_target%
  43. echo The target folder is %dep_dir%
  44. if not exist "%dep_dir%\arch\data" ( mkdir "%dep_dir%\arch\data" )
  45. if not exist "%dep_dir%\arch\build\windows" ( mkdir "%dep_dir%\arch\build\windows" )
  46. echo Installing sdk dependencies
  47. cd %base_dir%\sdk\scripts
  48. powershell.exe -NoProfile -ExecutionPolicy Bypass -file "%base_dir%\sdk\scripts\windows-get-dependencies.ps1" -manifest_file .\windows-build-tools.txt -dest_dir %dep_dir%
  49. call :check_errors !errorlevel! "Build tools" || exit /b !_errlevel!
  50. powershell.exe -NoProfile -ExecutionPolicy Bypass -file "%base_dir%\sdk\scripts\windows-get-dependencies.ps1" -manifest_file .\windows-dependencies-%platform_target%.txt -dest_dir %dep_dir%
  51. call :check_errors !errorlevel! "SDK" || exit /b !_errlevel!
  52. powershell.exe -NoProfile -ExecutionPolicy Bypass -file "%base_dir%\sdk\scripts\windows-get-dependencies.ps1" -manifest_file .\tests-data.txt -dest_dir %dep_dir%
  53. call :check_errors !errorlevel! "SDK tests" || exit /b !_errlevel!
  54. echo Installing Designer dependencies
  55. cd %base_dir%\designer\scripts
  56. powershell.exe -NoProfile -ExecutionPolicy Bypass -file "%base_dir%\sdk\scripts\windows-get-dependencies.ps1" -manifest_file %designer_manifest_file% -dest_dir %dep_dir%
  57. call :check_errors !errorlevel! "Designer" || exit /b !_errlevel!
  58. echo Installing OpenViBE extras dependencies
  59. cd %base_dir%\extras\scripts
  60. powershell.exe -NoProfile -ExecutionPolicy Bypass -file "%base_dir%\sdk\scripts\windows-get-dependencies.ps1" -manifest_file .\windows-dependencies-%platform_target%.txt -dest_dir %dep_dir%
  61. call :check_errors !errorlevel! "Extras" || exit /b !_errlevel!
  62. echo Creating OpenViBE extras dependency path setup script
  63. set "dependency_cmd=%dep_dir%\windows-dependencies.cmd"
  64. echo @ECHO OFF >%dependency_cmd%
  65. echo. >>%dependency_cmd%
  66. echo SET "dependencies_base=%dep_dir%" >>%dependency_cmd%
  67. echo. >>%dependency_cmd%
  68. type %base_dir%\extras\scripts\windows-dependencies.cmd-base >>%dependency_cmd%
  69. echo Done.
  70. exit /b 0
  71. :check_errors
  72. SET _errlevel=%1
  73. SET _stageName=%2
  74. if !_errlevel! neq 0 (
  75. echo Error while installing !_stageName! dependencies
  76. exit /b !_errlevel!
  77. )