]>
Commit | Line | Data |
---|---|---|
7490fba7 | 1 | @REM this script builds freeswitch using the latest found Microsoft Visual Studio |
671da287 AV |
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 | ||
10 | @setlocal | |
11 | @echo on | |
12 | ||
13 | @REM default build | |
14 | @REM change these variables if you want to build differently by default | |
15 | @set configuration=Release | |
5409a478 | 16 | @set platform=x64 |
671da287 AV |
17 | |
18 | ||
19 | @REM if commandline parameters contain "ebug" and/or "64 and/or 32" | |
20 | @REM set the configuration/platform to Debug and/or x64 and/or 32 | |
21 | @if "%1"=="" ( | |
22 | @goto :paramsset | |
23 | ) | |
24 | ||
25 | @set params=%* | |
26 | @set xparams=x%params: =% | |
27 | @if not y%xparams:ebug=%==y%xparams% ( | |
28 | set configuration=Debug | |
29 | ) | |
30 | ||
31 | @if not x%xparams:64=%==x%xparams% ( | |
32 | set platform=x64 | |
33 | ) | |
34 | ||
35 | @if not x%xparams:32=%==x%xparams% ( | |
36 | set platform=Win32 | |
37 | ) | |
38 | ||
39 | @if not y%xparams:elease=%==y%xparams% ( | |
40 | set configuration=Debug | |
41 | ) | |
42 | ||
43 | :paramsset | |
44 | ||
45 | @REM use all processors minus 1 when building | |
46 | @REM hmm, this doesn't seem to work as I expected as all my procs are used during the build | |
47 | @set procs=%NUMBER_OF_PROCESSORS% | |
48 | @set /a procs -= 1 | |
49 | ||
7490fba7 | 50 | @REM check and set Visual Studio environment |
5409a478 | 51 | CALL msbuild.cmd |
671da287 AV |
52 | |
53 | if exist %msbuild% ( | |
7490fba7 | 54 | %msbuild% Freeswitch.2017.sln /m:%procs% /verbosity:normal /property:Configuration=%configuration% /property:Platform=%platform% /fl /flp:logfile=vs%platform%%configuration%.log;verbosity=normal |
671da287 | 55 | ) ELSE ( |
7490fba7 | 56 | echo "echo ERROR: Cannot find msbuild. You need Microsoft Visual Studio to compile this solution." |
671da287 AV |
57 | ) |
58 | @pause | |
59 | ||
60 | @REM ------ terminate :end with LF otherwise the label is not recognized by the command processor ----- | |
61 | ||
62 | ||
63 |