[TeamTalk 222]: [758] trunk/TeamTalk: 1) Removed faulty prebuild command from backendstub. vcproj

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Fri Sep 21 01:58:36 EDT 2007


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070921/5191901b/attachment-0001.html
-------------- next part --------------
Modified: trunk/TeamTalk/Agents/TeamTalkBackend/TeamTalkBackend.vcproj
===================================================================
--- trunk/TeamTalk/Agents/TeamTalkBackend/TeamTalkBackend.vcproj	2007-09-21 04:49:24 UTC (rev 757)
+++ trunk/TeamTalk/Agents/TeamTalkBackend/TeamTalkBackend.vcproj	2007-09-21 05:58:36 UTC (rev 758)
@@ -43,7 +43,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\..\Libraries\Galaxy\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\PrimitiveComm;..\boeingLib\boeing;..\boeingLib\coralshared;..\Pythia\PythiaDynamicClient"
+				AdditionalIncludeDirectories="..\..\Libraries\Galaxy\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\PrimitiveComm;..\..\Libraries\boeingLib\boeing;..\..\Libraries\boeingLib\coralshared;..\Pythia\PythiaDynamicClient"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -127,7 +127,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\Libraries\Galaxy\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\PrimitiveComm;..\boeingLib\boeing;..\boeingLib\coralshared;..\Pythia\PythiaDynamicClient"
+				AdditionalIncludeDirectories="..\..\Libraries\Galaxy\include;..\..\Libraries\Galaxy\contrib\MITRE\utilities\include;..\..\Libraries\PrimitiveComm;..\..\Libraries\boeingLib\boeing;..\..\Libraries\boeingLib\coralshared;..\Pythia\PythiaDynamicClient"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE"
 				RuntimeLibrary="2"
 				StructMemberAlignment="3"

Modified: trunk/TeamTalk/Agents/TeamTalkBackend/backendstub/backendstub.vcproj
===================================================================
--- trunk/TeamTalk/Agents/TeamTalkBackend/backendstub/backendstub.vcproj	2007-09-21 04:49:24 UTC (rev 757)
+++ trunk/TeamTalk/Agents/TeamTalkBackend/backendstub/backendstub.vcproj	2007-09-21 05:58:36 UTC (rev 758)
@@ -26,7 +26,7 @@
 			<Tool
 				Name="VCPreBuildEventTool"
 				Description="Setting up directories for executable..."
-				CommandLine="IF NOT EXIST ..\..\bin\nul mkdir ..\..\bin; IF NOT EXIST ..\..\bin\x86-nt\nul mkdir ..\..\bin\x86-nt"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCCustomBuildTool"

Modified: trunk/TeamTalk/Agents/TeamTalkDM/TeamTalkDM.vcproj
===================================================================
--- trunk/TeamTalk/Agents/TeamTalkDM/TeamTalkDM.vcproj	2007-09-21 04:49:24 UTC (rev 757)
+++ trunk/TeamTalk/Agents/TeamTalkDM/TeamTalkDM.vcproj	2007-09-21 05:58:36 UTC (rev 758)
@@ -69,7 +69,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="..\Libraries\RavenClaw\Lib\DebugGalaxy\RavenClaw_debug.lib user32.lib ws2_32.lib ..\Libraries\Galaxy\lib\x86-nt\libGalaxy_debug.lib"
+				AdditionalDependencies="user32.lib ws2_32.lib ..\..\Libraries\Galaxy\lib\x86-nt\libGalaxy_debug.lib"
 				OutputFile="$(OutDir)/TeamTalkDM.exe"
 				LinkIncremental="2"
 				SuppressStartupBanner="true"

Modified: trunk/TeamTalk/TeamTalkBuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkBuild.bat	2007-09-21 04:49:24 UTC (rev 757)
+++ trunk/TeamTalk/TeamTalkBuild.bat	2007-09-21 05:58:36 UTC (rev 758)
@@ -1,7 +1,8 @@
 @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
+SET NetBeansVer=5.5.1
+REM SET CYGWIN_DIR=E:\cygwin
 
 :Check to make sure the file is not running with a wrong working directory
 title TeamTalk Code Build - Win32
@@ -18,17 +19,16 @@
 IF NOT EXIST x86-nt\nul mkdir x86-nt > nul
 cd ..
 
