main.bat 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. REM call vcvarsall
  2. call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
  3. REM add MSBuild to env variable
  4. set MSBuild="c:/Program Files (x86)/MSBuild/14.0/bin/msbuild.exe"
  5. REM add vcvars32.bat to PATH
  6. @set PATH=c:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin;%PATH%
  7. REM create build, package && install directory
  8. if not exist build mkdir build
  9. if not exist package mkdir package
  10. if not exist install mkdir install
  11. rem ===========================================================================
  12. rem Layer 0 is Boost.
  13. rem Absolutely everything depends on Boost, whether they use it or not,
  14. rem because of EthDependencies.cmake in webthree-helper, which does an
  15. rem unconditional find_module() for boost, irrespective of what is being built.
  16. rem ===========================================================================
  17. rem Layer 1 are the external libraries. Do any of these themselves depend on
  18. rem Boost? I think that the majority or indeed all of them *might not*, and
  19. rem that if we fixed up the CMake code so that the unconditional Boost
  20. rem dependency could be skipped then we could improve the build ordering here.
  21. call :setup x64 Debug & call build_cryptopp.bat & call bundle_cryptopp.bat || goto :error
  22. call :setup x64 Release & call build_cryptopp.bat & call bundle_cryptopp.bat || goto :error
  23. call install_cryptopp.bat || goto :error
  24. call :setup x64 Debug & call build_curl.bat & call bundle_curl.bat || goto :error
  25. call :setup x64 Release & call build_curl.bat & call bundle_curl.bat || goto :error
  26. call install_curl.bat || goto :error
  27. rem Is GMP not used for Windows?
  28. call :setup x64 Debug & call build_jsoncpp.bat & call bundle_jsoncpp.bat || goto :error
  29. call :setup x64 Release & call build_jsoncpp.bat & call bundle_jsoncpp.bat || goto :error
  30. call install_jsoncpp.bat || goto :error
  31. call :setup x64 Debug & call build_leveldb.bat & call bundle_leveldb.bat || goto :error
  32. call :setup x64 Release & call build_leveldb.bat & call bundle_leveldb.bat || goto :error
  33. call install_leveldb.bat || goto :error
  34. rem libscrypt needs building for crosseth. Why don't we need it here?
  35. call :setup x64 Debug & call build_microhttpd.bat & call bundle_microhttpd.bat || goto :error
  36. call :setup x64 Release & call build_microhttpd.bat & call bundle_microhttpd.bat || goto :error
  37. call install_microhttpd.bat || goto :error
  38. rem We don't build libminiupnpc for crosseth, so I'll have to guess on its layering for now.
  39. call :setup x64 Debug & call build_miniupnpc.bat & call bundle_miniupnpc.bat || goto :error
  40. call :setup x64 Release & call build_miniupnpc.bat & call bundle_miniupnpc.bat || goto :error
  41. call install_miniupnpc.bat || goto :error
  42. rem ===========================================================================
  43. rem Layer 2 comprises secp256k1 and libjson-rpc-cpp (which are external
  44. rem libraries which depend on Layer 1 external libraries)
  45. call :setup x64 Debug & call build_jsonrpccpp.bat & call bundle_jsonrpccpp.bat || goto :error
  46. call :setup x64 Release & call build_jsonrpccpp.bat & call bundle_jsonrpccpp.bat || goto :error
  47. call install_jsonrpccpp.bat || goto :error
  48. rem secp256k1 needs building for crosseth. Why don't we need it here?
  49. goto :EOF
  50. :setup
  51. set PLATFORM=%1
  52. set CONFIGURATION=%2
  53. goto :EOF
  54. :error
  55. echo Failed with error %errorlevel%
  56. exit /b %errorlevel%
  57. :EOF