set_paths.bat 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @echo off
  2. REM Copyright (C) 1994-2017 Altair Engineering, Inc.
  3. REM For more information, contact Altair at www.altair.com.
  4. REM
  5. REM This file is part of the PBS Professional ("PBS Pro") software.
  6. REM
  7. REM Open Source License Information:
  8. REM
  9. REM PBS Pro is free software. You can redistribute it and/or modify it under the
  10. REM terms of the GNU Affero General Public License as published by the Free
  11. REM Software Foundation, either version 3 of the License, or (at your option) any
  12. REM later version.
  13. REM
  14. REM PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  15. REM WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  16. REM PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
  17. REM
  18. REM You should have received a copy of the GNU Affero General Public License along
  19. REM with this program. If not, see <http://www.gnu.org/licenses/>.
  20. REM
  21. REM Commercial License Information:
  22. REM
  23. REM The PBS Pro software is licensed under the terms of the GNU Affero General
  24. REM Public License agreement ("AGPL"), except where a separate commercial license
  25. REM agreement for PBS Pro version 14 or later has been executed in writing with Altair.
  26. REM
  27. REM Altair’s dual-license business model allows companies, individuals, and
  28. REM organizations to create proprietary derivative works of PBS Pro and distribute
  29. REM them - whether embedded or bundled with other software - under a commercial
  30. REM license agreement.
  31. REM
  32. REM Use of Altair’s trademarks, including but not limited to "PBS™",
  33. REM "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  34. REM trademark licensing policies.
  35. @echo off
  36. set __OLD_DIR="%CD%"
  37. cd "%~dp0..\.."
  38. REM SVN is used by Python internally, to download it's dependencies
  39. if not defined SVN_BIN (
  40. set SVN_BIN=svn
  41. )
  42. if not defined CURL_BIN (
  43. set CURL_BIN=curl
  44. )
  45. if not defined UNZIP_BIN (
  46. set UNZIP_BIN=unzip
  47. )
  48. if not defined MSYSDIR (
  49. set MSYSDIR=C:\MinGW\msys\1.0
  50. )
  51. if not defined PERL_BIN (
  52. set PERL_BIN=perl
  53. )
  54. if not defined CMAKE_BIN (
  55. set CMAKE_BIN=cmake
  56. )
  57. if not defined __BINARIESDIR (
  58. set __BINARIESDIR=%CD%\binaries
  59. )
  60. if exist "%VS90COMNTOOLS%vsvars32.bat" (
  61. call "%VS90COMNTOOLS%vsvars32.bat"
  62. ) else (
  63. echo "Could not find %VS90COMNTOOLS%vsvars32.bat"
  64. exit 1
  65. )
  66. set __RANDOM_VAL=%RANDOM::=_%
  67. set __RANDOM_VAL-%RANDOM_VAL:.=%
  68. set __BINARIESJUNCTION=%__BINARIESDIR:~0,2%\__withoutspace_binariesdir_%__RANDOM_VAL%
  69. if not exist "%__BINARIESDIR%" (
  70. mkdir "%__BINARIESDIR%"
  71. )
  72. if not "%__BINARIESDIR: =%"=="%__BINARIESDIR%" (
  73. mklink /J %__BINARIESJUNCTION% "%__BINARIESDIR%"
  74. if not %ERRORLEVEL% == 0 (
  75. echo "Could not create junction to %__BINARIESJUNCTION% to %__BINARIESDIR% which contains space"
  76. exit 1
  77. )
  78. cd %__BINARIESJUNCTION%
  79. ) else (
  80. cd %__BINARIESDIR%
  81. )
  82. set BINARIESDIR=%CD%
  83. for /F "usebackq tokens=*" %%i in (`""%MSYSDIR%\bin\bash.exe" -c "pwd""`) do set BINARIESDIR_M=%%i
  84. if not defined LIBEDIT_VERSION (
  85. set LIBEDIT_VERSION=2.204
  86. )
  87. if not defined LIBICAL_VERSION (
  88. set LIBICAL_VERSION=1.0.1
  89. )
  90. if not defined PGSQL_VERSION (
  91. set PGSQL_VERSION=9.6.3
  92. )
  93. if not defined PYTHON_VERSION (
  94. set PYTHON_VERSION=2.7.13
  95. )
  96. if not defined OPENSSL_VERSION (
  97. set OPENSSL_VERSION=1_1_0f
  98. )
  99. if not defined SWIG_VERSION (
  100. set SWIG_VERSION=3.0.12
  101. )
  102. if not defined TCL_VERSION (
  103. set TCL_VERSION=8.6.6
  104. )
  105. if not defined TK_VERSION (
  106. set TK_VERSION=8.6.6
  107. )
  108. set DO_DEBUG_BUILD=0
  109. if "%~1"=="debug" (
  110. set DO_DEBUG_BUILD=1
  111. )
  112. if "%~1"=="Debug" (
  113. set DO_DEBUG_BUILD=1
  114. )
  115. cd %__OLD_DIR%