-:Build the Visual Studio solutions
-
 ::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
+::echo Visual Studio 8.0 home path (per registry) = %VSTemp%
+del reg1.txt
+del reg2.txt
 
 ::Convert double backslashes to single backslashes
 set VSHome=
@@ -40,39 +40,23 @@
   goto VSWHILE
 :VSWEND
 set VSTemp=
-echo Visual Studio 8.0 home path (long, with spaces) = %VSHome%
+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
 
-::Compile
-cd Agents
-CALL "%VSHome%\devenv" Agents.sln /Build Release
-cd ..
-goto TOOLS
+::Check for cygwin
+echo Looking for Cygwin...
+IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGWINCHK2
+echo Found Cygwin.
+goto JAVACHK
 
-:: Do Not build TeamTalk Tools as there is nothing to build.
+:CYGWINCHK2
+IF not exist "%windir%\system32\cygwin1.dll" goto CYGERR
+echo Found Cygwin.
 
-: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 ..
-
-goto Run
-
-:VSERROR
-echo Can't find Visual Studio 8.0. Is it installed?
-
-goto Pause
-
-:Run MakeLM
-
-echo Now Executing MakeLM
-cd Tools\MakeLM
-perl makelm.pl --projectname TeamTalk
-cd ..\..
-
+: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
@@ -89,7 +73,7 @@
 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%
+::echo Java home path (per registry) = %JavaTemp%
 del reg1.txt
 del reg2.txt
 
@@ -103,120 +87,138 @@
   goto WHILE
 :WEND
 set JavaTemp=
-echo Java home path (long, with spaces) = %JavaHome%
+echo Java home path (per registy) = %JavaHome%
 
-::Convert long path (with spaces) into a short path
-::for %%x in ("%JavaHome%") do set JavaHome=%%~dpsx
-::echo Java home path (short path, no spaces) = %JavaHome%
-
 ::Test the java path to see if there really is a javac.exe
 IF NOT EXIST "%JavaHome%\bin\javac.exe" goto JAVAERROR
 
-:Java Compilation via Ant Environment Variable Setup
-
-set JAVA_HOME=%JavaHome%
-
-:Ant Compilation
-
+: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 JBUILD
+goto Compile
 :NBB
 SET NetBeansDrive=B
-goto JBUILD
+goto Compile
 :NBC
 SET NetBeansDrive=C
-goto JBUILD
+goto Compile
 :NBD
 SET NetBeansDrive=D
-goto JBUILD
+goto Compile
 :NBE
 SET NetBeansDrive=E
-goto JBUILD
+goto Compile
 :NBF
 SET NetBeansDrive=F
-goto JBUILD
+goto Compile
 :NBG
 SET NetBeansDrive=G
-goto JBUILD
+goto Compile
 :NBH
 SET NetBeansDrive=H
-goto JBUILD
+goto Compile
 :NBI
 SET NetBeansDrive=I
-goto JBUILD
+goto Compile
 :NBJ
 SET NetBeansDrive=J
-goto JBUILD
+goto Compile
 :NBK
 SET NetBeansDrive=K
-goto JBUILD
+goto Compile
 :NBL
 SET NetBeansDrive=L
-goto JBUILD
+goto Compile
 :NBM
 SET NetBeansDrive=M
-goto JBUILD
+goto Compile
 :NBN
 SET NetBeansDrive=N
-goto JBUILD
+goto Compile
 :NBO
 SET NetBeansDrive=O
-goto JBUILD
+goto Compile
 :NBP
 SET NetBeansDrive=P
-goto JBUILD
+goto Compile
 :NBQ
 SET NetBeansDrive=Q
-goto JBUILD
+goto Compile
 :NBR
 SET NetBeansDrive=R
-goto JBUILD
+goto Compile
 :NBS
 SET NetBeansDrive=S
-goto JBUILD
+goto Compile
 :NBT
 SET NetBeansDrive=T
-goto JBUILD
+goto Compile
 :NBU
 SET NetBeansDrive=U
-goto JBUILD
+goto Compile
 :NBV
 SET NetBeansDrive=V
-goto JBUILD
+goto Compile
 :NBW
 SET NetBeansDrive=W
