@echo Setting environment variables for MinGw build of Inkscape set INKSCAPEROOT=%~dp0.. IF "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=%INKSCAPEROOT%\devlibs IF "%MINGW_PATH%"=="" set MINGW_PATH=%INKSCAPEROOT%\mingw set MINGW_BIN=%MINGW_PATH%\bin set PKG_CONFIG_PATH=%DEVLIBS_PATH%\lib\pkgconfig set PATH=%MINGW_BIN%;%PATH%;%DEVLIBS_PATH%\bin;%DEVLIBS_PATH%\python :; Get the output from the "DATE /T" FOR /F "tokens=1 delims= " %%i in ('DATE /T') do SET Today=%%i FOR /F "tokens=1-3 delims=//" %%A IN ( "%Today%" ) DO ( SET DayMonth=%%A SET MonthDay=%%B SET Year=%%C SET the_day=%%A-%%B-%%C ) :; Get the output from the "TIME /T" FOR /F "tokens=2 delims= " %%i in ('TIME /T') do SET Now=%%i FOR /F "tokens=1-2 delims=/:" %%A IN ( "%Now%" ) DO ( SET Hour=%%A SET Minute=%%B SET the_time=%%A%%B ) :; Get Value from 'VER' command output FOR /F "tokens=*" %%i in ('VER') do SET WinVer=%%i FOR /F "tokens=1-3 delims=] " %%A IN ("%WinVer%" ) DO ( SET Var1=%%A ) :; Get version number only so drop off Microsoft Windows Version FOR /F "tokens=1-9 delims=n" %%A IN ("%Var1%" ) DO ( SET WinVer=%%C echo %WinVer% ) :; Separate version numbers FOR /F "tokens=1-8 delims=.-" %%A IN ("%WinVer%" ) DO ( SET WinMajor=%%A SET WinMinor=%%B SET WinBuild=%%C ) :; Fix the extra space left over in the Major FOR /F "tokens=1 delims= " %%A IN ("%WinMajor%" ) DO ( SET WinMajor=%%A ) :; Display Results ECHO WinVer = %WinVer% ECHO WinMajor = %WinMajor% ECHO WinMinor = %WinMinor% ECHO WinBuild = %WinBuild% set LOG_FILE="%INKSCAPEROOT%\build_%the_day%_%the_time%.rebuild.log" cd %INKSCAPEROOT%\devlibs bzr update cd %INKSCAPEROOT%\inkscape bzr update cd %INKSCAPEROOT%\inkscape echo "=================================" >> %LOG_FILE% 2>&1 echo "======== Windows version ========" >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 ver >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 echo "=============== bzr info ========" >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 bzr info -v >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 echo "======== btool build log ========" >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 g++.exe buildtool.cpp -o btool.exe >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 echo "===== inkscape build log ========" >> %LOG_FILE% 2>&1 echo "=================================" >> %LOG_FILE% 2>&1 btool.exe clean btool.exe >> %LOG_FILE% 2>&1