<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project>
  <target name="preinstall"/>
  <target name="install">
    <extract source="dbcs" home="${ProductHome}" filename="en_dbcs.xml"/>
    <extract source="sasexe" home="${ProductHome}" filename="en_sasexe.xml"/>
  </target>
  <target name="postinstall">
    <runFileUtility action="delete">
      <delete>
        <file>${ProductHome}/bin/sasenv</file>
      </delete>
    </runFileUtility>
    <runFileUtility action="copy">
      <copy>
        <from>${ProductHome}/misc/deployment/bin/sasenv</from>
        <to>${ProductHome}/bin/sasenv</to>
      </copy>
    </runFileUtility>
    <runFileUtility action="delete">
      <delete>
        <file>${ProductHome}/bin/sasenv.ksh</file>
      </delete>
    </runFileUtility>
    <runFileUtility action="copy">
      <copy>
        <from>${ProductHome}/misc/deployment/bin/sasenv.ksh</from>
        <to>${ProductHome}/bin/sasenv.ksh</to>
      </copy>
    </runFileUtility>
    <runFileUtility action="delete">
      <delete>
        <file>${ProductHome}/bin/sasenv.csh</file>
      </delete>
    </runFileUtility>
    <runFileUtility action="copy">
      <copy>
        <from>${ProductHome}/misc/deployment/bin/sasenv.csh</from>
        <to>${ProductHome}/bin/sasenv.csh</to>
      </copy>
    </runFileUtility>
    <runFileUtility action="substitute">
      <fileList>
        <file>${ProductHome}/bin/sasenv.ksh</file>
        <file>${ProductHome}/bin/sasenv</file>
      </fileList>
      <substitution>
        <pattern>#C JAVA_HOME=</pattern>
        <value>JAVA_HOME=${JREHOME}</value>
      </substitution>
      <substitution>
        <pattern>#C</pattern>
        <value> </value>
      </substitution>
      <substitution>
        <pattern>@SASHome@</pattern>
        <value>${SASHome}</value>
      </substitution>
    </runFileUtility>
    <runFileUtility action="substitute">
      <fileList>
        <file>${ProductHome}/bin/sasenv.csh</file>
      </fileList>
      <substitution>
        <pattern>#C setenv JAVA_HOME</pattern>
        <value>setenv JAVA_HOME ${JREHOME}</value>
      </substitution>
      <substitution>
        <pattern>#C</pattern>
        <value> </value>
      </substitution>
      <substitution>
        <pattern>@SASHome@</pattern>
        <value>${SASHome}</value>
      </substitution>
    </runFileUtility>
    <editSASConfig>
      <optionValue action="add">
        <name>PATH</name>
        <value>!SASROOT/dbcs/sasexe</value>
      </optionValue>
      <optionValue action="add">
        <name>PATH</name>
        <value>!SASROOT/sasexe</value>
      </optionValue>
    </editSASConfig>
  </target>
</project>