-goto JBUILD
+goto Compile
 :NBX
 SET NetBeansDrive=X
-goto JBUILD
+goto Compile
 :NBY
 SET NetBeansDrive=Y
-goto JBUILD
+goto Compile
 :NBZ
 SET NetBeansDrive=Z
-goto JBUILD
 
+:Compile
+cd Agents
+CALL "%VSHome%\devenv" Agents.sln /Build Release
+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 Release
+::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 

Modified: trunk/TeamTalk/TeamTalkDebugBuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkDebugBuild.bat	2007-09-21 04:49:24 UTC (rev 757)
+++ trunk/TeamTalk/TeamTalkDebugBuild.bat	2007-09-21 05:58:36 UTC (rev 758)
@@ -1,156 +1,224 @@
 @echo off
 
-:: If Netbeans and/or Java is updated change the NetBeans and/or version to the current version of NetBeans as the default folder name will likely change.
-set NetBeansVer=5.5.1
-set JDKVer=1.6.0_02
+:: 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
 
 :Check to make sure the file is not running with a wrong working directory
-title TeamTalk Code Debug Build - Win32
-IF NOT EXIST TeamTalkDebugBuild.bat goto Error
+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 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 ..
 
-:Build the Visual Studio solutions
+::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
 
-set VSDrive=Non-Existent
+::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%
 
-IF EXIST "A:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=A
-IF EXIST "B:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=B
-IF EXIST "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=C
-IF EXIST "D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=D
-IF EXIST "E:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=E
-IF EXIST "F:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=F
-IF EXIST "G:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=G
-IF EXIST "H:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=H
-IF EXIST "I:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=I
-IF EXIST "J:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=J
-IF EXIST "K:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=K
-IF EXIST "L:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=L
-IF EXIST "M:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=M
-IF EXIST "N:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=N
-IF EXIST "O:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=O
-IF EXIST "P:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=P
-IF EXIST "Q:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=Q
-IF EXIST "R:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=R
-IF EXIST "S:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=S
-IF EXIST "T:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=T
-IF EXIST "U:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=U
-IF EXIST "V:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=V
-IF EXIST "W:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=W
-IF EXIST "X:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=X
-IF EXIST "Y:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=Y
-IF EXIST "Z:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com" set VSDrive=Z
+::Test the devenv path to see if there really is a devenv.exe
+if not exist "%VSHome%\devenv.exe" goto VSERROR
 
-IF NOT VSDrive == "Non-Existent" echo Building TeamTalk Agents -- This may take 3-9 Minutes, Please Wait...
-IF NOT VSDrive == "Non-Existent" cd Agents
-IF NOT VSDrive == "Non-Existent" "%VSDrive%:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" Agents.sln /Build Debug
-IF NOT VSDrive == "Non-Existent" cd ..
+::Check for cygwin
+echo Looking for Cygwin...
+IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGWINCHK2
+echo Found Cygwin.
+goto JAVACHK
 
-:: Do Not build TeamTalk Tools as there is nothing to build.
+:CYGWINCHK2
+IF not exist "%windir%\system32\cygwin1.dll" goto CYGERR
+echo Found Cygwin.
 
-::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 ..
+: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
 
-IF VSDrive == "Non-Existent" echo TeamTalk Tools and Agents can not be built because the location of Microsoft Visual Studio 2005 can not be determined
+::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
 
-:Run MakeLM
+::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%
 
-echo Now Executing MakeLM
-cd Tools\MakeLM
-perl makelm.pl
-cd ..\..
+::Test the java path to see if there really is a javac.exe
+IF NOT EXIST "%JavaHome%\bin\javac.exe" goto JAVAERROR
 
-:Java Compilation via Ant Environment Variable Setup
+: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
 
-set JavaDrive=Non-Existent
+: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
 
