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.

launchvc.cmd 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. setlocal enableextensions
  4. set "script_dir=%~dp0"
  5. set BuildType=Release
  6. set builddir=%script_dir%\build
  7. set USE_EXPRESS=0
  8. for %%A in (%*) DO (
  9. if /i "%%A"=="--debug" (
  10. set BuildType=Debug
  11. )
  12. )
  13. set PATH_DEPENDENCIES=%script_dir%\dependencies
  14. set SDKPath=%builddir%\sdk\OpenVIBE.sln
  15. set DesignerPath=%builddir%\designer-%BuildType%\Designer.sln
  16. set ExtrasPath=%builddir%\extras-%BuildType%\OpenVIBE.sln
  17. SET "OV_PATH_ROOT=%script_dir%\dist\sdk-%BuildType%"
  18. SET "DESIGNER_PATH_ROOT=%script_dir%\dist\designer-%BuildType%"
  19. SET "EXTRAS_PATH_ROOT=%script_dir%\dist\extras-%BuildType%"
  20. set args=%PATH_DEPENDENCIES%
  21. SET "PATH=%EXTRAS_PATH_ROOT%\bin;%DESIGNER_PATH_ROOT%\bin;%OV_PATH_ROOT%\bin;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;%PATH%"
  22. call :addToPathIfExists cmake\bin
  23. call :addToPathIfExists ninja
  24. call :addToPathIfExists expat\bin
  25. call :addToPathIfExists itpp\bin
  26. call :addToPathIfExists lua\lib
  27. call :addToPathIfExists gtk\bin
  28. call :addToPathIfExists cegui\bin
  29. call :addToPathIfExists cegui\dependencies\bin
  30. call :addToPathIfExists pthreads\lib
  31. call :addToPathIfExists openal\libs\win32
  32. call :addToPathIfExists freealut\lib
  33. call :addToPathIfExists libogg\win32\bin\release
  34. call :addToPathIfExists libogg\win32\bin\debug
  35. call :addToPathIfExists libvorbis\win32\bin\release
  36. call :addToPathIfExists libvorbis\win32\bin\debug
  37. call :addToPathIfExists liblsl\lib
  38. call :addToPathIfExists ogre\bin\release
  39. call :addToPathIfExists ogre\bin\debug
  40. call :addToPathIfExists vrpn\bin
  41. call :addToPathIfExists openal\libs\Win32
  42. call :addToPathIfExists liblsl\lib
  43. call :addToPathIfExists sdk-brainproducts-actichamp
  44. call :addToPathIfExists sdk-mcs\lib
  45. call :addToPathIfExists xerces-c\lib
  46. call :addToPathIfExists vcredist
  47. call :addToPathIfExists boost\bin
  48. call :addToPathIfExists tvicport\bin
  49. call :addToPathIfExists vcredist
  50. call :addToPathIfExists zip
  51. echo !PATH!
  52. if not defined SKIP_VS2017 (
  53. SET SKIP_VS2017=1
  54. )
  55. if not defined SKIP_VS2015 (
  56. SET SKIP_VS2015=1
  57. )
  58. if not defined SKIP_VS2013 (
  59. SET SKIP_VS2013=0
  60. )
  61. set VSTOOLS=
  62. set VSCMake=
  63. if %SKIP_VS2017% == 1 (
  64. echo Visual Studio 2017 detection skipped as requested
  65. ) else (
  66. if exist "%VS150COMNTOOLS%vsvars32.bat" (
  67. echo Found VS150 tools at "%VS150COMNTOOLS%" ...
  68. CALL "%VS150COMNTOOLS%vsvars32.bat"
  69. SET VSCMake=Visual Studio 15
  70. goto launch
  71. )
  72. )
  73. if %SKIP_VS2015% == 1 (
  74. echo Visual Studio 2015 detection skipped as requested
  75. ) else (
  76. if exist "%VS140COMNTOOLS%vsvars32.bat" (
  77. echo Found VS140 tools at "%VS140COMNTOOLS%" ...
  78. CALL "%VS140COMNTOOLS%vsvars32.bat"
  79. SET VSCMake=Visual Studio 14
  80. goto launch
  81. )
  82. )
  83. if %SKIP_VS2013% == 1 (
  84. echo Visual Studio 2013 detection skipped as requested
  85. ) else (
  86. if exist "%VS120COMNTOOLS%vsvars32.bat" (
  87. echo Found VS120 tools at "%VS120COMNTOOLS%" ...
  88. CALL "%VS120COMNTOOLS%vsvars32.bat"
  89. SET VSCMake=Visual Studio 12
  90. goto launch
  91. )
  92. )
  93. goto launch
  94. :addToPathIfExists
  95. for %%A in (%args%) DO (
  96. if exist "%%A\%~1\" (
  97. set "PATH=%%A\%~1;!PATH!"
  98. )
  99. )
  100. exit /B 0
  101. :launch
  102. if %USE_EXPRESS% == 1 (
  103. echo Use %VSCMake% Express Edition
  104. if "%VSCMake%"=="Visual Studio 12" (
  105. start /b "%VSINSTALLDIR%\Common7\IDE\WDExpress.exe" %SDKPath%
  106. ) else (
  107. "%VSINSTALLDIR%\Common7\IDE\VCExpress.exe" %SDKPath%
  108. )
  109. ) else (
  110. echo Use %VSCMake%
  111. SET "OV_PATH_BIN=%script_dir%\dist\sdk-%BuildType%\bin"
  112. SET "OV_PATH_LIB=%script_dir%\dist\sdk-%BuildType%\bin"
  113. set "OV_PATH_DATA=%script_dir%\dist\sdk-%BuildType%\share\openvibe"
  114. start /b "" "%VSINSTALLDIR%\Common7\IDE\devenv.exe" %SDKPath%
  115. REM SET "OV_PATH_BIN=%script_dir%\dist\designer-%BuildType%\bin"
  116. REM SET "OV_PATH_LIB=%script_dir%\dist\designer-%BuildType%\bin"
  117. REM set "OV_PATH_DATA=%script_dir%\dist\designer-%BuildType%\share\openvibe"
  118. REM start /b "" "%VSINSTALLDIR%\Common7\IDE\devenv.exe" %DesignerPath%
  119. REM SET "OV_PATH_BIN=%script_dir%\dist\extras-%BuildType%\bin"
  120. REM SET "OV_PATH_LIB=%script_dir%\dist\extras-%BuildType%\bin"
  121. REM set "OV_PATH_DATA=%script_dir%\dist\extras-%BuildType%\share\openvibe"
  122. REM start /b "" "%VSINSTALLDIR%\Common7\IDE\devenv.exe" %ExtrasPath%
  123. REM SET "OV_PATH_BIN=%script_dir%\dist\extras-%BuildType%\bin"
  124. REM SET "OV_PATH_LIB=%script_dir%\dist\extras-%BuildType%\bin"
  125. REM set "OV_PATH_DATA=%script_dir%\dist\extras-%BuildType%\share\openvibe"
  126. REM start /b "" "%VSINSTALLDIR%\Common7\IDE\devenv.exe" OpenViBE-meta.sln
  127. )