Synchronize with trunk.
[reactos.git] / configure.cmd
index 6a74cc0..bd1ce26 100755 (executable)
@@ -21,7 +21,7 @@ if /I "%1" == "arm_hosttools" (
 \r
 :: Get the source root directory\r
 set REACTOS_SOURCE_DIR=%~dp0\r
-set USE_NMAKE=0\r
+set USE_VSCMD=0\r
 \r
 :: Detect presence of cmake\r
 cmd /c cmake --version 2>&1 | find "cmake version" > NUL || goto cmake_notfound\r
@@ -49,7 +49,7 @@ if defined ROS_ARCH (
     ) else if "%_BUILDARCH%" == "AMD64" (\r
         set ARCH=amd64\r
     )\r
-    set USE_NMAKE=1\r
+    set USE_VSCMD=1\r
     set USE_WDK_HEADERS=0\r
 \r
 ) else if defined VCINSTALLDIR (\r
@@ -57,10 +57,11 @@ if defined ROS_ARCH (
     cl 2>&1 | find "x86" > NUL && set ARCH=i386\r
     cl 2>&1 | find "x64" > NUL && set ARCH=amd64\r
     cl 2>&1 | find "ARM" > NUL && set ARCH=arm\r
-    cl 2>&1 | find "14." > NUL && set BUILD_ENVIRONMENT=VS8\r
-    cl 2>&1 | find "15." > NUL && set BUILD_ENVIRONMENT=VS9\r
-    cl 2>&1 | find "16." > NUL && set BUILD_ENVIRONMENT=VS10\r
-    cl 2>&1 | find "17." > NUL && set BUILD_ENVIRONMENT=VS11\r
+    cl 2>&1 | find "14.00." > NUL && set BUILD_ENVIRONMENT=VS8\r
+    cl 2>&1 | find "15.00." > NUL && set BUILD_ENVIRONMENT=VS9\r
+    cl 2>&1 | find "16.00." > NUL && set BUILD_ENVIRONMENT=VS10\r
+    cl 2>&1 | find "17.00." > NUL && set BUILD_ENVIRONMENT=VS11\r
+    ::cl 2>&1 | find "18.00." > NUL && set BUILD_ENVIRONMENT=VS12\r
     if not defined BUILD_ENVIRONMENT (\r
         echo Error: Visual Studio version too old or version detection failed.\r
         exit /b\r
@@ -96,8 +97,8 @@ if defined ROS_ARCH (
             )\r
         )\r
     ) else (\r
-        set USE_NMAKE=1\r
-        echo This script defaults to nmake. To use Visual Studio GUI specify "VSSolution" as a parameter.\r
+        set USE_VSCMD=1\r
+        echo This script defaults to Ninja. To use Visual Studio GUI specify "VSSolution" as a parameter.\r
     )\r
 \r
 ) else if defined sdkdir (\r
@@ -109,7 +110,7 @@ if defined ROS_ARCH (
     )\r
 \r
     set BUILD_ENVIRONMENT=SDK\r
-    set USE_NMAKE=1\r
+    set USE_VSCMD=1\r
 \r
 ) else (\r
     echo Error: Unable to detect build environment. Configure script failure.\r
@@ -122,8 +123,8 @@ if not defined ARCH (
     exit /b\r
 )\r
 \r
-:: Detect nmake generator\r
-if %USE_NMAKE% == 1 (\r
+:: Detect VS command line generator\r
+if %USE_VSCMD% == 1 (\r
     if /I "%1" == "CodeBlocks" (\r
         set CMAKE_GENERATOR="CodeBlocks - NMake Makefiles"\r
     ) else if /I "%1" == "Eclipse" (\r
@@ -186,9 +187,9 @@ if "%BUILD_ENVIRONMENT%" == "MinGW" (
 \r
 cd..\r
 \r
-echo Configure script complete! Enter directories and execute appropriate build commands(ex: ninja, make, nmake, etc...).\r
+echo Configure script complete^^! Enter directories and execute appropriate build commands (ex: ninja, make, nmake, etc...).\r
 exit /b\r
 \r
 :cmake_notfound\r
- echo Unable to find cmake, if it is installed, check your PATH variable.\r
- exit /b\r
+echo Unable to find cmake, if it is installed, check your PATH variable.\r
+exit /b\r