-IF EXIST "A:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=A
-IF EXIST "B:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=B
-IF EXIST "C:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=C
-IF EXIST "D:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=D
-IF EXIST "E:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=E
-IF EXIST "F:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=F
-IF EXIST "G:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=G
-IF EXIST "H:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=H
-IF EXIST "I:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=I
-IF EXIST "J:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=J
-IF EXIST "K:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=K
-IF EXIST "L:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=L
-IF EXIST "M:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=M
-IF EXIST "N:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=N
-IF EXIST "O:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=O
-IF EXIST "P:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=P
-IF EXIST "Q:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=Q
-IF EXIST "R:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=R
-IF EXIST "S:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=S
-IF EXIST "T:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=T
-IF EXIST "U:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=U
-IF EXIST "V:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=V
-IF EXIST "W:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=W
-IF EXIST "X:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=X
-IF EXIST "Y:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=Y
-IF EXIST "Z:\Program Files\Java\jdk%JDKVer%\bin\javac.exe" set JavaDrive=Z
+:Compile
+cd Agents
+CALL "%VSHome%\devenv" Agents.sln /Build Debug
+cd ..
 
-IF NOT %JavaDrive% == "Non-Existent" set JAVA_HOME=%JavaDrive%:\Program Files\Java\jdk%JDKVer%
+:: 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 ..
 
-:Clean Up Before Doing the Ant Compilation which Ends the Script
-:: ---------------------
-:: Remove the environment variables
+:Java Compilation via Ant Environment Variable Setup
 
-set VSDrive=
-set JavaDrive=
-set JDKVer=
+set JAVA_HOME=%JavaHome%
 
 :Ant Compilation
+:JBUILD
+CALL "%NetBeansDrive%:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
 
-set NetBeansDrive=Non-Existent
+:Run MakeLM
+echo Now Executing MakeLM
+cd Tools\MakeLM
+perl makelm.pl --projectname TeamTalk
+cd ..\..
+goto Pause
 
-IF EXIST "A:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "A:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "B:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "B:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "C:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "C:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "D:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "D:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "E:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "E:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "F:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "F:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "G:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "G:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "H:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "H:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "I:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "I:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "J:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "J:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "K:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "K:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "L:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "L:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "M:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "M:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "N:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "N:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "O:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "O:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "P:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "P:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "Q:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "Q:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "R:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "R:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "S:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "S:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "T:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "T:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "U:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "U:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "V:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "V:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "W:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "W:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "X:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "X:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "Y:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "Y:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
-IF EXIST "Z:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" "Z:\Program Files\netbeans-%NetBeansVer%\ide7\ant\bin\ant.bat" -buildfile Agents\PenDecoder\build.xml
+:VSERROR
+echo Can't find Visual Studio 8.0. Is it installed?
+goto Pause
 
-echo The Pen Decoder cannot be built because the location of NetBeans %NetBeansVer% can not be determined.
+:CYGERROR
+echo Can't find cygwin. Please set the environment variable CYGWIN_DIR to your root cygwin installation.
+goto Pause
 
-:: Don't display the message that the script was run in the wrong working directory as that was not the case
+: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 
@@ -160,4 +228,5 @@
 echo.  
 
 :Pause the script execution so the DOS windows does not disappear too soon.
-pause
\ No newline at end of file
+pause
+exit
\ No newline at end of file

Modified: trunk/TeamTalk/TeamTalkRebuild.bat
===================================================================
--- trunk/TeamTalk/TeamTalkRebuild.bat	2007-09-21 04:49:24 UTC (rev 757)
+++ trunk/TeamTalk/TeamTalkRebuild.bat	2007-09-21 05:58:36 UTC (rev 758)
@@ -1,11 +1,12 @@
 @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
+SET NetBeansVer=5.5.1
+REM SET CYGWIN_DIR=E:\cygwin
 
 :Check to make sure the file is not running with a wrong working directory
 title TeamTalk Code Build - Win32
-IF NOT EXIST TeamTalkRebuild.bat goto Error
+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
@@ -18,17 +19,16 @@
 IF NOT EXIST x86-nt\nul mkdir x86-nt > nul
 cd ..
 
-:Build the Visual Studio solutions
-
 ::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
+::echo Visual Studio 8.0 home path (per registry) = %VSTemp%
+del reg1.txt
+del reg2.txt
 
 ::Convert double backslashes to single backslashes
 set VSHome=
@@ -40,39 +40,23 @@
   goto VSWHILE
 :VSWEND
 set VSTemp=
-echo Visual Studio 8.0 home path (long, with spaces) = %VSHome%
+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
 
