Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2013
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. @echo off
  2.  
  3. SETLOCAL
  4. SET MOZ_MSVCVERSION=10
  5. SET MOZBUILDDIR=%~dp0
  6. SET MOZILLABUILD=%MOZBUILDDIR%
  7.  
  8. echo "Mozilla tools directory: %MOZBUILDDIR%"
  9.  
  10. REM Get MSVC paths
  11. call "%MOZBUILDDIR%guess-msvc.bat"
  12.  
  13. REM Use the "new" moztools-static
  14. set MOZ_TOOLS=%MOZBUILDDIR%moztools
  15.  
  16. rem append moztools to PATH
  17. SET PATH=%PATH%;%MOZ_TOOLS%\bin
  18.  
  19. if "%VC10DIR%"=="" (
  20. if "%VC10EXPRESSDIR%"=="" (
  21. ECHO "Microsoft Visual C++ version 10 (2010) was not found. Exiting."
  22. pause
  23. EXIT /B 1
  24. )
  25.  
  26. if "%SDKDIR%"=="" (
  27. ECHO "Microsoft Platform SDK was not found. Exiting."
  28. pause
  29. EXIT /B 1
  30. )
  31.  
  32. rem Prepend MSVC paths
  33. call "%VC10EXPRESSDIR%\Bin\vcvars32.bat" 2>nul
  34. if "%DevEnvDir%"=="" (
  35. rem Might be using a compiler that shipped with an SDK, so manually set paths
  36. SET "PATH=%VC10EXPRESSDIR%\Bin;%VC10EXPRESSDIR%\..\Common7\IDE;%PATH%"
  37. SET "INCLUDE=%VC10EXPRESSDIR%\Include;%VC10EXPRESSDIR%\Include\Sys;%INCLUDE%"
  38. SET "LIB=%VC10EXPRESSDIR%\Lib;%LIB%"
  39. )
  40.  
  41. rem Don't set SDK paths in this block, because blocks are early-evaluated.
  42.  
  43. rem Fix problem with VC++Express Edition
  44. if "%SDKVER%" GEQ "6" (
  45. rem SDK Ver.6.0 (Windows Vista SDK) and newer
  46. rem do not contain ATL header files.
  47. rem We need to use the Platform SDK's ATL header files.
  48. SET USEPSDKATL=1
  49. )
  50. rem SDK ver.6.0 does not contain OleAcc.idl
  51. rem We need to use the Platform SDK's OleAcc.idl
  52. if "%SDKVER%" == "6" (
  53. if "%SDKMINORVER%" == "0" (
  54. SET USEPSDKIDL=1
  55. )
  56. )
  57. ) else (
  58. rem Prepend MSVC paths
  59. rem The Win7 SDK (or newer) should automatically integrate itself into vcvars32.bat
  60. ECHO Using VC 2010 built-in SDK
  61. call "%VC10DIR%\Bin\vcvars32.bat"
  62. )
  63.  
  64. if "%VC10DIR%"=="" (
  65. rem Prepend SDK paths - Don't use the SDK SetEnv.cmd because it pulls in
  66. rem random VC paths which we don't want.
  67. rem Add the atlthunk compat library to the end of our LIB
  68. set "PATH=%SDKDIR%\bin;%PATH%"
  69. set "LIB=%SDKDIR%\lib;%LIB%;%MOZBUILDDIR%atlthunk_compat"
  70.  
  71. if "%USEPSDKATL%"=="1" (
  72. if "%USEPSDKIDL%"=="1" (
  73. set "INCLUDE=%SDKDIR%\include;%PSDKDIR%\include\atl;%PSDKDIR%\include;%INCLUDE%"
  74. ) else (
  75. set "INCLUDE=%SDKDIR%\include;%PSDKDIR%\include\atl;%INCLUDE%"
  76. )
  77. ) else (
  78. if "%USEPSDKIDL%"=="1" (
  79. set "INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%PSDKDIR%\include;%INCLUDE%"
  80. ) else (
  81. set "INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%INCLUDE%"
  82. )
  83. )
  84. )
  85.  
  86. cd "%USERPROFILE%"
  87.  
  88. "%MOZILLABUILD%\msys\bin\bash" --login -i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement