Orangevolt ANT Tasks » Tasks » os.properties
List of created propertiesexecute

2.9.2.  Example

<?xml version="1.0"?>  
 
<project basedir="." name="layxx" default="sfx">
  <taskdef classpath="orangevolt-ant-tasks-1.3.2.jar" resource="com/orangevolt/tools/ant/taskdefs.properties"/>
    
  <target name="prepare">
    <os.properties/>
  </target>
    
  <target name="setup" depends="prepare,windows,unix,os2,netware,dos,mac,win9x,macosx">
      
  </target>
 
    <!-- do windows specific stuff -->
  <target name="windows" if="os.family.windows">
    ...
  </target>
 
    <!-- do unix specific stuff -->
  <target name="unix" if="os.family.unix">
    ...
  </target>
 
      <!-- do os2 specific stuff -->
  <target name="os2" if="os.family.os2">
    ...
  </target>
 
      <!-- do netware specific stuff -->
  <target name="netware" if="os.family.netware">
    ...
  </target>
 
      <!-- do dos specific stuff -->
  <target name="dos" if="os.family.dos">
    ...
  </target>
    
        <!-- do mac specific stuff -->
  <target name="mac" if="os.family.mac">
    ...
  </target>
 
      <!-- do win9x specific stuff -->
  <target name="win9x" if="os.family.win9x">
    ...
  </target>
 
      <!-- do macosx specific stuff -->
  <target name="macosx" if="os.family.macosx">
    ...
  </target>
 
</project>