Freeswitch.2017.sln.bat 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @REM this script builds freeswitch using the latest found Microsoft Visual Studio
  2. @REM only one platform/configuration will be built
  3. @REM runs (probably only) from the commandline
  4. @REM usage: Freeswitch.2017.sln [[[.*]ebug] [[.*]elease] [[.*]64] [[.*]32]]
  5. @REM e.g. Freeswitch.2017.sln Debug x64
  6. @REM Freeswitch.2017.sln x64
  7. @REM Freeswitch.2017.sln Debug
  8. @REM Freeswitch.2017.sln
  9. @setlocal
  10. @echo on
  11. @REM default build
  12. @REM change these variables if you want to build differently by default
  13. @set configuration=Release
  14. @set platform=x64
  15. @REM if commandline parameters contain "ebug" and/or "64 and/or 32"
  16. @REM set the configuration/platform to Debug and/or x64 and/or 32
  17. @if "%1"=="" (
  18. @goto :paramsset
  19. )
  20. @set params=%*
  21. @set xparams=x%params: =%
  22. @if not y%xparams:ebug=%==y%xparams% (
  23. set configuration=Debug
  24. )
  25. @if not x%xparams:64=%==x%xparams% (
  26. set platform=x64
  27. )
  28. @if not x%xparams:32=%==x%xparams% (
  29. set platform=Win32
  30. )
  31. @if not y%xparams:elease=%==y%xparams% (
  32. set configuration=Debug
  33. )
  34. :paramsset
  35. @REM use all processors minus 1 when building
  36. @REM hmm, this doesn't seem to work as I expected as all my procs are used during the build
  37. @set procs=%NUMBER_OF_PROCESSORS%
  38. @set /a procs -= 1
  39. @REM check and set Visual Studio environment
  40. CALL msbuild.cmd
  41. if exist %msbuild% (
  42. %msbuild% Freeswitch.2017.sln /m:%procs% /verbosity:normal /property:Configuration=%configuration% /property:Platform=%platform% /fl /flp:logfile=vs%platform%%configuration%.log;verbosity=normal
  43. ) ELSE (
  44. echo "echo ERROR: Cannot find msbuild. You need Microsoft Visual Studio to compile this solution."
  45. )
  46. @pause
  47. @REM ------ terminate :end with LF otherwise the label is not recognized by the command processor -----