[TeamTalk 224]: [760] trunk/TeamTalk: 1) Consolidated build code into TeamTalkBuild.bat.

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Fri Sep 21 19:23:15 EDT 2007


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070921/070d2238/attachment.html
-------------- next part --------------
Modified: trunk/TeamTalk/TeamTalkBuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkBuild.bat	2007-09-21 17:29:39 UTC (rev 759)
+++ trunk/TeamTalk/TeamTalkBuild.bat	2007-09-21 23:23:15 UTC (rev 760)
@@ -1,8 +1,11 @@
 @echo off
 
+IF "%BUILD_TYPE%"=="" SET BUILD_TYPE=Build
+IF "%BUILD_CONF%"=="" SET BUILD_CONF=Release
+
 :: If Netbeans is updated change the NetBeans version to the current version of NetBeans as the default folder name will likely change.
 SET NetBeansVer=5.5.1
-REM SET CYGWIN_DIR=E:\cygwin
+IF "%CYGWIN_DIR%"=="" SET CYGWIN_DIR=C:\cygwin
 
 :Check to make sure the file is not running with a wrong working directory
 title TeamTalk Code Build - Win32
@@ -47,14 +50,9 @@
 
 ::Check for cygwin
 echo Looking for Cygwin...
-IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGWINCHK2
+IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGERR
 echo Found Cygwin.
-goto JAVACHK
 
-:CYGWINCHK2
-IF not exist "%windir%\system32\cygwin1.dll" goto CYGERR
-echo Found Cygwin.
-
 :JAVACHK
 echo Looking for java JDK...
 ::Find the current (most recent) Java version
@@ -78,23 +76,22 @@
 del reg2.txt
 
 ::Convert double backslashes to single backslashes
-set JavaHome=
+set JAVA_HOME=
 :WHILE
   if "%JavaTemp%"=="" goto WEND
-  if not "%JavaHome%"=="" set JavaHome=%JavaHome%\
-  for /f "delims=\" %%x in ("%JavaTemp%") do set JavaHome=%JavaHome%%%x
+  if not "%JAVA_HOME%"=="" set JAVA_HOME=%JAVA_HOME%\
+  for /f "delims=\" %%x in ("%JavaTemp%") do set JAVA_HOME=%JAVA_HOME%%%x
   for /f "tokens=1,* delims=\" %%x in ("%JavaTemp%") do set JavaTemp=%%y
   goto WHILE
 :WEND
 set JavaTemp=
-echo Java home path (per registy) = %JavaHome%
+echo Java home path (per registy) = %JAVA_HOME%
 
 ::Test the java path to see if there really is a javac.exe
-IF NOT EXIST "%JavaHome%\bin\javac.exe" goto JAVAERROR
+IF NOT EXIST "%JAVA_HOME%\bin\javac.exe" goto JAVAERROR
 
 :ANTCHK
 FOR %%d in (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, A, B) DO IF EXIST "%%d:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" goto NB%%d
-
 goto NETBEANSERROR
 
 :NBA
@@ -177,23 +174,21 @@
 
 :Compile
 cd Agents
-CALL "%VSHome%\devenv" Agents.sln /Build Release
+CALL "%VSHome%\devenv" Agents.sln /%BUILD_TYPE% %BUILD_CONF%
 cd ..
+pause
 
 :: Do Not build TeamTalk Tools as there is nothing to build.
 :TOOLS build
-::IF NOT VSDrive == "Non-Existent" echo Building TeamTalk Tools -- This may take 1-3 Minutes, Please Wait..
-::IF NOT VSDrive == "Non-Existent" cd Tools
-::IF NOT VSDrive == "Non-Existent" "%VSDrive%:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" Tools.sln /Build Release
-::IF NOT VSDrive == "Non-Existent" cd ..
+REM echo Building TeamTalk Tools -- This may take 1-3 Minutes, Please Wait..
+REM cd Tools
+REM CALL "%VSHome%\devenv" Tools.sln /%BUILD_TYPE% %BUILD_CONF%
+REM cd ..
 
-:Java Compilation via Ant Environment Variable Setup
-
-set JAVA_HOME=%JavaHome%
-
 :Ant Compilation
 :JBUILD
 CALL "%NetBeansDrive%:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
+pause
 
 :Run MakeLM
 echo Now Executing MakeLM
