]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6102 --resolve
authorJeff Lenk <jeff@jefflenk.com>
Fri, 17 Jan 2014 22:17:57 +0000 (16:17 -0600)
committerJeff Lenk <jeff@jefflenk.com>
Fri, 17 Jan 2014 22:17:57 +0000 (16:17 -0600)
Freeswitch.2012.sln.bat [new file with mode: 0644]

diff --git a/Freeswitch.2012.sln.bat b/Freeswitch.2012.sln.bat
new file mode 100644 (file)
index 0000000..342dbad
--- /dev/null
@@ -0,0 +1,88 @@
+@REM this script builds freeswitch using VS2012\r
+@REM only one platform/configuration will be built\r
+@REM runs (probably only) from the commandline\r
+@REM usage: Freeswitch.2012.sln  [[[.*]ebug] [[.*]elease] [[.*]64] [[.*]32]]\r
+@REM e.g. Freeswitch.2012.sln Debug x64\r
+@REM      Freeswitch.2012.sln x64\r
+@REM     Freeswitch.2012.sln Debug\r
+@REM     Freeswitch.2012.sln\r
+\r
+@setlocal\r
+@echo on\r
+\r
+@REM default build\r
+@REM change these variables if you want to build differently by default\r
+@set configuration=Release\r
+@set platform=Win32\r
+\r
+\r
+@REM if commandline parameters contain "ebug" and/or "64 and/or 32"\r
+@REM set the configuration/platform to Debug and/or x64 and/or 32\r
+@if "%1"=="" (\r
+       @goto :paramsset\r
+)\r
+\r
+@set params=%*\r
+@set xparams=x%params: =%\r
+@if not y%xparams:ebug=%==y%xparams% (\r
+       set configuration=Debug\r
+)\r
+\r
+@if not x%xparams:64=%==x%xparams% (\r
+       set platform=x64\r
+)\r
+\r
+@if not x%xparams:32=%==x%xparams% (\r
+       set platform=Win32\r
+)\r
+\r
+@if not y%xparams:elease=%==y%xparams% (\r
+       set configuration=Debug\r
+)\r
+\r
+:paramsset\r
+\r
+@REM use all processors minus 1 when building\r
+@REM hmm, this doesn't seem to work as I expected as all my procs are used during the build\r
+@set procs=%NUMBER_OF_PROCESSORS%\r
+@set /a procs -= 1\r
+\r
+@REM check and set VS2012 environment\r
+@REM vcvars32.bat calls exit and will also exit whilie running this bat file ...\r
+@REM so you have to run it again if the VS2012 env is not yet set\r
+@if "%VS110COMNTOOLS%"=="" (\r
+       goto :error_no_VS110COMNTOOLSDIR\r
+)\r
+\r
+@if "%VSINSTALLDIR%"=="" (\r
+       goto :setvcvars\r
+)\r
+\r
+:build\r
+\r
+msbuild Freeswitch.2012.sln /m:%procs% /verbosity:normal /property:Configuration=%configuration% /property:Platform=%platform% /fl /flp:logfile=vs2012%platform%%configuration%.log;verbosity=normal\r
+@goto :end\r
+\r
+@REM -----------------------------------------------------------------------\r
+:setvcvars\r
+       @endlocal\r
+       @echo Now setting Visual Studio 2012 Environment\r
+       @call "%VS110COMNTOOLS%vsvars32"\r
+       @REM in order to prevent running vsvars32 multiple times and at the same time not\r
+       @REM cluttering up the environment variables proc/configuration/platform\r
+       @REM it is necessary to start the script again\r
+       @echo Run the script %0 again (and/or open a command prompt)\r
+       @goto :end\r
+\r
+:error_no_VS110COMNTOOLSDIR\r
+       @echo ERROR: Cannot determine the location of the VS2012 Common Tools folder.\r
+       @echo ERROR: Note this script will not work in a git bash environment\r
+       @goto :end\r
+\r
+:end\r
+@pause\r
+\r
+@REM ------ terminate :end with LF otherwise the label is not recognized by the command processor -----\r
+\r
+\r
+\r