msvc-build-launcher.cmd 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. @echo off
  2. REM Use old Windows SDK 6.1 so created .exe will be compatible with
  3. REM old Windows versions.
  4. REM Windows SDK 6.1 may be downloaded at:
  5. REM http://www.microsoft.com/en-us/download/details.aspx?id=11310
  6. set PATH_OLD=%PATH%
  7. REM The SDK creates a false install of Visual Studio at one of these locations
  8. set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;%PATH%
  9. set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;%PATH%
  10. REM set up the environment to compile to x86
  11. call VCVARS32
  12. if "%ERRORLEVEL%"=="0" (
  13. cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:CONSOLE /out:setuptools/cli-32.exe
  14. cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:WINDOWS /out:setuptools/gui-32.exe
  15. ) else (
  16. echo Windows SDK 6.1 not found to build Windows 32-bit version
  17. )
  18. REM buildout (and possibly other implementations) currently depend on
  19. REM the 32-bit launcher scripts without the -32 in the filename, so copy them
  20. REM there for now.
  21. copy setuptools/cli-32.exe setuptools/cli.exe
  22. copy setuptools/gui-32.exe setuptools/gui.exe
  23. REM now for 64-bit
  24. REM Use the x86_amd64 profile, which is the 32-bit cross compiler for amd64
  25. call VCVARSx86_amd64
  26. if "%ERRORLEVEL%"=="0" (
  27. cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe
  28. cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe
  29. ) else (
  30. echo Windows SDK 6.1 not found to build Windows 64-bit version
  31. )
  32. set PATH=%PATH_OLD%