@@ -228,5 +223,7 @@
 echo.  
 
 :Pause the script execution so the DOS windows does not disappear too soon.
+SET BUILD_TYPE=
+SET BUILD_CONF=
+SET NetBeansVer=
 pause
-exit
\ No newline at end of file

Modified: trunk/TeamTalk/TeamTalkDebugBuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkDebugBuild.bat	2007-09-21 17:29:39 UTC (rev 759)
+++ trunk/TeamTalk/TeamTalkDebugBuild.bat	2007-09-21 23:23:15 UTC (rev 760)
@@ -1,232 +1,5 @@
 @echo off
 
-:: If Netbeans is updated change the NetBeans version to the current version of NetBeans as the default folder name will likely change.
-SET NetBeansVer=5.5.1
-REM SET CYGWIN_DIR=E:\cygwin
+SET BUILD_CONF=Debug
 
-:Check to make sure the file is not running with a wrong working directory
-title TeamTalk Code Build - Win32
-IF NOT EXIST TeamTalkBuild.bat goto Error
-IF NOT EXIST Agents\Agents.sln goto Error
-IF NOT EXIST Tools\Tools.sln goto Error
-IF NOT EXIST Tools\MakeLM\makelm.pl goto Error
-
-:Make directories for logs, temp files, and builds if they do not exist already
-echo Creating Working Directories
-IF NOT EXIST logs\nul mkdir logs > nul
-IF NOT EXIST bin\nul mkdir bin > nul
-cd bin
-IF NOT EXIST x86-nt\nul mkdir x86-nt > nul
-cd ..
-
-::Get the home directory of Visual Studio
-echo Looking for visual studio 8.0 (2005)...
-start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0
-type reg1.txt | %windir%\system32\find.exe """InstallDir""=" > reg2.txt
-if errorlevel 1 goto VSERROR
-for /f "tokens=2 delims==" %%x in (reg2.txt) do set VSTemp=%%~x
-if errorlevel 1 goto VSERROR
-::echo Visual Studio 8.0 home path (per registry) = %VSTemp%
-del reg1.txt
-del reg2.txt
-
-::Convert double backslashes to single backslashes
-set VSHome=
-:VSWHILE
-  if "%VSTemp%"=="" goto VSWEND
-  if not "%VSHome%"=="" set VSHome=%VSHome%\
-  for /f "delims=\" %%x in ("%VSTemp%") do set VSHome=%VSHome%%%x
-  for /f "tokens=1,* delims=\" %%x in ("%VSTemp%") do set VSTemp=%%y
-  goto VSWHILE
-:VSWEND
-set VSTemp=
-echo Visual Studio 8.0 home path (per registry) = %VSHome%
-
-::Test the devenv path to see if there really is a devenv.exe
-if not exist "%VSHome%\devenv.exe" goto VSERROR
-
-::Check for cygwin
-echo Looking for Cygwin...
-IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGWINCHK2
-echo Found Cygwin.
-goto JAVACHK
-
-:CYGWINCHK2
-IF not exist "%windir%\system32\cygwin1.dll" goto CYGERR
-echo Found Cygwin.
-
-:JAVACHK
-echo Looking for java JDK...
-::Find the current (most recent) Java version
-start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
-type reg1.txt | %windir%\system32\find.exe "CurrentVersion" > reg2.txt
-if errorlevel 1 goto JAVAERROR
-for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
-if errorlevel 1 goto JAVAERROR
-echo Java Version = %JavaTemp%
-del reg1.txt
-del reg2.txt
-
-::Get the home directory of the most recent Java
-start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\%JavaTemp%"
-type reg1.txt | %windir%\system32\find.exe "JavaHome" > reg2.txt
-if errorlevel 1 goto JAVAERROR
-for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
-if errorlevel 1 goto JAVAERROR
-::echo Java home path (per registry) = %JavaTemp%
-del reg1.txt
-del reg2.txt
-
-::Convert double backslashes to single backslashes
-set JavaHome=
-:WHILE
-  if "%JavaTemp%"=="" goto WEND
-  if not "%JavaHome%"=="" set JavaHome=%JavaHome%\
-  for /f "delims=\" %%x in ("%JavaTemp%") do set JavaHome=%JavaHome%%%x
-  for /f "tokens=1,* delims=\" %%x in ("%JavaTemp%") do set JavaTemp=%%y
-  goto WHILE
-:WEND
-set JavaTemp=
-echo Java home path (per registy) = %JavaHome%
-
-::Test the java path to see if there really is a javac.exe
-IF NOT EXIST "%JavaHome%\bin\javac.exe" goto JAVAERROR
-
-:ANTCHK
-FOR %%d in (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, A, B) DO IF EXIST "%%d:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" goto NB%%d
-
-goto NETBEANSERROR
-
-:NBA
-SET NetBeansDrive=A
-goto Compile
-:NBB
-SET NetBeansDrive=B
-goto Compile
-:NBC
-SET NetBeansDrive=C
-goto Compile
-:NBD
-SET NetBeansDrive=D
-goto Compile
-:NBE
-SET NetBeansDrive=E
-goto Compile
-:NBF
-SET NetBeansDrive=F
-goto Compile
-:NBG
-SET NetBeansDrive=G
-goto Compile
-:NBH
-SET NetBeansDrive=H
-goto Compile
-:NBI
-SET NetBeansDrive=I
-goto Compile
-:NBJ
-SET NetBeansDrive=J
-goto Compile
-:NBK
-SET NetBeansDrive=K
-goto Compile
-:NBL
-SET NetBeansDrive=L
-goto Compile
-:NBM
-SET NetBeansDrive=M
-goto Compile
-:NBN
-SET NetBeansDrive=N
-goto Compile
-:NBO
-SET NetBeansDrive=O
-goto Compile
-:NBP
-SET NetBeansDrive=P
-goto Compile
-:NBQ
-SET NetBeansDrive=Q
-goto Compile
-:NBR
-SET NetBeansDrive=R
-goto Compile
-:NBS
-SET NetBeansDrive=S
-goto Compile
-:NBT
-SET NetBeansDrive=T
-goto Compile
-:NBU
-SET NetBeansDrive=U
-goto Compile
-:NBV
-SET NetBeansDrive=V
-goto Compile
-:NBW
-SET NetBeansDrive=W
-goto Compile
-:NBX
-SET NetBeansDrive=X
-goto Compile
-:NBY
-SET NetBeansDrive=Y
-goto Compile
-:NBZ
-SET NetBeansDrive=Z
-
-:Compile
-cd Agents
-CALL "%VSHome%\devenv" Agents.sln /Build Debug
-cd ..
-
-:: Do Not build TeamTalk Tools as there is nothing to build.
-:TOOLS build
-::IF NOT VSDrive == "Non-Existent" echo Building TeamTalk Tools -- This may take 1-3 Minutes, Please Wait..
-::IF NOT VSDrive == "Non-Existent" cd Tools
-::IF NOT VSDrive == "Non-Existent" "%VSDrive%:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" Tools.sln /Build Debug
-::IF NOT VSDrive == "Non-Existent" cd ..
-
-:Java Compilation via Ant Environment Variable Setup
-
-set JAVA_HOME=%JavaHome%
-
-:Ant Compilation
-:JBUILD
-CALL "%NetBeansDrive%:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-
-:Run MakeLM
-echo Now Executing MakeLM
-cd Tools\MakeLM
-perl makelm.pl --projectname TeamTalk
-cd ..\..
-goto Pause
-
-:VSERROR
-echo Can't find Visual Studio 8.0. Is it installed?
-goto Pause
-
-:CYGERROR
-echo Can't find cygwin. Please set the environment variable CYGWIN_DIR to your root cygwin installation.
-goto Pause
-
-:JAVAERROR
-echo Can't find Java Development Kit. Is it installed?
-goto Pause
-
-:NETBEANSERROR
-echo The Pen Decoder can not be built because the location of NetBeans %NetBeansVer% can not be determined.
-goto Pause
-
-:Error message that says that the script was run outside of the TeamTalk directory.
-echo. 
-echo This script must be run with the current directory being that of the script.  
-echo (For example, click directly on the script in Windows Explorer instead of 
-echo entering the full path to the script at the command prompt.)
-echo.  
-echo If this is not the case, please contact bfrisch at gmail.com.
-echo.  
-
-:Pause the script execution so the DOS windows does not disappear too soon.
-pause
-exit
\ No newline at end of file
+TeamTalkBuild.bat

Added: trunk/TeamTalk/TeamTalkDebugRebuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkDebugRebuild.bat	                        (rev 0)
+++ trunk/TeamTalk/TeamTalkDebugRebuild.bat	2007-09-21 23:23:15 UTC (rev 760)
@@ -0,0 +1,6 @@
+ at echo off
+
+SET BUILD_TYPE=Rebuild
+SET BUILD_CONF=Debug
+
+TeamTalkBuild.bat

Modified: trunk/TeamTalk/TeamTalkRebuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkRebuild.bat	2007-09-21 17:29:39 UTC (rev 759)
+++ trunk/TeamTalk/TeamTalkRebuild.bat	2007-09-21 23:23:15 UTC (rev 760)
@@ -1,237 +1,5 @@
 @echo off
 
-:: If Netbeans is updated change the NetBeans version to the current version of NetBeans as the default folder name will likely change.
-SET NetBeansVer=5.5.1
-REM SET CYGWIN_DIR=E:\cygwin
+SET BUILD_TYPE=Rebuild
 
-:Check to make sure the file is not running with a wrong working directory
-title TeamTalk Code Build - Win32
-IF NOT EXIST TeamTalkBuild.bat goto Error
-IF NOT EXIST Agents\Agents.sln goto Error
-IF NOT EXIST Tools\Tools.sln goto Error
-IF NOT EXIST Tools\MakeLM\makelm.pl goto Error
-
-:Make directories for logs, temp files, and builds if they do not exist already
-echo Creating Working Directories
-IF NOT EXIST logs\nul mkdir logs > nul
-IF NOT EXIST bin\nul mkdir bin > nul
-cd bin
-IF NOT EXIST x86-nt\nul mkdir x86-nt > nul
-cd ..
-
-::Get the home directory of Visual Studio
-echo Looking for visual studio 8.0 (2005)...
-start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0
-type reg1.txt | %windir%\system32\find.exe """InstallDir""=" > reg2.txt
-if errorlevel 1 goto VSERROR
-for /f "tokens=2 delims==" %%x in (reg2.txt) do set VSTemp=%%~x
-if errorlevel 1 goto VSERROR
-::echo Visual Studio 8.0 home path (per registry) = %VSTemp%
-del reg1.txt
-del reg2.txt
-
-::Convert double backslashes to single backslashes
-set VSHome=
-:VSWHILE
-  if "%VSTemp%"=="" goto VSWEND
-  if not "%VSHome%"=="" set VSHome=%VSHome%\
-  for /f "delims=\" %%x in ("%VSTemp%") do set VSHome=%VSHome%%%x
-  for /f "tokens=1,* delims=\" %%x in ("%VSTemp%") do set VSTemp=%%y
-  goto VSWHILE
-:VSWEND
-set VSTemp=
-echo Visual Studio 8.0 home path (per registry) = %VSHome%
-
-::Test the devenv path to see if there really is a devenv.exe
-if not exist "%VSHome%\devenv.exe" goto VSERROR
-
-::Check for cygwin
-echo Looking for Cygwin...
-IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGWINCHK2
-echo Found Cygwin.
-goto JAVACHK
-
-:CYGWINCHK2
-IF not exist "%windir%\system32\cygwin1.dll" goto CYGERR
-echo Found Cygwin.
-
-:JAVACHK
-echo Looking for java JDK...
-::Find the current (most recent) Java version
-start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
-type reg1.txt | %windir%\system32\find.exe "CurrentVersion" > reg2.txt
-if errorlevel 1 goto JAVAERROR
-for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
-if errorlevel 1 goto JAVAERROR
-echo Java Version = %JavaTemp%
-del reg1.txt
-del reg2.txt
-
-::Get the home directory of the most recent Java
-start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\%JavaTemp%"
-type reg1.txt | %windir%\system32\find.exe "JavaHome" > reg2.txt
-if errorlevel 1 goto JAVAERROR
-for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
-if errorlevel 1 goto JAVAERROR
-::echo Java home path (per registry) = %JavaTemp%
-del reg1.txt
-del reg2.txt
-
-::Convert double backslashes to single backslashes
-set JavaHome=
-:WHILE
-  if "%JavaTemp%"=="" goto WEND
-  if not "%JavaHome%"=="" set JavaHome=%JavaHome%\
-  for /f "delims=\" %%x in ("%JavaTemp%") do set JavaHome=%JavaHome%%%x
-  for /f "tokens=1,* delims=\" %%x in ("%JavaTemp%") do set JavaTemp=%%y
-  goto WHILE
-:WEND
-set JavaTemp=
-echo Java home path (per registy) = %JavaHome%
-
-::Test the java path to see if there really is a javac.exe
-IF NOT EXIST "%JavaHome%\bin\javac.exe" goto JAVAERROR
-
-:ANTCHK
-echo Looking for NetBeans version %NetBeansVer%...
-FOR %%d in (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, A, B) DO IF EXIST "%%d:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" goto NB%%d
-
-goto NETBEANSERROR
-
-:NBA
-SET NetBeansDrive=A
-goto Compile
-:NBB
-SET NetBeansDrive=B
-goto Compile
-:NBC
-SET NetBeansDrive=C
-goto Compile
-:NBD
-SET NetBeansDrive=D
-goto Compile
-:NBE
-SET NetBeansDrive=E
-goto Compile
-:NBF
-SET NetBeansDrive=F
-goto Compile
-:NBG
-SET NetBeansDrive=G
-goto Compile
-:NBH
-SET NetBeansDrive=H
-goto Compile
-:NBI
-SET NetBeansDrive=I
-goto Compile
-:NBJ
-SET NetBeansDrive=J
-goto Compile
-:NBK
-SET NetBeansDrive=K
-goto Compile
-:NBL
-SET NetBeansDrive=L
-goto Compile
-:NBM
-SET NetBeansDrive=M
-goto Compile
-:NBN
-SET NetBeansDrive=N
-goto Compile
-:NBO
-SET NetBeansDrive=O
-goto Compile
-:NBP
-SET NetBeansDrive=P
-goto Compile
-:NBQ
-SET NetBeansDrive=Q
-goto Compile
-:NBR
-SET NetBeansDrive=R
-goto Compile
-:NBS
-SET NetBeansDrive=S
-goto Compile
-:NBT
-SET NetBeansDrive=T
-goto Compile
-:NBU
-SET NetBeansDrive=U
-goto Compile
-:NBV
-SET NetBeansDrive=V
-goto Compile
-:NBW
-SET NetBeansDrive=W
-goto Compile
-:NBX
-SET NetBeansDrive=X
-goto Compile
-:NBY
-SET NetBeansDrive=Y
-goto Compile
-:NBZ
-SET NetBeansDrive=Z
-
-:Compile
-echo Compiling Agents...
-cd Agents
-CALL "%VSHome%\devenv" Agents.sln /Rebuild Release
-cd ..
-pause
-
-:: Do Not build TeamTalk Tools as there is nothing to build.
-:TOOLS build
-::IF NOT VSDrive == "Non-Existent" echo Building TeamTalk Tools -- This may take 1-3 Minutes, Please Wait..
-::IF NOT VSDrive == "Non-Existent" cd Tools
-::IF NOT VSDrive == "Non-Existent" "%VSDrive%:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" Tools.sln /Rebuild Release
-::IF NOT VSDrive == "Non-Existent" cd ..
-::pause
-
-:Java Compilation via Ant Environment Variable Setup
-
-set JAVA_HOME=%JavaHome%
-
-:Ant Compilation
-:JBUILD
-CALL "%NetBeansDrive%:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-pause
-
-:Run MakeLM
-echo Now Executing MakeLM
-cd Tools\MakeLM
-perl makelm.pl --projectname TeamTalk
-cd ..\..
-goto Pause
-
-:VSERROR
-echo Can't find Visual Studio 8.0. Is it installed?
-goto Pause
-
-:CYGERROR
-echo Can't find cygwin. Please set the environment variable CYGWIN_DIR to your root cygwin installation.
-goto Pause
-
-:JAVAERROR
-echo Can't find Java Development Kit. Is it installed?
-goto Pause
-
-:NETBEANSERROR
-echo The Pen Decoder can not be built because the location of NetBeans %NetBeansVer% can not be determined.
-goto Pause
-
-:Error message that says that the script was run outside of the TeamTalk directory.
-echo. 
-echo This script must be run with the current directory being that of the script.  
-echo (For example, click directly on the script in Windows Explorer instead of 
-echo entering the full path to the script at the command prompt.)
-echo.  
-echo If this is not the case, please contact bfrisch at gmail.com.
-echo.  
-
-:Pause the script execution so the DOS windows does not disappear too soon.
-pause
-exit
\ No newline at end of file
+TeamTalkBuild.bat


More information about the TeamTalk-developers mailing list