IF "%COPY_FILES_ONLY%" == "1" GOTO CopyFiles\r
\r
REM Clean build before we continue\r
-devenv /clean %2 tools\gyp\v8.sln\r
+REM First try to clean using the solution path (works for most VS versions)\r
+msbuild "tools\gyp\v8.sln" /t:"_tools_\_gyp_\v8:Clean" /p:Configuration=%2\r
+IF ERRORLEVEL 0 GOTO CleanDone\r
+REM If clean using solution path didn't work, try to build without the path (works for some VS versions...)\r
+msbuild "tools\gyp\v8.sln" /t:v8:Clean /p:Configuration=%2\r
IF NOT ERRORLEVEL 0 GOTO Fail\r
+:CleanDone\r
\r
REM Just to make sure that everything is cleaned up\r
rmdir /S /Q .\build\%2\r
\r
REM Build the V8 library\r
-devenv /build %2 "tools\gyp\v8.sln" /project "v8" /projectconfig %2\r
-REM devenv /build %2 tools\gyp\v8.sln\r
+REM First try to build using the solution path (works for most VS versions)\r
+msbuild "tools\gyp\v8.sln" /t:"_tools_\_gyp_\v8:Rebuild" /p:Configuration=%2\r
+IF ERRORLEVEL 0 GOTO CopyFiles\r
+REM If build using solution path didn't work, try to build without the path (works for some VS versions...)\r
+msbuild "tools\gyp\v8.sln" /t:v8:Rebuild /p:Configuration=%2\r
IF NOT ERRORLEVEL 0 GOTO Fail\r
\r
:CopyFiles\r
\r
-REM xcopy /C /F /R /Y .\build\%2\icudt.dll %LIB_DEST_DIR%\r
-REM IF NOT ERRORLEVEL 0 GOTO Fail\r
-\r
xcopy /C /F /R /Y .\build\%2\icui18n.dll %LIB_DEST_DIR%\r
IF NOT ERRORLEVEL 0 GOTO Fail\r
\r