2 :: This script is called from the Makefile
command line within Visual Studio using the following parameters
:
9 :: Call build.bat build ntoskrnl
10 :: Call build.bat clean win32k
15 if "%1"=="" goto :err_params
16 if "%2"=="" goto :err_params
19 :: Get the RosBE
path...
::
21 :: Set the
command we
'll use to check if RosBE exists
22 set _IS_ROSBE_INSTALLED_COMMAND="reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\ReactOS Build Environment for Windows" /v UninstallString"
24 :: Check the key actually exists !!!!FIXME: Why is this returning 'The system cannot
find the
path specified.
'!!!!
25 %_IS_ROSBE_INSTALLED_COMMAND%
26 IF NOT errorlevel 0 goto :err_no_rosbe
28 :: This is a bit hackish. What we do is look for REG_SZ which is the second token on the second line and dump it into i
29 :: We then assign all remaining text to the next variable in the sequence, which is j. This leaves us with the path
30 for /F "tokens=2,* skip=1 delims=\ " %%i in ('%_IS_ROSBE_INSTALLED_COMMAND%') do (
31 set _ROSBE_UNINSTALL_PATH_=%%j
35 :: Now strip the file name from the end of the path and we should have our RosBE install directory
38 for %%i in ("%_ROSBE_UNINSTALL_PATH_%") do set _ROSBE_PATH_DIR=%%~di
39 for %%i in ("%_ROSBE_UNINSTALL_PATH_%") do set "_ROSBE_PATH_=%%~pi"
40 set "_ROSBE_FULL_PATH_=%_ROSBE_PATH_DIR%%_ROSBE_PATH_%"
41 ::echo RosBE insall path = %_ROSBE_FULL_PATH_%
43 :: Set the path which contains our build tools
44 set _ROSBE_BIN_PATH=%_ROSBE_FULL_PATH_%i386\bin
46 :: Add the path to the search path
47 path=%path%;%_ROSBE_BIN_PATH%
51 if exist "%_ROSBE_BIN_PATH%\mingw32-make.exe" (
52 set _MAKE_COMMAND=mingw32-make.exe
54 if exist "%_ROSBE_BIN_PATH%\make.exe" (
55 set _MAKE_COMMAND=make.exe
57 if %_MAKE_COMMAND% == "" (
61 :: This file is located in the source root
62 set _ROS_SOURCE_ROOT=%~dp0
64 :: Change the current dir to the source root
67 :: Run the requested build task
71 if "%1" == "rebuild" (
83 call "%_MAKE_COMMAND%" -j 1 %2%_clean
85 if "%1" == "rebuild" (
95 call "%_MAKE_COMMAND%" -j 1 %2%
101 echo Cannot find a make executable
106 echo You need to have RosBE installed to use this configuration
112 echo Invalid parameters required, Check your command line.