anchor.diff:  
   rem set CURL=%RIME_ROOT%\thirdparty\bin\curl.exe
   rem set DOWNLOAD="%CURL%" --remote-name-all
  -rem set GOOGLECODE_SVN=http://rimeime.googlecode.com/svn/trunk/
   
   if %build_boost% == 1 (
     cd %BOOST_ROOT%
  
positive.code:   cd build
    cmake ..
    if %ERRORLEVEL% NEQ 0 goto ERROR
    rem devenv gtest.sln /build "Release"
    msbuild.exe gtest.sln /p:Configuration=Release
    if %ERRORLEVEL% NEQ 0 goto ERROR
    echo built. copying artifacts.
  
negative.code:   copy /Y Release\marisa-*.exe "%RIME_ROOT%"\thirdparty\bin\
    if %ERRORLEVEL% NEQ 0 goto ERROR
  
    echo building opencc.
    cd "%RIME_ROOT%"\thirdparty\src\opencc
    if not exist build mkdir build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=""
    echo patching src\libopencc.vcxproj for static linking runtime.
    sed -i "s/MultiThreadedDLL/MultiThreaded/" src\libopencc.vcxproj
    sed -i "s/MultiThreadedDLL/MultiThreaded/" src\opencc.vcxproj
    sed -i "s/MultiThreadedDLL/MultiThreaded/" src\opencc_dict.vcxproj
    msbuild.exe opencc.sln /t:libopencc;opencc;opencc_dict /p:Configuration=Release
    if %ERRORLEVEL% NEQ 0 goto ERROR
    echo built. copying artifacts.
    cd "%RIME_ROOT%"\thirdparty\include
    if not exist opencc mkdir opencc
    copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\src\*.h* opencc\
    if %ERRORLEVEL% NEQ 0 goto ERROR
    cd "%RIME_ROOT%"\thirdparty\lib
    copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc.lib .
    if %ERRORLEVEL% NEQ 0 goto ERROR
    cd "%RIME_ROOT%"\thirdparty\bin
    copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc.dll .
    copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc.exe .
    copy /Y "%RIME_ROOT%"\thirdparty\src\opencc\build\src\Release\opencc_dict.exe .
    if %ERRORLEVEL% NEQ 0 goto ERROR
  )
  
  if %build_librime% == 0 goto EXIT
  
  set CMAKE_GENERATOR="Visual Studio 12"
  
  set BUILD_DIR=%RIME_ROOT%\%build%
  