Changeset 10195


Ignore:
Timestamp:
2005-06-30T09:48:37+12:00 (19 years ago)
Author:
kjdon
Message:

tried to separate out all cvs commands, so you can do all the cvs stuff outside of ant, and have ant do no cvs at all

Location:
trunk/gsdl3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/README.txt

    r10137 r10195  
    57571. Install for the first time:
    5858cvs co gsdl3
     59cd gsdl3
    5960ant prepare install
    6061
     
    6263[online]
    6364cvs co gsdl3
     65cd gsdl3
    6466ant prepare
    6567[offline]
    6668ant install
    6769
    68 3. Updating your Greenstone installation from cvs:
     703. Install for the first time, cvs done outside of Ant (if you have problems running cvs commands from Ant):
     71cvs co [-P] gsdl3
     72cd gsdl3
     73cvs update -P (run this if you haven't done the checkout with the -P option)
     74cd packages
     75cvs co mgpp
     76cd ..
     77[if you want greenstone 2 building:
     78cvs co -P gli
     79cvs co -P gs2build
     80]
     81[if you are on windows
     82cvs co winbin
     83]
     84ant -Dnocvs.mode=yes prepare install (prepare needs to be online, install can be done offline)
     85
     864. Updating your Greenstone installation from cvs (and reconfigure/recompile):
     87cd gsdl3
    6988ant update
    7089
    71 4. Updating your Greenstone installation, offline:
     905. Updating your Greenstone installation, offline:
     91cd gsdl3
    7292[online]
    7393ant cvsupdate
    7494[offline]
    75 ant -Doffline.mode=yes update
     95ant -Dnocvs.mode=yes update
     96
     976. Updating your Greenstone installation, cvs outside of Ant:
     98cd gsdl3
     99cvs update -l
     100cvs update -dP bin comms docs lib resources src winutil packages
     101cd web (or the path-to-tomcat/webapps/gsdl3 if have installed greenstone as a webapp in Tomcat, see Using External Tomcat section)
     102cvs update -dP
     103cd gsdl3
     104[ if you have greenstone 2 building:
     105cvs update -dP gli
     106cvs checkout -P gs2build
     107Note that the gs2build one uses checkout not update.
     108]
     109ant -Dnocvs.mode=yes update
    76110
    77111The main targets for installation/update are:
     
    197231Once all these changes have been made, you will need to restart the Tomcat server for them to take effect.
    198232
    199 
    200 
    201 
     233Notes for Mac OS
     234------------------
     235
     236Set JAVA_HOME to be /Library/Java/Home
  • trunk/gsdl3/build.xml

    r10189 r10195  
    8181  <property name="catalina.home" value="${basedir}/comms/jakarta/tomcat"/>
    8282
    83   <property name="os.linux" value="Linux"/> <!-- mac??-->
     83  <property name="os.linux" value="Linux"/>
    8484  <property name="os.mac" value="Mac OS X"/>
    8585  <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP,Windows NT,Windows ME"/> <!-- check this!!!-->
    8686
    87   <condition property="current.os.islinux">
     87  <!-- this is true for linux and macs -->
     88  <condition property="current.os.isunix">
    8889    <os family="unix"/>
    8990  </condition>
     
    190191  <target name="test-setup">
    191192    <echo>ant java version=${ant.java.version}</echo>
    192     <echo>is linux : ${current.os.islinux}</echo>
     193    <echo>is linux : ${current.os.isunixx}</echo>
    193194    <echo>is windows : ${current.os.iswindows}</echo>
    194195  </target>
     
    196197
    197198  <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? -->
     199
     200  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-web"
     201    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this."/>
    198202
    199203  <target name="install" depends="init,configure,configure-c++,compile,deploy-localsite"
    200204    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/>
    201 
    202   <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-mysql,prepare-web"
    203     description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this."/>
    204205 
    205206  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web"
     
    409410  </target>
    410411
    411   <target name="cvsupdate-web" unless="offline.mode">
     412  <target name="cvsupdate-web" unless="nocvs.mode">
    412413    <cvs command="update -dP" dest="${web.home}"/>
    413414  </target>
     
    489490    <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
    490491    <exec executable="${catalina.home}/bin/startup.sh" os="${os.linux},${os.mac}" dir="${catalina.home}/bin" spawn="false">
    491       <!--<env key="GSDLOS" value="linux"/>-->
     492      <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
    492493      <env key="GSDL3HOME" value="${basedir}"/>
    493494      <env key="PATH" path="${tomcat.path}"/>
     
    496497      <env key="CLASSPATH" path="${tomcat.classpath}"/>
    497498      <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}:${mysql.home}/lib/mysql"/>
    498       <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${mysql.home}/lib/mysql"/>
     499      <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${mysql.home}/lib/mysql"/> <!-- for mac-->
    499500    </exec>
    500501    <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true">
     
    554555      <and>
    555556    <isset property="mysql.islocal"/>
    556     <isset property="current.os.islinux"/>
     557    <isset property="current.os.isunixx"/>
    557558      </and>
    558559    </condition>
     
    792793<!-- core targets refer to the core gsdl3 java src -->
    793794 
    794   <target name="prepare-core">
     795  <target name="prepare-core" unless="nocvs.mode">
    795796    <!-- just get rid of empty directories-->
    796797    <cvs command="update -P"/>
     
    802803    description="Update only the Greenstone core" />
    803804 
    804   <target name="cvsupdate-core" unless="offline.mode">
     805  <target name="cvsupdate-core" unless="nocvs.mode">
    805806    <cvs command="update -l"/>
    806807    <cvs command="update -dP bin comms dist-resources docs lib resources src winutil"/>
     
    871872    <!-- need to download precompiled binaries for mg and mgpp -->
    872873  </target>
     874
    873875  <target name="prepare-mgpp" depends="check-cvsroot,init" unless="mgpp.present">
    874876    <cvs command="checkout -P" package="mgpp" dest="${basedir}/packages/"/>
     
    878880    description="Update only the packages"/>
    879881
    880   <target name="cvsupdate-packages" unless="offline.mode">
     882  <target name="cvsupdate-packages" unless="nocvs.mode">
    881883    <cvs command="update -dP" dest="${packages.home}"/>
    882884  </target>
     
    10051007
    10061008  <target name="update-gs2building" if="gsdl2.islocal"
    1007     depends="init,cvsupdate-gs2building,configure-gs2building,clean-gs2building,compile-gs2building"
     1009    depends="init,cvsupdate-gs2building,rename-gs2build-files,configure-gs2building,clean-gs2building,compile-gs2building"
    10081010    description="Update only the Greenstone 2 building components"/>
    10091011
    1010   <target name="cvsupdate-gs2building" if="gsdl2.islocal" depends="init" unless="offline.mode">
     1012  <target name="cvsupdate-gs2building" if="gsdl2.islocal" depends="init" unless="nocvs.mode">
    10111013    <cvs command="update -dP" dest="${gli.home}"/>
    10121014    <!-- Note: can't do a -d update here cos it will get all of gsdl
    10131015     also, an update doesn't get new files, so we do a checkout instead. -->
    10141016    <cvs command="co gs2build" dest="${basedir}"/>
    1015     <!-- rename the .gs2build files - we may have gotten changes to the main
    1016     gsdl versions - make sure they are set back to the gs2build versions -->
    1017     <antcall target="rename-gs2build-files"/>
    10181017  </target>
    10191018
    10201019  <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="gsdl2.islocal">
    1021     <echo>checking out gs2 building stuff</echo>
    1022   </target>
    1023 
    1024   <target name="prepare-gs2build" depends="check-cvsroot,init" if="gsdl2.islocal" unless="gs2build.present">
     1020  </target>
     1021
     1022  <target name="checkout-gs2build" depends="check-cvsroot,init" unless="nocvs.mode">
    10251023    <echo>checking out gs2build</echo>
    10261024    <cvs command="checkout -P" package="gs2build"/>
    1027 
     1025  </target>
     1026
     1027  <target name="prepare-gs2build" depends="init" if="gsdl2.islocal" unless="gs2build.present">
     1028    <antcall target="checkout-gs2build"/>
    10281029    <!-- rename the .gs2build files -->
    10291030    <antcall target="rename-gs2build-files"/>
     
    10321033  </target>
    10331034
    1034   <target name="get-windows-binaries" depends="init" if="current.os.iswindows">
    1035      <cvs command="checkout -P" package="winbin"/>
    1036      <copy todir="${basedir}/bin">
    1037        <fileset dir="${basedir}/winbin/bin" includes="mg*.exe"/>
    1038      </copy>
     1035  <target name="checkout-winbin" depends="init" if="current.os.iswindows"
     1036    unless="nocvs.mode">
     1037    <cvs command="checkout -P" package="winbin"/>
     1038  </target>
     1039 
     1040  <target name="get-windows-binaries" depends="init,checkout-winbin" if="current.os.iswindows">
     1041    <copy todir="${basedir}/bin">
     1042      <fileset dir="${basedir}/winbin/bin" includes="mg*.exe"/>
     1043    </copy>
    10391044     <move todir="${gs2build.home}/bin/windows" failonerror="false">
    10401045      <fileset dir="${basedir}/winbin/bin"/>
     
    10421047    <delete dir="${basedir}/winbin"/>
    10431048   </target>
     1049 
    10441050 <target name="unzip-windows-packages" depends="init"> 
    10451051    <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip"
     
    10511057   </target>
    10521058
    1053   <target name="rename-gs2build-files" depends="rename-gs2build-files-linux,rename-gs2build-files-windows"/>
     1059  <target name="rename-gs2build-files" depends="rename-gs2build-files-unix,rename-gs2build-files-windows"/>
    10541060
    10551061  <target name="rename-gs2build-files-windows" if="current.os.iswindows">
     
    10631069    </copy> 
    10641070  </target>
    1065   <target name="rename-gs2build-files-linux" if="current.os.islinux">
     1071  <target name="rename-gs2build-files-unix" if="current.os.isunix">
    10661072    <property name="gs2build-extra.home" value="${gs2build.home}/gs2build-extra"/>
    10671073    <copy file="${gs2build-extra.home}/configure" tofile="${gs2build.home}/configure"/>   
     
    10821088  <target name="configure-gs2building" depends="init" if="gsdl2.islocal"
    10831089    description="Configure only the Greenstone 2 building components">
    1084     <exec executable="${gs2build.home}/configure" os="${os.linux}"
     1090    <exec executable="${gs2build.home}/configure" os="${os.linux},${os.mac}"
    10851091      dir="${gs2build.home}">
    10861092      <arg value="--prefix=${gs2build.home}"/>
     
    10931099    <property name="gli.home" value="${basedir}/gli"/>
    10941100    <!-- linux -->
    1095     <exec executable="clean.sh" os="${os.linux}" dir="${gli.home}"
     1101    <exec executable="clean.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
    10961102      resolveExecutable="true"/>
    10971103    <!-- windows -->
     
    11001106    <!-- gs2build -->
    11011107    <!--linux:  -->
    1102     <exec executable="make" os="${os.linux}" dir="${gs2build.home}">
     1108    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
    11031109      <arg value="clean"/>
    11041110    </exec>
     
    11221128    <property name="gli.home" value="${basedir}/gli"/>
    11231129    <!-- linux -->
    1124     <exec executable="makegli.sh" os="${os.linux}" dir="${gli.home}"
     1130    <exec executable="makegli.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
    11251131      resolveExecutable="true"/>
    11261132    <!-- windows -->
     
    11291135    <!-- gs2build -->
    11301136    <!--linux: make, make install -->
    1131     <exec executable="make" os="${os.linux}" dir="${gs2build.home}">
    1132     </exec>
    1133     <exec executable="make" os="${os.linux}" dir="${gs2build.home}">
     1137    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
     1138    </exec>
     1139    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
    11341140      <arg value="install"/>
    11351141    </exec>
     
    11491155
    11501156  <target name="gli-local" depends="init" if="gsdl2.islocal">
    1151     <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux}" dir="${basedir}/gli" spawn="true">
     1157    <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux},${os.mac}" dir="${basedir}/gli" spawn="true">
    11521158      <env key="gsdl3path" path="${basedir}"/>
    11531159      <env key="gsdlpath" path="${basedir}/gs2build"/>
     
    11621168 
    11631169  <target name="gli-external" depends="init" unless="gsdl2.islocal">
    1164     <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux}" dir="${gsdl2.installed.path}/gli" spawn="true">
     1170    <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux},${os.mac}" dir="${gsdl2.installed.path}/gli" spawn="true">
    11651171      <env key="gsdl3path" path="${basedir}"/>
    11661172      <env key="gsdlpath"  path="${gsdl2.installed.path}"/>
     
    11711177    </exec>
    11721178    <echo>Running GLI from Ant means that you don't get to see any of the terminal output. If you have problems with GLI and want to see the output, please run the following in a terminal/command prompt:
    1173                     (Linux              / Windows)
     1179                    (Linux/Mac OS X     / Windows)
    11741180in gsdl3 directory: source gs3-setup.sh / gs3-setup
    11751181in gsdl directory:  source setup.bash   / setup
Note: See TracChangeset for help on using the changeset viewer.