Kaydet (Commit) 3dda2aa2 authored tarafından Tomas O'Connor's avatar Tomas O'Connor

IssueZilla 10518 - Add BeanShell scripting support

üst 381461cd
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# #
# $RCSfile: build.xml,v $ # $RCSfile: build.xml,v $
# #
# $Revision: 1.9 $ # $Revision: 1.10 $
# #
# last change: $Author: dfoster $ $Date: 2003-01-21 15:13:01 $ # last change: $Author: toconnor $ $Date: 2003-01-21 16:20:04 $
# #
# The Contents of this file are made available subject to the terms of # The Contents of this file are made available subject to the terms of
# either of the following licenses # either of the following licenses
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<!-- =================== Environmental Properties ======================= --> <!-- =================== Environmental Properties ======================= -->
<property name="prj" value=".."/> <property name="prj" value=".."/>
<property file="${prj}/java/build.env"/>
<property name="build.compiler" value="classic"/> <property name="build.compiler" value="classic"/>
<property name="optimize" value="on"/> <property name="optimize" value="on"/>
<property name="debug" value="on"/> <property name="debug" value="on"/>
...@@ -145,6 +146,9 @@ ...@@ -145,6 +146,9 @@
<copy file="${prj}/examples/java/MemoryUsageParcel.xml" tofile="${out}/class/examples/MemoryUsage/parcel-descriptor.xml"/> <copy file="${prj}/examples/java/MemoryUsageParcel.xml" tofile="${out}/class/examples/MemoryUsage/parcel-descriptor.xml"/>
<copy file="${prj}/examples/java/MemoryUsage.java" todir="${out}/class/examples/MemoryUsage/"/> <copy file="${prj}/examples/java/MemoryUsage.java" todir="${out}/class/examples/MemoryUsage/"/>
<copy file="${prj}/examples/java/ExampleSpreadSheet.sxc" todir="${out}/class/examples/MemoryUsage/"/> <copy file="${prj}/examples/java/ExampleSpreadSheet.sxc" todir="${out}/class/examples/MemoryUsage/"/>
<mkdir dir="${out}/class/examples/InteractiveBeanShell"/>
<copy file="${prj}/examples/java/interactive.bsh" todir="${out}/class/examples/InteractiveBeanShell/"/>
<copy file="${prj}/examples/java/interactive.xml" tofile="${out}/class/examples/InteractiveBeanShell/parcel-descriptor.xml"/>
</target> </target>
<!-- ===================== Build UNO package ========================= --> <!-- ===================== Build UNO package ========================= -->
...@@ -158,6 +162,8 @@ ...@@ -158,6 +162,8 @@
<arg value="${prj}/../offapi/wntmsci9${proext}/ucr/dcsssfprovider.db"/> <arg value="${prj}/../offapi/wntmsci9${proext}/ucr/dcsssfprovider.db"/>
<arg value="${prj}/../offapi/wntmsci9${proext}/ucr/dcsssfstorage.db"/> <arg value="${prj}/../offapi/wntmsci9${proext}/ucr/dcsssfstorage.db"/>
</exec> </exec>
<copy file="${out}/class/ScriptRuntimeForBeanShell.jar"
todir="${out}/class/sframework/"/>
<copy file="${out}/class/ScriptRuntimeForJava.jar" <copy file="${out}/class/ScriptRuntimeForJava.jar"
todir="${out}/class/sframework/"/> todir="${out}/class/sframework/"/>
<mkdir dir="${out}/class/sframework/windows.plt"/> <mkdir dir="${out}/class/sframework/windows.plt"/>
...@@ -169,6 +175,8 @@ ...@@ -169,6 +175,8 @@
<mkdir dir="${out}/class/sframework/skip_registration"/> <mkdir dir="${out}/class/sframework/skip_registration"/>
<copy file="${prj}/../unoil/wntmsci9${proext}/class/unoil.jar" <copy file="${prj}/../unoil/wntmsci9${proext}/class/unoil.jar"
todir="${out}/class/sframework/skip_registration"/> todir="${out}/class/sframework/skip_registration"/>
<copy file="${install.dir}/bsh-1.2b7.jar"
todir="${out}/class/sframework/skip_registration"/>
</target> </target>
<target name="buildunopackage_win7" depends="build.conditions" if="win7.build"> <target name="buildunopackage_win7" depends="build.conditions" if="win7.build">
<mkdir dir="${out}/class/sframeworkinstall/sframework"/> <mkdir dir="${out}/class/sframeworkinstall/sframework"/>
...@@ -180,6 +188,8 @@ ...@@ -180,6 +188,8 @@
<arg value="${prj}/../offapi/wntmsci7${proext}/ucr/dcsssfprovider.db"/> <arg value="${prj}/../offapi/wntmsci7${proext}/ucr/dcsssfprovider.db"/>
<arg value="${prj}/../offapi/wntmsci7${proext}/ucr/dcsssfstorage.db"/> <arg value="${prj}/../offapi/wntmsci7${proext}/ucr/dcsssfstorage.db"/>
</exec> </exec>
<copy file="${out}/class/ScriptRuntimeForBeanShell.jar"
todir="${out}/class/sframework/"/>
<copy file="${out}/class/ScriptRuntimeForJava.jar" <copy file="${out}/class/ScriptRuntimeForJava.jar"
todir="${out}/class/sframework/"/> todir="${out}/class/sframework/"/>
<mkdir dir="${out}/class/sframework/windows.plt"/> <mkdir dir="${out}/class/sframework/windows.plt"/>
...@@ -189,6 +199,8 @@ ...@@ -189,6 +199,8 @@
</fileset> </fileset>
</copy> </copy>
<mkdir dir="${out}/class/sframework/skip_registration"/> <mkdir dir="${out}/class/sframework/skip_registration"/>
<copy file="${install.dir}/bsh-1.2b7.jar"
todir="${out}/class/sframework/skip_registration"/>
<copy file="${prj}/../unoil/wntmsci7${proext}/class/unoil.jar" <copy file="${prj}/../unoil/wntmsci7${proext}/class/unoil.jar"
todir="${out}/class/sframework/skip_registration"/> todir="${out}/class/sframework/skip_registration"/>
</target> </target>
...@@ -202,6 +214,8 @@ ...@@ -202,6 +214,8 @@
<arg value="${prj}/../offapi/unxlngi4${proext}/ucr/dcsssfprovider.db"/> <arg value="${prj}/../offapi/unxlngi4${proext}/ucr/dcsssfprovider.db"/>
<arg value="${prj}/../offapi/unxlngi4${proext}/ucr/dcsssfstorage.db"/> <arg value="${prj}/../offapi/unxlngi4${proext}/ucr/dcsssfstorage.db"/>
</exec> </exec>
<copy file="${out}/class/ScriptRuntimeForBeanShell.jar"
todir="${out}/class/sframework/"/>
<copy file="${out}/class/ScriptRuntimeForJava.jar" <copy file="${out}/class/ScriptRuntimeForJava.jar"
todir="${out}/class/sframework/"/> todir="${out}/class/sframework/"/>
<mkdir dir="${out}/class/sframework/linux_x86.plt"/> <mkdir dir="${out}/class/sframework/linux_x86.plt"/>
...@@ -211,6 +225,8 @@ ...@@ -211,6 +225,8 @@
</fileset> </fileset>
</copy> </copy>
<mkdir dir="${out}/class/sframework/skip_registration"/> <mkdir dir="${out}/class/sframework/skip_registration"/>
<copy file="${install.dir}/bsh-1.2b7.jar"
todir="${out}/class/sframework/skip_registration"/>
<copy file="${prj}/../unoil/unxlngi4${proext}/class/unoil.jar" <copy file="${prj}/../unoil/unxlngi4${proext}/class/unoil.jar"
todir="${out}/class/sframework/skip_registration"/> todir="${out}/class/sframework/skip_registration"/>
</target> </target>
...@@ -224,6 +240,8 @@ ...@@ -224,6 +240,8 @@
<arg value="${prj}/../offapi/unxsols3${proext}/ucr/dcsssfprovider.db"/> <arg value="${prj}/../offapi/unxsols3${proext}/ucr/dcsssfprovider.db"/>
<arg value="${prj}/../offapi/unxsols3${proext}/ucr/dcsssfstorage.db"/> <arg value="${prj}/../offapi/unxsols3${proext}/ucr/dcsssfstorage.db"/>
</exec> </exec>
<copy file="${out}/class/ScriptRuntimeForBeanShell.jar"
todir="${out}/class/sframework/"/>
<copy file="${out}/class/ScriptRuntimeForJava.jar" <copy file="${out}/class/ScriptRuntimeForJava.jar"
todir="${out}/class/sframework/"/> todir="${out}/class/sframework/"/>
<mkdir dir="${out}/class/sframework/solaris_sparc.plt"/> <mkdir dir="${out}/class/sframework/solaris_sparc.plt"/>
...@@ -233,11 +251,13 @@ ...@@ -233,11 +251,13 @@
</fileset> </fileset>
</copy> </copy>
<mkdir dir="${out}/class/sframework/skip_registration"/> <mkdir dir="${out}/class/sframework/skip_registration"/>
<copy file="${install.dir}/bsh-1.2b7.jar"
todir="${out}/class/sframework/skip_registration"/>
<copy file="${prj}/../unoil/unxsols3${proext}/class/unoil.jar" <copy file="${prj}/../unoil/unxsols3${proext}/class/unoil.jar"
todir="${out}/class/sframework/skip_registration"/> todir="${out}/class/sframework/skip_registration"/>
</target> </target>
<target name="buildunopackage" depends="buildunopackage_win9,buildunopackage_win7,buildunopackage_linux,buildunopackage_solaris"> <target name="buildunopackage" depends="buildunopackage_win9,buildunopackage_win7,buildunopackage_linux,buildunopackage_solaris">
<zip destfile="${out}/class/sframeworkinstall/sframework/ooscriptframe.zip" <zip zipfile="${out}/class/sframeworkinstall/sframework/ooscriptframe.zip"
basedir="${out}/class/sframework"> basedir="${out}/class/sframework">
</zip> </zip>
<copy file="${prj}/common/bin/scripting${env.UPD}01.res" <copy file="${prj}/common/bin/scripting${env.UPD}01.res"
...@@ -280,9 +300,9 @@ ...@@ -280,9 +300,9 @@
<mkdir dir="${out}/class/sframeworkinstall/ide"/> <mkdir dir="${out}/class/sframeworkinstall/ide"/>
<copy todir="${out}/class/sframeworkinstall/ide"> <copy todir="${out}/class/sframeworkinstall/ide">
<fileset dir="${out}/class/"> <fileset dir="${out}/class/">
<include name="**/OfficeScripting.jar"/> <include name="OfficeScripting.jar"/>
<include name="**/idesupport.jar"/> <include name="idesupport.jar"/>
<include name="**/office.jar"/> <include name="office.jar"/>
</fileset> </fileset>
</copy> </copy>
</target> </target>
......
...@@ -6,6 +6,7 @@ import javax.swing.*; ...@@ -6,6 +6,7 @@ import javax.swing.*;
public class Register{ public class Register{
private static String[] singletonDefParams = { "drafts.com.sun.star.script.framework.theScriptRuntimeForJava=drafts.com.sun.star.script.framework.ScriptRuntimeForJava", private static String[] singletonDefParams = { "drafts.com.sun.star.script.framework.theScriptRuntimeForJava=drafts.com.sun.star.script.framework.ScriptRuntimeForJava",
"drafts.com.sun.star.script.framework.theScriptRuntimeForBeanShell=drafts.com.sun.star.script.framework.ScriptRuntimeForBeanShell",
"drafts.com.sun.star.script.framework.storage.theScriptStorageManager=drafts.com.sun.star.script.framework.storage.ScriptStorageManager", "drafts.com.sun.star.script.framework.storage.theScriptStorageManager=drafts.com.sun.star.script.framework.storage.ScriptStorageManager",
"drafts.com.sun.star.script.framework.theScriptRuntimeManager=drafts.com.sun.star.script.framework.ScriptRuntimeManager"}; "drafts.com.sun.star.script.framework.theScriptRuntimeManager=drafts.com.sun.star.script.framework.ScriptRuntimeManager"};
......
...@@ -155,9 +155,14 @@ public class XmlUpdater extends Thread { ...@@ -155,9 +155,14 @@ public class XmlUpdater extends Thread {
File scriptsDir = new File( scriptsPath ); File scriptsDir = new File( scriptsPath );
File highlightDir = new File( scriptsPath+"Highlight" ); File highlightDir = new File( scriptsPath+"Highlight" );
File memoryDir = new File( scriptsPath+"MemoryUsage" ); File memoryDir = new File( scriptsPath+"MemoryUsage" );
File bshDir = new File( scriptsPath+"InteractiveBeanShell" );
if( !highlightDir.mkdirs() ) { if( !highlightDir.mkdirs() ) {
System.out.println( "Highlight script directory failed"); System.out.println( "Highlight script directory failed");
} }
if( !bshDir.mkdirs() )
{
System.out.println( "InteractiveBeanShell script directory failed");
}
if( !memoryDir.mkdirs() ) if( !memoryDir.mkdirs() )
{ {
System.out.println( "MemoryUsage script directory failed"); System.out.println( "MemoryUsage script directory failed");
...@@ -269,6 +274,23 @@ public class XmlUpdater extends Thread { ...@@ -269,6 +274,23 @@ public class XmlUpdater extends Thread {
System.out.println( "MemoryUsage script already deployed" ); System.out.println( "MemoryUsage script already deployed" );
} }
File script = new File( scriptsPath+File.separator+"InteractiveBeanShell"+File.separator+"interactive.bsh" );
if( !script.exists() ) {
if (!zd.extractEntry("examples/InteractiveBeanShell/interactive.bsh",scriptsPath+File.separator+"InteractiveBeanShell"+File.separator, statusLabel))
{
onInstallComplete();
return;
}
if (!zd.extractEntry("examples/InteractiveBeanShell/parcel-descriptor.xml",scriptsPath+File.separator+"InteractiveBeanShell"+File.separator, statusLabel))
{
onInstallComplete();
return;
}
}
else {
System.out.println( "InteractiveBeanShell script already deployed" );
}
// Robert Kinsella test 2 end // Robert Kinsella test 2 end
//-------------------------------- //--------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment