-@REM this script builds freeswitch using VS2017
+@REM this script builds freeswitch using the latest found Microsoft Visual Studio
@REM only one platform/configuration will be built
@REM runs (probably only) from the commandline
@REM usage: Freeswitch.2017.sln [[[.*]ebug] [[.*]elease] [[.*]64] [[.*]32]]
@set procs=%NUMBER_OF_PROCESSORS%
@set /a procs -= 1
-@REM check and set VS2017 environment
+@REM check and set Visual Studio environment
CALL msbuild.cmd
if exist %msbuild% (
-%msbuild% Freeswitch.2017.sln /m:%procs% /verbosity:normal /property:Configuration=%configuration% /property:Platform=%platform% /fl /flp:logfile=vs2017%platform%%configuration%.log;verbosity=normal
+%msbuild% Freeswitch.2017.sln /m:%procs% /verbosity:normal /property:Configuration=%configuration% /property:Platform=%platform% /fl /flp:logfile=vs%platform%%configuration%.log;verbosity=normal
) ELSE (
- echo "echo ERROR: Cannot find msbuild. You need Visual Studio 2017 to compile this solution."
+ echo "echo ERROR: Cannot find msbuild. You need Microsoft Visual Studio to compile this solution."
)
@pause
-@REM check and set VS2017 environment\r
-rem VS2017U2 contains vswhere.exe\r
+@REM check and set Visual Studio environment\r
+rem There is vswhere.exe starting VS2017U2\r
if "%VSWHERE%"=="" set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"\r
\r
rem Use %ProgramFiles% in a 32-bit program prior to Windows 10)\r
\r
If Not Exist "%VSWHERE%" (\r
echo "WARNING: Can't find vswhere.exe. It is a part of VS 2017 version 15.2 or later. Trying known path..."\r
- set "InstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"\r
+ set "InstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"\r
) ELSE (\r
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (\r
set InstallDir=%%i\r
)\r
\r
echo Install dir is "%InstallDir%"\r
-if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (\r
- set msbuild="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"\r
+if exist "%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" (\r
+ set msbuild="%InstallDir%\MSBuild\Current\Bin\MSBuild.exe"\r
)\r
)\r
\r
) ELSE (\r
- echo "echo ERROR: Cannot find msbuild. You need Visual Studio 2017 to compile this solution."\r
+ echo "echo ERROR: Cannot find msbuild. You need Microsoft Visual Studio to compile this solution."\r
EXIT /B 1\r
)\r
\r
:Build\r
set SoundPrimaryName=%1\r
set SoundQuality=8000\r
-cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /p:PlatformToolset=v141 /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
+cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
set SoundQuality=16000\r
-cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /p:PlatformToolset=v141 /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
+cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
set SoundQuality=32000\r
-cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /p:PlatformToolset=v141 /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
+cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
set SoundQuality=48000\r
-cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /p:PlatformToolset=v141 /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
+cmd /C %msbuild% %solution% /p:SoundPrimaryName=%SoundPrimaryName% /p:SoundQuality=%SoundQuality% /p:Configuration=Release /p:Platform=x64 /t:Build /verbosity:normal /fl /flp:logfile=..\..\..\x64\sound_logs\sounds_%SoundPrimaryName%_%SoundQuality%.log;verbosity=normal\r
EXIT /B 0\r