@SET VS8INSTALLDIR=C:\Program Files\Microsoft Visual Studio 8 @SET STLPORT_PATH=C:\STLPort5.2.1 @SET CETOOLS=C:\Program Files\Windows CE Tools\wce500 @SET VCINSTALLDIR=%VS8INSTALLDIR%\VC @if "%VS8INSTALLDIR%"=="" goto error_no_VSINSTALLDIR @if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR @echo Setting environment for using Microsoft Visual Studio 2008 tools for WM5. @set TARGETCPU=X86 @call :GetWindowsSdkDir @if not "%WindowsSdkDir%" == "" ( set "PATH=%WindowsSdkDir%bin;%PATH%" ) @rem @rem Root of Visual Studio IDE installed files. @rem @set DevEnvDir=%VS8INSTALLDIR%\Common7\IDE @set PATH=%VCINSTALLDIR%\CE\bin\x86_arm;%VCINSTALLDIR%\bin;%VS8INSTALLDIR%\Common7\Tools;%DevEnvDir%;%VS8INSTALLDIR%\Common\Tools;%VS8INSTALLDIR%\Common\IDE;%VS8INSTALLDIR%;%PATH% @set INCLUDE=%STLPORT_PATH%\stlport;%VCINSTALLDIR%\ce\include;%CETOOLS%\Windows Mobile 5.0 Pocket PC SDK\include\ARMV4I;%CETOOLS%\Windows Mobile 5.0 Pocket PC SDK\include;%VCINSTALLDIR%\ce\atlmfc\include @set LIB=%STLPORT_PATH%\lib\evc8-arm;%CETOOLS%\Windows Mobile 5.0 Pocket PC SDK\lib\ARMV4I;%VCINSTALLDIR%\ce\ATLMFC\LIB\ARMV4I;%VCINSTALLDIR%\ce\LIB\ARMV4I @set LIBPATH= @goto end :GetWindowsSdkDir @call :GetWindowsSdkDirHelper HKLM > nul 2>&1 @if errorlevel 1 call :GetWindowsSdkDirHelper HKCU > nul 2>&1 @if errorlevel 1 set WindowsSdkDir=%VCINSTALLDIR%\PlatformSDK\ @exit /B 0 :GetWindowsSdkDirHelper @for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /v "CurrentInstallFolder"') DO ( if "%%i"=="CurrentInstallFolder" ( SET "WindowsSdkDir=%%k" ) ) @if "%WindowsSdkDir%"=="" exit /B 1 @exit /B 0 :error_no_VSINSTALLDIR @echo ERROR: VS8INSTALLDIR variable is not set. @goto end :error_no_VCINSTALLDIR @echo ERROR: VCINSTALLDIR variable is not set. @goto end :end