<?xml version="1.0" encoding="utf-8" ?>
<project name="rk3-zipinstall" default="zip-install" basedir=".">

  <!-- zipinstall.xml uses the targets in postinstall.xml (shared with rk3 installer .xml files)
       to finalize the installation of GS3 from a zip binary. 
       When zipinstall.xml is run, zipinstall.xml and postinstall.xml will have been copied
       into the toplevel (GS3) folder that is extracted from the zip.

       Need to run as ant -f zipinstall.xml from the extracted zip of the GS3 binary,
       after sourcing SETUP.sh in ext-cli, to finish installing GS3 from zip.
  -->

  <!-- ============ classpath =================== -->
  <path id="project.classpath">
    <fileset dir="lib/java">
      <include name="**/*.jar"/>
    </fileset>
  </path>
  
  <!-- ============ self defined tasks =================== -->
  <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
  <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
  <!--
  <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask" classpathref="project.classpath"/>
  <taskdef name="foreach" classname="net.sf.antcontrib.logic.ForEach" classpathref="project.classpath"/>
  <taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" classpathref="project.classpath"/>
  -->
  
  <property name="installDir" location="${basedir}"/>
 
  <import file="postinstall.xml"/>

  <!-- 
       Note that comments containing just GLI START, GLI END, FLAX START, FLAX END,
       if windows|linux|mac and /if are bookends for release-kit "macros" (originally
       used in the installer/build.xml and antinstall-config.xml).
       These rk macros control if embedded lines are stay in this file or get removed.
       
       shared/core/ant-scripts/create-installer.xml and shared.xml (for zip installation)
       are the files instructing the release-kit to process (retain/remove) these
       and other macros like start/end cdrom and start/end amp.
       We're not handling the start/end amp macros here. But installer/build.xml and
       installer/antinstall-config.xml do process start/end amp macros. -->

  <target name="zip-install">
    <antcall target="postinstall-core"/>
    <!-- NO FLAX START -->
    <antcall target="postinstall-imagemagick"/>
    <!-- if windows|mac -->
    <antcall target="postinstall-ghostscript"/>
    <!-- /if -->
    <antcall target="postinstall-tomcat"/>
    <!-- NO FLAX END -->

    <!-- FLAX START -->
    <antcall target="postinstall-imagemagick"/>
    <antcall target="postinstall-tomcat"/>
    <!-- FLAX END -->
  </target>
  
</project>
