bld.bat 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. if "%ARCH%"=="32" (
  2. set MACHINE="IX86"
  3. :: A different SDK is needed when build with VS 2017 and 2015
  4. :: http://wiki.tcl.tk/54819
  5. if "%VS_MAJOR%"=="14" (
  6. echo "Switching SDK versions"
  7. call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 10.0.15063.0
  8. )
  9. ) else (
  10. set MACHINE="AMD64"
  11. :: A different SDK is needed when build with VS 2017 and 2015
  12. :: http://wiki.tcl.tk/54819
  13. if "%VS_MAJOR%"=="14" (
  14. echo "Switching SDK versions"
  15. call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 10.0.15063.0
  16. )
  17. )
  18. pushd tcl%PKG_VERSION%\win
  19. nmake -f makefile.vc INSTALLDIR=%LIBRARY_PREFIX% MACHINE=%MACHINE% release
  20. nmake -f makefile.vc INSTALLDIR=%LIBRARY_PREFIX% MACHINE=%MACHINE% install
  21. if %ERRORLEVEL% GTR 0 exit 1
  22. popd
  23. REM Required for having tmschema.h accessible. Newer VS versions do not include this.
  24. REM If you don't have this path, you are missing the Windows 7 SDK. Please install this.
  25. REM NOTE: Later SDKs remove tmschema.h. It really is necessary to use the Win 7 SDK.
  26. set INCLUDE=%INCLUDE%;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include
  27. :: Tk build
  28. pushd tk%PKG_VERSION%\win
  29. nmake -f makefile.vc INSTALLDIR=%LIBRARY_PREFIX% MACHINE=%MACHINE% TCLDIR=..\..\tcl%PKG_VERSION% release
  30. nmake -f makefile.vc INSTALLDIR=%LIBRARY_PREFIX% MACHINE=%MACHINE% TCLDIR=..\..\tcl%PKG_VERSION% install
  31. if %ERRORLEVEL% GTR 0 exit 1
  32. :: Make sure that `wish` can be called without the version info.
  33. copy %LIBRARY_PREFIX%\bin\wish86t.exe %LIBRARY_PREFIX%\bin\wish.exe
  34. copy %LIBRARY_PREFIX%\bin\tclsh86t.exe %LIBRARY_PREFIX%\bin\tclsh.exe
  35. :: No `t` version of wish86.exe
  36. copy %LIBRARY_PREFIX%\bin\wish86t.exe %LIBRARY_PREFIX%\bin\wish86.exe
  37. copy %LIBRARY_PREFIX%\bin\tclsh86t.exe %LIBRARY_PREFIX%\bin\tclsh86.exe
  38. popd