Changeset 9688


Ignore:
Timestamp:
2005-04-15T09:12:53+12:00 (19 years ago)
Author:
kjdon
Message:

some changes to incorporate all remaining functionality of gs3-install.sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ant-install-branch/gsdl3/build.xml

    r9628 r9688  
    143143  </path>
    144144
     145  <!-- do we need this? copied from gs3-setup.sh -->
     146  <path id="running.path">
     147    <pathelement location="${mysql.home}/bin"/>
     148    <pathelement location="${basedir}/bin/script"/>
     149    <pathelement location="${basedir}/bin"/>
     150    <pathelement location="${basedir}/lib"/>
     151    <pathelement path="${env.PATH}"/>
     152  </path>
     153
     154  <path id="ld.library.path">
     155    <pathelement path="${env.LD_LIBRARY_PATH}"/>
     156    <pathelement location="${basedir}/lib"/>
     157    <pathelement location="${mysql.home}/lib/mysql"/>
     158  </path>
    145159<!-- ==================== Primary Targets ============================= -->
    146160
     
    202216  </target>
    203217
     218  <target name="check-cvsroot">
     219    <condition property="cvsroot.notset">
     220      <or>
     221    <not>
     222      <isset property="env.CVSROOT"/>
     223    </not>
     224    <equals arg1="" arg2="${env.CVSROOT}"/>
     225      </or>
     226    </condition>
     227    <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/>
     228  </target>
    204229  <!-- this sets up some initial properties -->
    205230  <target name="init">
     
    266291
    267292 <!-- this is all the do-once things -->
    268   <target name="prepare" depends="init,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-collections">
     293  <target name="prepare" depends="init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-collections">
    269294  </target>
    270295 
     
    436461<!-- core targets refer to the core gsdl3 java src -->
    437462 
    438   <target name="prepare-core"/>
     463  <target name="prepare-core">
     464    <!-- just get rid of empty directories-->
     465    <cvs command="update -P"/>
     466  </target>
    439467  <target name="configure-core"/>
    440468  <target name="update-core" depends="init,cvsupdate-core,clean-core,compile-core"
     
    516544  <target name="prepare-packages" depends="init,prepare-mgpp"/>
    517545 
    518   <target name="prepare-mgpp" depends="init" unless="mgpp.present">
     546  <target name="prepare-mgpp" depends="check-cvsroot,init" unless="mgpp.present">
    519547    <cvs command="checkout -P" package="mgpp" dest="${basedir}/packages/"/>
    520548  </target>
     
    689717  </target>
    690718
    691   <target name="prepare-gs2build" depends="init" if="gsdl2.islocal" unless="gs2build.present">
     719  <target name="prepare-gs2build" depends="check-cvsroot,init" if="gsdl2.islocal" unless="gs2build.present">
    692720    <echo>checking out gs2build</echo>
    693     <cvs command="co -P" package="gs2build"/>
     721    <cvs command="checkout -P" package="gs2build"/>
    694722
    695723    <!-- rename the .gs2build files -->
     
    708736   
    709737  </target>
    710   <target name="prepare-gli" depends="init" if="gsdl2.islocal" unless="gli.present">
     738  <target name="prepare-gli" depends="check-cvsroot,init" if="gsdl2.islocal" unless="gli.present">
    711739    <echo>checking out gli</echo>
    712     <cvs command="co -P" package="gli"/>
     740    <cvs command="checkout -P" package="gli"/>
    713741  </target>
    714742   
     
    840868    </waitfor>
    841869  </target>
    842 
     870  <!-- windows:
     871  set CATALINA_HOME=%GSDL3HOME%\comms\jakarta\tomcat
     872set CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=%GSDL3HOME% -DGSDLOS=%GSDLOS% -DPATH=%PATH%"
     873    call "%GSDL3HOME%\comms\jakarta\tomcat\bin\startup.bat"
     874  # launch a web browser
     875    start http://localhost:8080/gsdl3
     876
     877-->
    843878  <target name="shutdown" depends="init,shutdown-tomcat,shutdown-mysql" description="Shutdown the (local) Greenstone servers."/>
    844879 
    845880  <target name="shutdown-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
    846881    <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.linux}" dir="${catalina.home}/bin" spawn="false"/>
     882    <!-- windows:
     883
     884    call "%GSDL3HOME%\comms\jakarta\tomcat\bin\shutdown.bat"
     885-->
    847886  </target>
    848887 
     
    900939  </target>
    901940
    902   <target name="get-siteuri">
    903     <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:localsite)" defaultvalue="localsite"/>
     941  <target name="get-siteuri" depends="get-sitename">
     942    <input addproperty="axis.siteuri" message="What name do you want the service to have? (press enter for default:${axis.sitename})" defaultvalue="${axis.sitename}"/>
     943    <echo>${axis.sitename}, ${axis.siteuri}</echo>
    904944  </target>
    905945  <target name="create-deployment-files" depends="get-sitename"
     
    959999
    9601000  <!-- mysql targets -->
     1001  <!-- windows:
     1002    cd %GSDL3HOME%\packages\mysql
     1003    start bin\mysqld
     1004    cd %GSDL3HOME%
     1005-->
    9611006  <target name="startup-mysql" depends="init" if="mysql.islocal"
    9621007    description="Startup only mysql">
     
    9831028    description="Shutdown only mysql">
    9841029    <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
    985       failonerror="true">
     1030      failonerror="true" os="${os.linux}">
    9861031      <arg value="--user=root"/>
    9871032      <arg value="--socket=/tmp/mysql.sock"/>
    9881033      <arg value="shutdown"/>
    9891034    </exec>
     1035    <exec executable="${mysql.home}/bin/mysqladmin" dir="${mysql.home}"
     1036      failonerror="true" os="${os.windows}">
     1037      <arg value="--user=root"/>
     1038      <arg value="shutdown"/>
     1039    </exec>
    9901040    <echo>MYSQL database server shutdown successfully</echo>
    9911041  </target>
Note: See TracChangeset for help on using the changeset viewer.