JarBundler - Advanced Example


<target name="complex" depends="jar, jni" description="Build an example application">

  <taskdef name="release/jarbundler"
             classname="net.sourceforge.jarbundler.JarBundler"/>

  <jarbundler dir="release"
              name="Hello World"
              shortname="Hello"
              signature="Helo"
              mainclass="net.sourceforge.jarbundler.example.HelloWorld"
              jar="build/Hello World.jar"
              icon="icons/Hello World.icns"
              jvmversion="1.4+"
              version="1.2"
              infostring="Hello World, copyright 2006"
              build="213"
              bundleid="net.sourceforge.jarbundler.example.HelloWorld"   
              helpbookfolder="HelpBook"
              helpbookname="Hello World Help" > 
                
    <!-- Adjust the look, feel and behavior -->
    
      <javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
      <javaproperty name="apple.awt.brushMetal" value="true"/>
      <javaproperty name="apple.awt.showGrowBox" value="false"/>

    <!-- Associate document types with this application -->
    
      <documenttype name="Hello World text document"
                    extensions="txt text" 
                    ostypes="TEXT sEXT ttro" 
                    iconFile="icons/txt.icns"
                    role="Editor"/>
                    
      <documenttype name="Hello World HTML document"
                    extensions="html htm" 
                    iconFile="icons/html.icns"
                    role="Editor"/>
                     
      <documenttype name="Hello World RTF document"
                    extensions="rtf" 
                    role="Viewer"/>

      <documenttype name="Hello World images"
                    mimetypes="image/jpeg image/png" 
                    role="Viewer"/>

      <documenttype name="Hello World Document"
                    extensions="hello"
                    iconFile="icons/Hello Document.icns"
                    bundle="true"
                    role="Editor"/>
                    
    <!-- Just proving we can include a file.  Might use it in the About box --> 
    
      <resourcefilelist dir=".." files="LICENSE.TXT"/>
 
    <!-- Copy the HelpBook JNI library into the Java directory -->
    
      <javafilelist dir="./build" files="libHelpBookJNI.jnilib"/>

    <!-- Copy the HelpBooks to the language specific folders            -->
    <!--  English will use the foldername and book name from the Bundle -->
    <!--  German or 'de' will use the custom folder name and book name  -->
      
      <helpbook locale="English">
        <fileset dir="HelpBook/English" />
        <fileset dir="HelpBook/common" />
      </helpbook>
      
      <helpbook foldername="Hilfebuch" name="Hallo Welt Hilfe" locale="German">
        <fileset dir="HelpBook/German" />
        <fileset dir="HelpBook/common" />
      </helpbook>

                     
  </jarbundler>
    
</target>