15111cb72SAndrew Rist<!--*********************************************************** 25111cb72SAndrew Rist * 35111cb72SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 45111cb72SAndrew Rist * or more contributor license agreements. See the NOTICE file 55111cb72SAndrew Rist * distributed with this work for additional information 65111cb72SAndrew Rist * regarding copyright ownership. The ASF licenses this file 75111cb72SAndrew Rist * to you under the Apache License, Version 2.0 (the 85111cb72SAndrew Rist * "License"); you may not use this file except in compliance 95111cb72SAndrew Rist * with the License. You may obtain a copy of the License at 105111cb72SAndrew Rist * 115111cb72SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 125111cb72SAndrew Rist * 135111cb72SAndrew Rist * Unless required by applicable law or agreed to in writing, 145111cb72SAndrew Rist * software distributed under the License is distributed on an 155111cb72SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 165111cb72SAndrew Rist * KIND, either express or implied. See the License for the 175111cb72SAndrew Rist * specific language governing permissions and limitations 185111cb72SAndrew Rist * under the License. 195111cb72SAndrew Rist * 205111cb72SAndrew Rist ***********************************************************--> 21cdf0e10cSrcweir 22cdf0e10cSrcweir 23cdf0e10cSrcweir<project name="Scipting Framework Installer" default="jar" basedir="."> 24cdf0e10cSrcweir 25cdf0e10cSrcweir <!-- =================== Environmental Properties ======================= --> 26cdf0e10cSrcweir 27cdf0e10cSrcweir <property name="prj" value=".."/> 28cdf0e10cSrcweir <property file="${prj}/java/build.env"/> 29*8b0d3335SPedro Giffuni <property name="build.compiler" value="modern"/> 30cdf0e10cSrcweir <property name="optimize" value="on"/> 31cdf0e10cSrcweir <property name="debug" value="on"/> 32cdf0e10cSrcweir <property name="installerclasses" value="${out}/class/sframeworkinstall"/> 33cdf0e10cSrcweir <property name="jardir" value="${out}/class"/> 34cdf0e10cSrcweir <property name="bindir" value="${out}/bin"/> 35cdf0e10cSrcweir <property name="sfversion" value="0.3"/> 36cdf0e10cSrcweir <property name="installerjarname" value="SFrameworkInstall.jar"/> 37cdf0e10cSrcweir <property environment="env"/> 38cdf0e10cSrcweir 39cdf0e10cSrcweir <!-- ==================== classpath setting ============================ --> 40cdf0e10cSrcweir <path id="idlclasspath"> 41cdf0e10cSrcweir <pathelement location="${solar.jar}/unoil.jar"/> 42cdf0e10cSrcweir <!-- <pathelement location="${prj}/../unoil/${inpath}/class/unoil.jar"/> --> 43cdf0e10cSrcweir <pathelement location="${solar.jar}/jurt.jar"/> 44cdf0e10cSrcweir <pathelement location="${solar.jar}/juh.jar"/> 45cdf0e10cSrcweir <pathelement location="${solar.jar}/java_uno.jar"/> 46cdf0e10cSrcweir <pathelement location="${solar.jar}/ridl.jar"/> 47cdf0e10cSrcweir </path> 48cdf0e10cSrcweir <path id="scriptexampleclasspath"> 49cdf0e10cSrcweir <pathelement location="${solar.jar}/unoil.jar"/> 50cdf0e10cSrcweir <!-- pathelement location="${prj}/../unoil/${inpath}/class/unoil.jar"/ --> 51cdf0e10cSrcweir <pathelement location="${solar.jar}/jurt.jar"/> 52cdf0e10cSrcweir <pathelement location="${solar.jar}/juh.jar"/> 53cdf0e10cSrcweir <pathelement location="${solar.jar}/java_uno.jar"/> 54cdf0e10cSrcweir <pathelement location="${solar.jar}/ridl.jar"/> 55cdf0e10cSrcweir <pathelement location="${out}/class/ScriptRuntimeForJava.jar"/> 56cdf0e10cSrcweir </path> 57cdf0e10cSrcweir 58cdf0e10cSrcweir <path id="debuggerclasspath"> 59cdf0e10cSrcweir <pathelement location="${out}/class/ScriptRuntimeForJava.jar"/> 60cdf0e10cSrcweir <pathelement location="${solar.jar}/ridl.jar"/> 61cdf0e10cSrcweir <pathelement location="${solar.jar}/unoil.jar"/> 62cdf0e10cSrcweir <pathelement location="${out}/class/jsruntime/skip_registration/js.jar"/> 63cdf0e10cSrcweir <pathelement location="${install.dir}/bsh-1.2b7.jar"/> 64cdf0e10cSrcweir </path> 65cdf0e10cSrcweir <!-- ===================== Set up build conditionals ========================= --> 66cdf0e10cSrcweir <target name="product.test"> 67cdf0e10cSrcweir <condition property="noproext"> 68cdf0e10cSrcweir <equals arg1="$${env.PROEXT}" arg2="${env.PROEXT}"/> 69cdf0e10cSrcweir </condition> 70cdf0e10cSrcweir </target> 71cdf0e10cSrcweir <target name="nonproduct.set" if="noproext"> 72cdf0e10cSrcweir <echo message="non-product build"/> 73cdf0e10cSrcweir <property name="proext" value=""/> 74cdf0e10cSrcweir </target> 75cdf0e10cSrcweir <target name="product.set" unless="noproext"> 76cdf0e10cSrcweir <echo message="product build"/> 77cdf0e10cSrcweir <property name="proext" value="${env.PROEXT}"/> 78cdf0e10cSrcweir </target> 79cdf0e10cSrcweir <target name="build.conditions" depends="product.test,nonproduct.set,product.set"> 80cdf0e10cSrcweir <condition property="win9.build"> 81cdf0e10cSrcweir <available file="${prj}/wntmsci9${proext}"/> 82cdf0e10cSrcweir </condition> 83cdf0e10cSrcweir <condition property="win8.build"> 84cdf0e10cSrcweir <available file="${prj}/wntmsci8${proext}"/> 85cdf0e10cSrcweir </condition> 86cdf0e10cSrcweir <condition property="win7.build"> 87cdf0e10cSrcweir <available file="${prj}/wntmsci7${proext}"/> 88cdf0e10cSrcweir </condition> 89cdf0e10cSrcweir <condition property="linx86.build"> 90cdf0e10cSrcweir <available file="${prj}/unxlngi5${proext}"/> 91cdf0e10cSrcweir </condition> 92cdf0e10cSrcweir <condition property="solsparc.build"> 93cdf0e10cSrcweir <available file="${prj}/unxsols4${proext}"/> 94cdf0e10cSrcweir </condition> 95cdf0e10cSrcweir <!-- <condition property="openoffice.build"> 96cdf0e10cSrcweir </condition> --> 97cdf0e10cSrcweir </target> 98cdf0e10cSrcweir <!-- ===================== Build the examples ========================= --> 99cdf0e10cSrcweir <target name="buildexamples"> 100cdf0e10cSrcweir 101cdf0e10cSrcweir <mkdir dir="${out}/class/examples/java/debugger"/> 102cdf0e10cSrcweir <javac srcdir="${prj}/examples/java/debugger" 103cdf0e10cSrcweir destdir="${out}/class/examples/java/debugger" 104cdf0e10cSrcweir includes="*.java" 105cdf0e10cSrcweir classpathref="debuggerclasspath" 106cdf0e10cSrcweir debug="${debug}" optimize="${optimize}" deprecation="on"/> 107cdf0e10cSrcweir 108cdf0e10cSrcweir <copy todir="${out}/class/examples/java/debugger"> 109cdf0e10cSrcweir <fileset dir="${prj}/examples/java/debugger"> 110cdf0e10cSrcweir <include name="**/*.java"/> 111cdf0e10cSrcweir <include name="*.xml"/> 112cdf0e10cSrcweir </fileset> 113cdf0e10cSrcweir </copy> 114cdf0e10cSrcweir 115cdf0e10cSrcweir <jar jarfile="${out}/class/examples/java/debugger/debugger.jar" 116cdf0e10cSrcweir basedir="${out}/class/examples/java/debugger" includes="*.class"> 117cdf0e10cSrcweir <manifest> 118cdf0e10cSrcweir <attribute name="Built-By" value="Sun Microsystems"/> 119cdf0e10cSrcweir <attribute name="ScriptFramework-Version" value="${sfversion}"/> 120cdf0e10cSrcweir </manifest> 121cdf0e10cSrcweir </jar> 122cdf0e10cSrcweir 123cdf0e10cSrcweir <delete> 124cdf0e10cSrcweir <fileset dir="${out}/class/examples/java/debugger" includes="*.class"/> 125cdf0e10cSrcweir </delete> 126cdf0e10cSrcweir 127cdf0e10cSrcweir <mkdir dir="${out}/class/examples/java/Highlight"/> 128cdf0e10cSrcweir <javac srcdir="${prj}/examples/java/" destdir="${out}/class/examples/java/Highlight/" 129cdf0e10cSrcweir includes="**/Highlight*.java" classpathref="idlclasspath" 130cdf0e10cSrcweir debug="${debug}" optimize="${optimize}" deprecation="on"/> 131cdf0e10cSrcweir <copy todir="${out}/class/examples/java/Highlight/"> 132cdf0e10cSrcweir <fileset dir="${prj}/examples/java/"> 133cdf0e10cSrcweir <include name="**/Highlight*.java"/> 134cdf0e10cSrcweir </fileset> 135cdf0e10cSrcweir </copy> 136cdf0e10cSrcweir <copy file="${prj}/examples/java/HighlightTextParcel.xml" tofile="${out}/class/examples/java/Highlight/parcel-descriptor.xml"/> 137cdf0e10cSrcweir <jar jarfile="${out}/class/examples/java/Highlight/Highlight.jar" 138cdf0e10cSrcweir basedir="${out}/class/examples/java/Highlight" 139cdf0e10cSrcweir includes="**/*.java,**/*.class,**/*.xml" 140cdf0e10cSrcweir excludes="${out}/class/examples/java/Highlight/Highlight.jar"> 141cdf0e10cSrcweir <manifest> 142cdf0e10cSrcweir <attribute name="Built-By" value="Sun Microsystems"/> 143cdf0e10cSrcweir <attribute name="ScriptFramework-Version" value="${sfversion}"/> 144cdf0e10cSrcweir </manifest> 145cdf0e10cSrcweir </jar> 146cdf0e10cSrcweir <mkdir dir="${out}/class/examples/java/MemoryUsage"/> 147cdf0e10cSrcweir <javac srcdir="${prj}/examples/java/" destdir="${out}/class/examples/java/MemoryUsage/" 148cdf0e10cSrcweir includes="**/MemoryUsage.java" classpathref="idlclasspath" 149cdf0e10cSrcweir debug="${debug}" optimize="${optimize}" deprecation="on"/> 150cdf0e10cSrcweir <copy file="${prj}/examples/java/MemoryUsage.java" todir="${out}/class/examples/java/MemoryUsage/"/> 151cdf0e10cSrcweir <copy file="${prj}/examples/java/MemoryUsageParcel.xml" tofile="${out}/class/examples/java/MemoryUsage/parcel-descriptor.xml"/> 152cdf0e10cSrcweir <copy file="${prj}/examples/java/MemoryUsage.java" todir="${out}/class/examples/java/MemoryUsage/"/> 153cdf0e10cSrcweir <copy file="${prj}/examples/java/ExampleSpreadSheet.sxc" todir="${out}/class/examples/java/MemoryUsage/"/> 154cdf0e10cSrcweir 155cdf0e10cSrcweir <mkdir dir="${out}/class/examples/java/ScriptFrmwrkHelper"/> 156cdf0e10cSrcweir <javac srcdir="${prj}/examples/java/" destdir="${out}/class/examples/java/ScriptFrmwrkHelper/" 157cdf0e10cSrcweir includes="**/ScriptFrmwrkHelper.java" classpathref="scriptexampleclasspath" 158cdf0e10cSrcweir debug="${debug}" optimize="${optimize}" deprecation="on"/> 159cdf0e10cSrcweir <copy todir="${out}/class/examples/java/ScriptFrmwrkHelper/"> 160cdf0e10cSrcweir <fileset dir="${prj}/examples/java/"> 161cdf0e10cSrcweir <include name="**/ScriptFrmwrkHelper.java"/> 162cdf0e10cSrcweir </fileset> 163cdf0e10cSrcweir </copy> 164cdf0e10cSrcweir <copy file="${prj}/examples/java/ScriptFrameWkHelperParcel.xml" tofile="${out}/class/examples/java/ScriptFrmwrkHelper/parcel-descriptor.xml"/> 165cdf0e10cSrcweir <jar jarfile="${out}/class/examples/java/ScriptFrmwrkHelper/ScriptFrmwrkHelper.jar" 166cdf0e10cSrcweir basedir="${out}/class/examples/java/ScriptFrmwrkHelper" 167cdf0e10cSrcweir includes="**/*.java,**/*.class,**/*.xml" 168cdf0e10cSrcweir excludes="${out}/class/examples/java/ScriptFrmwrkHelper/ScriptFrmwrkHelper.jar"> 169cdf0e10cSrcweir <manifest> 170cdf0e10cSrcweir <attribute name="Built-By" value="Sun Microsystems"/> 171cdf0e10cSrcweir <attribute name="ScriptFramework-Version" value="${sfversion}"/> 172cdf0e10cSrcweir </manifest> 173cdf0e10cSrcweir </jar> 174cdf0e10cSrcweir <mkdir dir="${out}/class/examples/beanshell"/> 175cdf0e10cSrcweir <copy todir="${out}/class/examples/beanshell"> 176cdf0e10cSrcweir <fileset dir="${prj}/examples/beanshell" includes="**"/> 177cdf0e10cSrcweir </copy> 178cdf0e10cSrcweir <mkdir dir="${out}/class/examples/javascript"/> 179cdf0e10cSrcweir <copy todir="${out}/class/examples/javascript"> 180cdf0e10cSrcweir <fileset dir="${prj}/examples/javascript" includes="**"/> 181cdf0e10cSrcweir </copy> 182cdf0e10cSrcweir </target> 183cdf0e10cSrcweir 184cdf0e10cSrcweir <!-- ===================== Build UNO package ========================= --> 185cdf0e10cSrcweir <target name="buildunopackage_win9" depends="build.conditions" if="win9.build"> 186cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/sframework"/> 187cdf0e10cSrcweir <mkdir dir="${out}/class/sframework"/> 188cdf0e10cSrcweir <copy file="${solar.bin}/ScriptFramework.rdb" 189cdf0e10cSrcweir todir="${out}/class/sframework/"/> 190cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForJava.jar" 191cdf0e10cSrcweir todir="${out}/class/sframework/"/> 192cdf0e10cSrcweir <copy file="${out}/class/ScriptFramework.jar" 193cdf0e10cSrcweir todir="${out}/class/sframework/"/> 194cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/windows.plt"/> 195cdf0e10cSrcweir <copy todir="${out}/class/sframework/windows.plt"> 196cdf0e10cSrcweir <fileset dir="${prj}/wntmsci9${proext}/bin/"> 197cdf0e10cSrcweir <include name="**/*.dll"/> 198cdf0e10cSrcweir </fileset> 199cdf0e10cSrcweir </copy> 200cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/skip_registration"/> 201cdf0e10cSrcweir <copy file="${solar.jar}/unoil.jar" 202cdf0e10cSrcweir todir="${out}/class/sframework/skip_registration"/> 203cdf0e10cSrcweir </target> 204cdf0e10cSrcweir <target name="buildunopackage_win8" depends="build.conditions" if="win8.build"> 205cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/sframework"/> 206cdf0e10cSrcweir <mkdir dir="${out}/class/sframework"/> 207cdf0e10cSrcweir <copy file="${solar.bin}/ScriptFramework.rdb" 208cdf0e10cSrcweir todir="${out}/class/sframework/"/> 209cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForJava.jar" 210cdf0e10cSrcweir todir="${out}/class/sframework/"/> 211cdf0e10cSrcweir <copy file="${out}/class/ScriptFramework.jar" 212cdf0e10cSrcweir todir="${out}/class/sframework/"/> 213cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/windows.plt"/> 214cdf0e10cSrcweir <copy todir="${out}/class/sframework/windows.plt"> 215cdf0e10cSrcweir <fileset dir="${prj}/wntmsci8${proext}/bin/"> 216cdf0e10cSrcweir <include name="**/*.dll"/> 217cdf0e10cSrcweir </fileset> 218cdf0e10cSrcweir </copy> 219cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/skip_registration"/> 220cdf0e10cSrcweir <copy file="${solar.jar}/unoil.jar" 221cdf0e10cSrcweir todir="${out}/class/sframework/skip_registration"/> 222cdf0e10cSrcweir </target> 223cdf0e10cSrcweir<!-- <target name="buildunopackage_win7" depends="build.conditions" if="win7.build"> 224cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/sframework"/> 225cdf0e10cSrcweir <mkdir dir="${out}/class/sframework"/> 226cdf0e10cSrcweir <copy file="${solar.bin}/ScriptFramework.rdb" 227cdf0e10cSrcweir todir="${out}/class/sframework/"/> 228cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForJava.jar" 229cdf0e10cSrcweir todir="${out}/class/sframework/"/> 230cdf0e10cSrcweir <copy file="${out}/class/ScriptFramework.jar" 231cdf0e10cSrcweir todir="${out}/class/sframework/"/> 232cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/windows.plt"/> 233cdf0e10cSrcweir <copy todir="${out}/class/sframework/windows.plt"> 234cdf0e10cSrcweir <fileset dir="${prj}/wntmsci7${proext}/bin/"> 235cdf0e10cSrcweir <include name="**/*.dll"/> 236cdf0e10cSrcweir </fileset> 237cdf0e10cSrcweir </copy> 238cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/skip_registration"/> 239cdf0e10cSrcweir <copy file="${solar.jar}/unoil.jar" 240cdf0e10cSrcweir todir="${out}/class/sframework/skip_registration"/> 241cdf0e10cSrcweir </target> --> 242cdf0e10cSrcweir <target name="buildunopackage_linux" depends="build.conditions" if="linx86.build"> 243cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/sframework"/> 244cdf0e10cSrcweir <mkdir dir="${out}/class/sframework"/> 245cdf0e10cSrcweir <copy file="${solar.bin}/ScriptFramework.rdb" 246cdf0e10cSrcweir todir="${out}/class/sframework/"/> 247cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForJava.jar" 248cdf0e10cSrcweir todir="${out}/class/sframework/"/> 249cdf0e10cSrcweir <copy file="${out}/class/ScriptFramework.jar" 250cdf0e10cSrcweir todir="${out}/class/sframework/"/> 251cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/linux_x86.plt"/> 252cdf0e10cSrcweir <copy todir="${out}/class/sframework/linux_x86.plt"> 253cdf0e10cSrcweir <fileset dir="${prj}/unxlngi5${proext}/lib/"> 254cdf0e10cSrcweir <include name="**/lib*.so"/> 255cdf0e10cSrcweir </fileset> 256cdf0e10cSrcweir </copy> 257cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/skip_registration"/> 258cdf0e10cSrcweir <copy file="${solar.jar}/unoil.jar" 259cdf0e10cSrcweir todir="${out}/class/sframework/skip_registration"/> 260cdf0e10cSrcweir </target> 261cdf0e10cSrcweir <target name="buildunopackage_solaris" depends="build.conditions" if="solsparc.build"> 262cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/sframework"/> 263cdf0e10cSrcweir <mkdir dir="${out}/class/sframework"/> 264cdf0e10cSrcweir <copy file="${solar.bin}/ScriptFramework.rdb" 265cdf0e10cSrcweir todir="${out}/class/sframework/"/> 266cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForJava.jar" 267cdf0e10cSrcweir todir="${out}/class/sframework/"/> 268cdf0e10cSrcweir <copy file="${out}/class/ScriptFramework.jar" 269cdf0e10cSrcweir todir="${out}/class/sframework/"/> 270cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/solaris_sparc.plt"/> 271cdf0e10cSrcweir <copy todir="${out}/class/sframework/solaris_sparc.plt"> 272cdf0e10cSrcweir <fileset dir="${prj}/unxsols4${proext}/lib/"> 273cdf0e10cSrcweir <include name="**/lib*.so"/> 274cdf0e10cSrcweir </fileset> 275cdf0e10cSrcweir </copy> 276cdf0e10cSrcweir <mkdir dir="${out}/class/sframework/skip_registration"/> 277cdf0e10cSrcweir <copy file="${solar.jar}/unoil.jar" 278cdf0e10cSrcweir todir="${out}/class/sframework/skip_registration"/> 279cdf0e10cSrcweir </target> 280cdf0e10cSrcweir <target name="buildunopackage" depends="buildunopackage_win8,buildunopackage_linux,buildunopackage_solaris"> 281cdf0e10cSrcweir <!-- <target name="buildunopackage" depends="buildunopackage_win9,buildunopackage_win7,buildunopackage_linux,buildunopackage_solaris"> --> 282cdf0e10cSrcweir <copy file="installer/ProtocolHandler.xcu" 283cdf0e10cSrcweir todir="${out}/class/sframework/"/> 284cdf0e10cSrcweir <zip zipfile="${out}/class/sframeworkinstall/sframework/ooscriptframe.zip" 285cdf0e10cSrcweir basedir="${out}/class/sframework"> 286cdf0e10cSrcweir </zip> 287cdf0e10cSrcweir </target> 288cdf0e10cSrcweir 289cdf0e10cSrcweir <!-- ================== Build JavaScript UNO package ===================== --> 290cdf0e10cSrcweir <target name="buildjsuno"> 291cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/sframework"/> 292cdf0e10cSrcweir 293cdf0e10cSrcweir <mkdir dir="${out}/class/jsruntime"/> 294cdf0e10cSrcweir <mkdir dir="${out}/class/jsruntime/skip_registration"/> 295cdf0e10cSrcweir <mkdir dir="${out}/class/jsruntimetmp"/> 296cdf0e10cSrcweir 297cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForJavaScript.jar" 298cdf0e10cSrcweir todir="${out}/class/jsruntime/"/> 299cdf0e10cSrcweir <copy file="installer/Scripting.JavaScript.xcu" 300cdf0e10cSrcweir tofile="${out}/class/jsruntime/Scripting.xcu"/> 301cdf0e10cSrcweir 302cdf0e10cSrcweir <unzip src="${install.dir}/js.jar" 303cdf0e10cSrcweir dest="${out}/class/jsruntimetmp"/> 304cdf0e10cSrcweir 305cdf0e10cSrcweir <javac srcdir="${prj}/examples/java/debugger" 306cdf0e10cSrcweir destdir="${out}/class/jsruntimetmp" 307cdf0e10cSrcweir includes="rhino/Main.java" classpathref="debuggerclasspath" 308cdf0e10cSrcweir debug="${debug}" optimize="${optimize}" deprecation="on"/> 309cdf0e10cSrcweir 310cdf0e10cSrcweir <zip destfile="${out}/class/jsruntime/skip_registration/js.jar" 311cdf0e10cSrcweir basedir="${out}/class/jsruntimetmp" includes="**"/> 312cdf0e10cSrcweir 313cdf0e10cSrcweir <zip zipfile="${out}/class/sframeworkinstall/sframework/jsruntime.zip" 314cdf0e10cSrcweir basedir="${out}/class/jsruntime"> 315cdf0e10cSrcweir </zip> 316cdf0e10cSrcweir </target> 317cdf0e10cSrcweir 318cdf0e10cSrcweir <!-- =================== Build BeanShell UNO package ===================== --> 319cdf0e10cSrcweir <target name="buildbshuno"> 320cdf0e10cSrcweir <mkdir dir="${out}/class/bshruntime"/> 321cdf0e10cSrcweir <copy file="${out}/class/ScriptRuntimeForBeanShell.jar" 322cdf0e10cSrcweir todir="${out}/class/bshruntime/"/> 323cdf0e10cSrcweir <copy file="installer/Scripting.BeanShell.xcu" 324cdf0e10cSrcweir tofile="${out}/class/bshruntime/Scripting.xcu"/> 325cdf0e10cSrcweir <mkdir dir="${out}/class/bshruntime/skip_registration"/> 326cdf0e10cSrcweir <copy file="${install.dir}/bsh-1.2b7.jar" 327cdf0e10cSrcweir todir="${out}/class/bshruntime/skip_registration"/> 328cdf0e10cSrcweir <zip zipfile="${out}/class/sframeworkinstall/sframework/bshruntime.zip" 329cdf0e10cSrcweir basedir="${out}/class/bshruntime"> 330cdf0e10cSrcweir </zip> 331cdf0e10cSrcweir </target> 332cdf0e10cSrcweir 333cdf0e10cSrcweir <!-- ========= Package schema, scripts, dialogs & examples =========== --> 334cdf0e10cSrcweir <target name="packagedialogsandexamples" depends="buildexamples"> 335cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/schema"/> 336cdf0e10cSrcweir <copy file="installer/Scripting.xcs" 337cdf0e10cSrcweir todir="${out}/class/sframeworkinstall/schema/"/> 338cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/bindingdialog"/> 339cdf0e10cSrcweir <copy todir="${out}/class/sframeworkinstall/bindingdialog"> 340cdf0e10cSrcweir <fileset dir="bindings/"> 341cdf0e10cSrcweir <include name="**/*.x*"/> 342cdf0e10cSrcweir </fileset> 343cdf0e10cSrcweir </copy> 344cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/examples"/> 345cdf0e10cSrcweir <copy todir="${out}/class/sframeworkinstall/examples"> 346cdf0e10cSrcweir <fileset dir="${out}/class/examples/"/> 347cdf0e10cSrcweir </copy> 348cdf0e10cSrcweir </target> 349cdf0e10cSrcweir 350cdf0e10cSrcweir <!-- ===================== Package IDEs ================================== --> 351cdf0e10cSrcweir <target name="packageide"> 352cdf0e10cSrcweir <mkdir dir="${out}/class/sframeworkinstall/ide"/> 353cdf0e10cSrcweir <copy todir="${out}/class/sframeworkinstall/ide"> 354cdf0e10cSrcweir <fileset dir="${out}/class/"> 355cdf0e10cSrcweir <include name="idesupport.jar"/> 356cdf0e10cSrcweir <include name="office.jar"/> 357cdf0e10cSrcweir </fileset> 358cdf0e10cSrcweir </copy> 359cdf0e10cSrcweir </target> 360cdf0e10cSrcweir 361cdf0e10cSrcweir <!-- ======================== Compile Classes ========================== --> 362cdf0e10cSrcweir <target name="compileinstaller"> 363cdf0e10cSrcweir <mkdir dir="${installerclasses}"/> 364cdf0e10cSrcweir <javac srcdir="installer/" destdir="${installerclasses}" 365cdf0e10cSrcweir includes="**/*.java" classpathref="idlclasspath" 366cdf0e10cSrcweir debug="${debug}" optimize="${optimize}" deprecation="on"/> 367cdf0e10cSrcweir <copy file="installer/sidebar.jpg" todir="${out}/class/sframeworkinstall/installer"/> 368cdf0e10cSrcweir </target> 369cdf0e10cSrcweir 370cdf0e10cSrcweir <!-- ===================== jar ========================= --> 371cdf0e10cSrcweir <target name="jar" depends="buildunopackage,buildbshuno,buildjsuno,compileinstaller,packagedialogsandexamples,packageide"> 372cdf0e10cSrcweir <jar jarfile="${jardir}/${installerjarname}" 373cdf0e10cSrcweir basedir="${installerclasses}"> 374cdf0e10cSrcweir <manifest> 375cdf0e10cSrcweir <attribute name="Built-By" value="Sun Microsystems"/> 376cdf0e10cSrcweir <attribute name="ScriptFramework-Version" value="${sfversion}"/> 377cdf0e10cSrcweir <attribute name="Main-Class" value="installer.InstallWizard"/> 378cdf0e10cSrcweir </manifest> 379cdf0e10cSrcweir </jar> 380cdf0e10cSrcweir </target> 381cdf0e10cSrcweir 382cdf0e10cSrcweir <!-- ====================== Clean Generated Files ===================== --> 383cdf0e10cSrcweir <target name="clean"> 384cdf0e10cSrcweir <delete dir="${scriptingclasses}"/> 385cdf0e10cSrcweir <delete dir="${storageclasses}"/> 386cdf0e10cSrcweir <delete dir="${jardir}/${scriptingjarname}"/> 387cdf0e10cSrcweir </target> 388cdf0e10cSrcweir 389cdf0e10cSrcweir <!-- ========================= All In One Build ======================= --> 390cdf0e10cSrcweir <target name="all" depends="clean,jar"/> 391cdf0e10cSrcweir 392cdf0e10cSrcweir 393cdf0e10cSrcweir</project> 394