Index: /branches/ant-install-branch/gsdl3/build.xml
===================================================================
--- /branches/ant-install-branch/gsdl3/build.xml	(revision 9687)
+++ /branches/ant-install-branch/gsdl3/build.xml	(revision 9688)
@@ -143,4 +143,18 @@
   </path>
 
+  <!-- do we need this? copied from gs3-setup.sh -->
+  <path id="running.path">
+    <pathelement location="${mysql.home}/bin"/>
+    <pathelement location="${basedir}/bin/script"/>
+    <pathelement location="${basedir}/bin"/>
+    <pathelement location="${basedir}/lib"/>
+    <pathelement path="${env.PATH}"/>
+  </path>
+
+  <path id="ld.library.path">
+    <pathelement path="${env.LD_LIBRARY_PATH}"/>
+    <pathelement location="${basedir}/lib"/>
+    <pathelement location="${mysql.home}/lib/mysql"/>
+  </path>
 <!-- ==================== Primary Targets ============================= -->
 
@@ -202,4 +216,15 @@
   </target>
 
+  <target name="check-cvsroot">
+    <condition property="cvsroot.notset">
+      <or>
+	<not>
+	  <isset property="env.CVSROOT"/>
+	</not>
+	<equals arg1="" arg2="${env.CVSROOT}"/>
+      </or>
+    </condition>
+    <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>
+  </target>
   <!-- this sets up some initial properties -->
   <target name="init">
@@ -266,5 +291,5 @@
 
  <!-- this is all the do-once things -->
-  <target name="prepare" depends="init,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-collections">
+  <target name="prepare" depends="init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-collections">
   </target>
   
@@ -436,5 +461,8 @@
 <!-- core targets refer to the core gsdl3 java src -->
   
-  <target name="prepare-core"/>
+  <target name="prepare-core">
+    <!-- just get rid of empty directories-->
+    <cvs command="update -P"/>
+  </target>
   <target name="configure-core"/>
   <target name="update-core" depends="init,cvsupdate-core,clean-core,compile-core"
@@ -516,5 +544,5 @@
   <target name="prepare-packages" depends="init,prepare-mgpp"/>
   
-  <target name="prepare-mgpp" depends="init" unless="mgpp.present">
+  <target name="prepare-mgpp" depends="check-cvsroot,init" unless="mgpp.present">
     <cvs command="checkout -P" package="mgpp" dest="${basedir}/packages/"/>
   </target>
@@ -689,7 +717,7 @@
   </target>
 
-  <target name="prepare-gs2build" depends="init" if="gsdl2.islocal" unless="gs2build.present">
+  <target name="prepare-gs2build" depends="check-cvsroot,init" if="gsdl2.islocal" unless="gs2build.present">
     <echo>checking out gs2build</echo>
-    <cvs command="co -P" package="gs2build"/>
+    <cvs command="checkout -P" package="gs2build"/>
 
     <!-- rename the .gs2build files -->
@@ -708,7 +736,7 @@
     
   </target>
-  <target name="prepare-gli" depends="init" if="gsdl2.islocal" unless="gli.present">
+  <target name="prepare-gli" depends="check-cvsroot,init" if="gsdl2.islocal" unless="gli.present">
     <echo>checking out gli</echo>
-    <cvs command="co -P" package="gli"/>
+    <cvs command="checkout -P" package="gli"/>
   </target>
     
@@ -840,9 +868,20 @@
     </waitfor>
   </target>
-
+  <!-- windows:
+  set CATALINA_HOME=%GSDL3HOME%\comms\jakarta\tomcat
+set CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=%GSDL3HOME% -DGSDLOS=%GSDLOS% -DPATH=%PATH%"
+    call "%GSDL3HOME%\comms\jakarta\tomcat\bin\startup.bat"
+  # launch a web browser
+    start http://localhost:8080/gsdl3
+
+-->
   <target name="shutdown" depends="init,shutdown-tomcat,shutdown-mysql" description="Shutdown the (local) Greenstone servers."/>
   
   <target name="shutdown-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
     <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.linux}" dir="${catalina.home}/bin" spawn="false"/>
+    <!-- windows:
+
+    call "%GSDL3HOME%\comms\jakarta\tomcat\bin\shutdown.bat"
+-->
   </target>
   
@@ -900,6 +939,7 @@
   </target>
 
-  <target name="get-siteuri">
-    <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:localsite)" defaultvalue="localsite"/>
+  <target name="get-siteuri" depends="get-sitename">
+    <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/>
+    <echo>${axis.sitename}, ${axis.siteuri}</echo>
   </target>
   <target name="create-deployment-files" depends="get-sitename" 
@@ -959,4 +999,9 @@
 
   <!-- mysql targets -->
+  <!-- windows:
+    cd %GSDL3HOME%\packages\mysql
+    start bin\mysqld
+    cd %GSDL3HOME%
+-->
   <target name="startup-mysql" depends="init" if="mysql.islocal"
     description="Startup only mysql">
@@ -983,9 +1028,14 @@
     description="Shutdown only mysql">
     <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
-      failonerror="true">
+      failonerror="true" os="${os.linux}">
       <arg value="--user=root"/>
       <arg value="--socket=/tmp/mysql.sock"/>
       <arg value="shutdown"/>
     </exec>
+    <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
+      failonerror="true" os="${os.windows}">
+      <arg value="--user=root"/>
+      <arg value="shutdown"/>
+    </exec>
     <echo>MYSQL database server shutdown successfully</echo>
   </target>