-::Compile
-cd Agents
-CALL "%VSHome%\devenv" Agents.sln /Rebuild Release
-cd ..
-goto TOOLS
+::Check for cygwin
+echo Looking for Cygwin...
+IF not exist "%CYGWIN_DIR%\bin\cygwin1.dll" goto CYGWINCHK2
+echo Found Cygwin.
+goto JAVACHK
 
-:: Do Not build TeamTalk Tools as there is nothing to build.
+:CYGWINCHK2
+IF not exist "%windir%\system32\cygwin1.dll" goto CYGERR
+echo Found Cygwin.
 
-: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 ..
-
-goto Run
-
-:VSERROR
-echo Can't find Visual Studio 8.0. Is it installed?
-
-goto Pause
-
-:Run MakeLM
-
-echo Now Executing MakeLM
-cd Tools\MakeLM
-perl makelm.pl --projectname TeamTalk
-cd ..\..
-
+: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
@@ -89,7 +73,7 @@
 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%
+::echo Java home path (per registry) = %JavaTemp%
 del reg1.txt
 del reg2.txt
 
@@ -103,120 +87,143 @@
   goto WHILE
 :WEND
 set JavaTemp=
-echo Java home path (long, with spaces) = %JavaHome%
+echo Java home path (per registy) = %JavaHome%
 
-::Convert long path (with spaces) into a short path
-::for %%x in ("%JavaHome%") do set JavaHome=%%~dpsx
-::echo Java home path (short path, no spaces) = %JavaHome%
-
 ::Test the java path to see if there really is a javac.exe
 IF NOT EXIST "%JavaHome%\bin\javac.exe" goto JAVAERROR
 
-:Java Compilation via Ant Environment Variable Setup
-
-set JAVA_HOME=%JavaHome%
-
-:Ant Compilation
-
+: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 JBUILD
+goto Compile
 :NBB
 SET NetBeansDrive=B
-goto JBUILD
+goto Compile
 :NBC
 SET NetBeansDrive=C
-goto JBUILD
+goto Compile
 :NBD
 SET NetBeansDrive=D
-goto JBUILD
+goto Compile
 :NBE
 SET NetBeansDrive=E
-goto JBUILD
+goto Compile
 :NBF
 SET NetBeansDrive=F
-goto JBUILD
+goto Compile
 :NBG
 SET NetBeansDrive=G
-goto JBUILD
+goto Compile
 :NBH
 SET NetBeansDrive=H
-goto JBUILD
+goto Compile
 :NBI
 SET NetBeansDrive=I
-goto JBUILD
+goto Compile
 :NBJ
 SET NetBeansDrive=J
-goto JBUILD
+goto Compile
 :NBK
 SET NetBeansDrive=K
-goto JBUILD
+goto Compile
 :NBL
 SET NetBeansDrive=L
-goto JBUILD
+goto Compile
 :NBM
 SET NetBeansDrive=M
-goto JBUILD
+goto Compile
 :NBN
 SET NetBeansDrive=N
-goto JBUILD
+goto Compile
 :NBO
 SET NetBeansDrive=O
-goto JBUILD
+goto Compile
 :NBP
 SET NetBeansDrive=P
-goto JBUILD
+goto Compile
 :NBQ
 SET NetBeansDrive=Q
-goto JBUILD
+goto Compile
 :NBR
 SET NetBeansDrive=R
-goto JBUILD
+goto Compile
 :NBS
 SET NetBeansDrive=S
-goto JBUILD
+goto Compile
 :NBT
 SET NetBeansDrive=T
-goto JBUILD
+goto Compile
 :NBU
 SET NetBeansDrive=U
-goto JBUILD
+goto Compile
 :NBV
 SET NetBeansDrive=V
-goto JBUILD
+goto Compile
 :NBW
 SET NetBeansDrive=W
-goto JBUILD
+goto Compile
 :NBX
 SET NetBeansDrive=X
-goto JBUILD
+goto Compile
 :NBY
 SET NetBeansDrive=Y
-goto JBUILD
+goto Compile
 :NBZ
 SET NetBeansDrive=Z
-goto JBUILD
 
+: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 clean default
+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 
@@ -227,4 +234,4 @@
 
 :Pause the script execution so the DOS windows does not disappear too soon.
 pause
-exit
+exit
\ No newline at end of file


More information about the TeamTalk-developers mailing list