[Jsxe-cvs] SF.net SVN: jsxe: [1130] trunk/jsxe
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-08-10 20:11:20
|
Revision: 1130 Author: ian_lewis Date: 2006-08-10 13:10:50 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1130&view=rev Log Message: ----------- Added the jsXe installer Modified Paths: -------------- trunk/jsxe/INSTALL trunk/jsxe/README trunk/jsxe/build.xml Added Paths: ----------- trunk/jsxe/buildlib/bsf.jar trunk/jsxe/buildlib/js.jar trunk/jsxe/installer/ trunk/jsxe/installer/done-HalfAnOS.html trunk/jsxe/installer/done-MacOS.html trunk/jsxe/installer/done-Unix.html trunk/jsxe/installer/done-VMS.html trunk/jsxe/installer/done-Windows.html trunk/jsxe/installer/gpl.html trunk/jsxe/installer/readme.html trunk/jsxe/installer/src/ trunk/jsxe/installer/src/installer/ trunk/jsxe/installer/src/installer/BZip2Constants.java trunk/jsxe/installer/src/installer/CBZip2InputStream.java trunk/jsxe/installer/src/installer/CBZip2OutputStream.java trunk/jsxe/installer/src/installer/CRC.java trunk/jsxe/installer/src/installer/ConsoleInstall.java trunk/jsxe/installer/src/installer/ConsoleProgress.java trunk/jsxe/installer/src/installer/Install.java trunk/jsxe/installer/src/installer/InstallThread.java trunk/jsxe/installer/src/installer/InvalidHeaderException.java trunk/jsxe/installer/src/installer/NonInteractiveInstall.java trunk/jsxe/installer/src/installer/OperatingSystem.java trunk/jsxe/installer/src/installer/Progress.java trunk/jsxe/installer/src/installer/SwingInstall.java trunk/jsxe/installer/src/installer/TarBuffer.java trunk/jsxe/installer/src/installer/TarEntry.java trunk/jsxe/installer/src/installer/TarHeader.java trunk/jsxe/installer/src/installer/TarInputStream.java trunk/jsxe/installer/src/installer/TarOutputStream.java trunk/jsxe/installer/src/installer/VariableGridLayout.java Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-08-09 21:53:09 UTC (rev 1129) +++ trunk/jsxe/INSTALL 2006-08-10 20:10:50 UTC (rev 1130) @@ -1,7 +1,7 @@ REQUIREMENTS Java 1.4.2 -Xerces 2.6.2 +Xerces 2.8.0 GETTING jsXe Modified: trunk/jsxe/README =================================================================== --- trunk/jsxe/README 2006-08-09 21:53:09 UTC (rev 1129) +++ trunk/jsxe/README 2006-08-10 20:10:50 UTC (rev 1130) @@ -7,3 +7,22 @@ way of creating XML documents. It is geared towards simpler XML documents but will (eventually) be able to handle any XML document. Visit http://jsxe.sourceforge.net/ to learn more about this project. + +jsXe bundles the following libraries: + +- Xerces Java 2.8.0 is a XML parsing library released by the Apache foundation. + This library is released under the Apache license, which can be found at + http://www.apache.org/licenses/LICENSE-2.0 + +The jsXe installer bundles the following libraries: + +- org.apache.excalibur.bzip2 compression library. This library is + released under the Apache license, which can be found at + http://www.apache.org/licenses/LICENSE-2.0 + + The org.apache.excalibur.bzip2 web site is + <http://jakarta.apache.org/avalon/excalibur/bzip2/>. + +- com.ice.tar, by Tim Endres. This code is in the public domain. + + The com.ice.tar web site is <http://www.trustice.com/java/tar/>. \ No newline at end of file Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-09 21:53:09 UTC (rev 1129) +++ trunk/jsxe/build.xml 2006-08-10 20:10:50 UTC (rev 1130) @@ -7,11 +7,13 @@ Version: $Id$ You should check out jsxe to make a structure like this. This ensures that - when compiling jsXe the other views will be compiled as well. + when compiling jsXe the other views and will be compiled as well. It also + ensures that you can build jsxe's installer in binary release distributions. jsxe module => jsxe/ treeview module (optional) => jsxe/jars/treeview sourceview module (optional) => jsxe/jars/sourceview + jsxe installer (optional) => jsxe/installer jsxe web module (optional) => web/ jsmooth ant task (optional) => buildlib/ @@ -23,7 +25,20 @@ <!-- {{{ ============ Initializes properties and variables ============= --> <target name="init"> <tstamp/> + <!-- {{{ app/build properties --> <property name="app.name" value="jsXe"/> + <property name="main.class" value="net.sourceforge.jsxe.jsXe"/> + <property name="major.version" value="0"/> + <property name="minor.version" value="5"/> + <property name="beta.version" value="3"/> + <property name="bugfix.version" value="0"/> + <property name="date.format" value="MM.dd.yyyy HH:mm:ss z"/> + <!-- Human Readable --> + <property name="app.version" value="0.5 pre3"/> + <!-- Used in filenames --> + <property name="app_version" value="05_pre3"/> + <!-- }}} --> + <!-- {{{ build directories --> <property name="root.dir" value="."/> <property name="build.dir" value="${root.dir}/build"/> <property name="src.dir" value="${root.dir}/src"/> @@ -39,41 +54,85 @@ <property name="build.docs" value="${build.dir}/doc"/> <property name="build.lib" value="${build.dir}/lib"/> <property name="build.bin" value="${build.dir}/bin"/> - <property name="date.format" value="MM.dd.yyyy HH:mm:ss z"/> - <property name="build.javadocs" value="${build.docs}/api"/> + <property name="build.javadocs" value="${build.dir}/api"/> <property name="build.help" value="${build.docs}/help"/> + <property name="buildlib.dir" value="${root.dir}/buildlib"/> + <!--<property name="app.version" value="${major.version}.${minor.version} beta"/>--> + <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> + <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> + <property name="distsrc.dir" value="${build.dir}/${app.name}-${app_version}-src"/> + <property name="jsmooth.project" value="${root.dir}/jsXe.jsmooth"/> + <property name="jsmooth.jar" value="${buildlib.dir}/jsmoothgen-ant.jar"/> + <!-- }}} --> + <!-- {{{ installer directories --> + <property name="installer.build.dir" value="${build.dir}/installer"/> + <property name="installer.program.dir" value="${installer.build.dir}/program"/> + <property name="installer.api.dir" value="${installer.build.dir}/api"/> + <property name="installer.treeview.dir" value="${installer.build.dir}/treeview"/> + <property name="installer.sourceview.dir" value="${installer.build.dir}/sourceview"/> + <property name="installer.build.src" value="${installer.build.dir}/src"/> + <property name="installer.build.dest" value="${installer.build.dir}/build"/> + <property name="install.props" value="${installer.build.dest}/installer/install.props"/> + <property name="installer.dir" value="${root.dir}/installer"/> + <!-- }}} --> + <!-- {{{ installer props --> + <property name="installer.main.class" value="installer.Install"/> + + <!-- files listed here are in the ${installer.dir} directory --> + <!-- TODO: labels should be put into a locale specific messages file --> + <property name="app.readme" value="readme.html"/> + <property name="app.license.title" value="GNU General Public License"/> + <property name="app.license" value="gpl.html"/> + <property name="ostask.unix-script.label" value="Install shortcut in:"/> + <property name="ostask.unix-man.label" value="Install manual page in:"/> + <!--<property name="ostask.unix-man.manpage" value="jsxe.1"/>--> + <property name="comp.count" value="4"/> + + <property name="comp.0.name" value="jsXe XML Editor"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.0.disk-size" value="7084"/> + <property name="comp.0.real-size" value="6073"/>--> + <property name="comp.0.fileset" value="jsxe-program"/> + <property name="installer.build.program.tar" value="${installer.build.dest}/installer/${comp.0.fileset}.tar.bz2"/> + + <property name="comp.1.name" value="Tree view (highly recommended)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.1.disk-size" value="7084"/> + <property name="comp.1.real-size" value="6073"/>--> + <property name="comp.1.fileset" value="jsxe-treeview"/> + <property name="installer.build.treeview.tar" value="${installer.build.dest}/installer/${comp.1.fileset}.tar.bz2"/> + + <property name="comp.2.name" value="Source view (highly recommended)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.2.disk-size" value="7084"/> + <property name="comp.2.real-size" value="6073"/>--> + <property name="comp.2.fileset" value="jsxe-sourceview"/> + <property name="installer.build.sourceview.tar" value="${installer.build.dest}/installer/${comp.2.fileset}.tar.bz2"/> + + <property name="comp.3.name" value="API documentation (for plugin development)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.3.disk-size" value="7084"/> + <property name="comp.3.real-size" value="6073"/>--> + <property name="comp.3.fileset" value="jsxe-api"/> + <property name="installer.build.api.tar" value="${installer.build.dest}/installer/${comp.3.fileset}.tar.bz2"/> + <!-- }}} --> + <!-- {{{ java build properties --> <property name="javac.debug" value="on"/> <property name="javac.optimize" value="off"/> <property name="javac.deprecation" value="on"/> <property name="javac.include.runtime" value="no"/> <property name="javac.source" value="1.3"/> + <!-- }}} --> + <!-- {{{ doc properties --> <property name="java.javadoc.link" value="http://java.sun.com/j2se/1.3/docs/api/"/> <property name="xerces.javadoc.link" value="http://xerces.apache.org/xerces2-j/javadocs/api/"/> - <property name="main.class" value="net.sourceforge.jsxe.jsXe"/> - <property name="major.version" value="0"/> - <property name="minor.version" value="5"/> - <property name="beta.version" value="3"/> - <property name="bugfix.version" value="0"/> - <!-- Human Readable --> - <property name="app.version" value="0.5 pre3"/> - <!-- Used in filenames --> - <property name="app_version" value="05_pre3"/> + <!-- }}} --> - <property name="buildlib.dir" value="${root.dir}/buildlib"/> - <property name="jsmooth.project" value="${root.dir}/jsXe.jsmooth"/> - <property name="jsmooth.jar" value="${buildlib.dir}/jsmoothgen-ant.jar"/> - - <condition property="windows.build"> - <and> - <os family="windows"/> - <available file="${jsmooth.jar}" property="jsmooth.avail"/> - </and> - </condition> - - <!--<property name="app.version" value="${major.version}.${minor.version} beta"/>--> - <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> - <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> - <property name="distsrc.dir" value="${build.dir}/${app.name}-${app_version}-src"/> + <!-- {{{ classpaths --> <path id="classpath"> <pathelement location="."/> <pathelement location="${build.dest}"/> @@ -90,14 +149,30 @@ <include name="**/*.jar"/> </fileset> </path> + <!-- }}} --> + <!-- {{{ conditionals --> + <available file="${jsmooth.jar}" property="jsmooth.avail"/> + <condition property="windows.build"> + <and> + <os family="windows"/> + <istrue value="${jsmooth.avail}"/> + </and> + </condition> + <!-- set whether we have the source for the default views --> + + <available file="${root.dir}/../web" property="web.avail"/> + <available file="${plugin.dir}" property="plugin.avail"/> <available file="${plugin.dir}/treeview/build.xml" property="treeview.avail"/> <available file="${plugin.dir}/sourceview/build.xml" property="sourceview.avail"/> - <available file="${root.dir}/../web" property="web.avail"/> - <available file="${plugin.dir}" property="plugin.avail"/> + <available classname="org.apache.bsf.BSFException" property="bsf.avail"/> + <available classname="org.mozilla.javascript.JavaScriptException" property="js.avail"/> + <available file="${installer.dir}" property="installer.avail"/> + <!-- }}} --> + <echo message="${app.name} ${app.version}"/> <echo message="----------------------------------------------------------"/> </target> @@ -279,12 +354,271 @@ <link href="${xerces.javadoc.link}"/> </javadoc> - <zip basedir="${build.docs}" includes="api/**" zipfile="${build.dir}/${app.name}-${app_version}-api.zip"/> + <zip basedir="${build.javadocs}" includes="**/*" zipfile="${build.dir}/${app.name}-${app_version}-api.zip"/> </target> <!-- }}} --> + <!-- {{{ ============ Builds the installer ============================= --> + <target depends="compile, prepare-build, doc" name="build-installer" description="Builds the installer"> + + <fail unless="js.avail" message="You must have the ${buildlib.dir}/js.jar in your classpath to build the installer. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="bsf.avail" message="You must have the ${buildlib.dir}/bsf.jar in your classpath to build the installer. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="treeview.avail" message="You must have the treeview source available to build the installer."/> + <fail unless="sourceview.avail" message="You must have the sourceview source available to build the installer."/> + + <!-- {{{ filesize script definition --> + <!-- taken from the ant manual + modified to get the total size of a directory structure + and set it to a property in Kb --> + <scriptdef name="filesize" language="javascript"> + <element name="fileset" type="fileset"/> + <attribute name="property"/> + <![CDATA[ + // import statements + // importPackage(java.io); + importClass(java.io.File); + + // Create a <fileset dir="" includes=""/> + filesets = elements.get("fileset"); + + for (i = 0; i < filesets.size(); i++) { + fs = filesets.get(i); + + // Get the files (array) of that fileset + ds = fs.getDirectoryScanner(project); + srcFiles = ds.getIncludedFiles(); + + size = 0; + // iterate over that array + for (i=0; i<srcFiles.length; i++) { + + // get the values via Java API + var basedir = fs.getDir(project); + var filename = srcFiles[i]; + var file = new File(basedir, filename); + + size += file.length(); + } + project.setNewProperty(attributes.get("property"), Math.round(size/1024)); + } + ]]> + </scriptdef> + <!-- }}} --> + + <!-- copy the installer source --> + <mkdir dir="${installer.build.dir}"/> + <copy todir="${installer.build.dir}"> + <fileset dir="${installer.dir}"> + <include name="**/*.java"/> + </fileset> + </copy> + + <!-- build the installer --> + <mkdir dir="${installer.build.dest}"/> + <javac debug="${javac.debug}" deprecation="${javac.deprecation}" includeJavaRuntime="${javac.include.runtime}" optimize="${javac.optimize}" source="${javac.source}" destdir="${installer.build.dest}" srcdir="${installer.build.src}"> + <include name="**/*.java"/> + </javac> + + <!-- copy html files --> + <copy todir="${installer.build.dest}/installer"> + <fileset dir="${installer.dir}"> + <include name="**/*.html"/> + </fileset> + </copy> + + <!-- {{{ create the program tar.bz2 file --> + + <mkdir dir="${installer.program.dir}"/> + + <mkdir dir="${installer.program.dir}/jars"/> + + <!-- doc --> + <mkdir dir="${installer.program.dir}/doc"/> + <copy todir="${installer.program.dir}/doc"> + <fileset dir="${build.docs}"> + <include name="**/*"/> + </fileset> + </copy> + + <!-- messages --> + <mkdir dir="${installer.program.dir}/messages"/> + <copy todir="${installer.program.dir}/messages"> + <fileset dir="${build.messages}"> + <include name="**/messages*"/> + </fileset> + </copy> + + <copy file="${build.dir}/${app.name}.jar" tofile="${installer.program.dir}/${app.name}.jar"/> + <!-- lib --> + <mkdir dir="${installer.program.dir}/lib"/> + <copy todir="${installer.program.dir}/lib"> + <fileset dir="${build.lib}"> + <include name="**/*"/> + </fileset> + </copy> + + <!-- create the windows exe --> + <antcall target="build-exe"/> + + <!-- create the tar.bz2 for the installer --> + <tar basedir="${installer.program.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-program.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-program.tar" destfile="${installer.build.program.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-program.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.0.disk-size"> + <fileset dir="${installer.program.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.0.real-size"> + <fileset file="${installer.build.program.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the treeview tar.bz2 file --> + + <mkdir dir="${installer.treeview.dir}"/> + <mkdir dir="${installer.treeview.dir}/jars"/> + <copy todir="${installer.treeview.dir}/jars" file="${build.plugin}/treeview.jar"/> + + <tar basedir="${installer.treeview.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-treeview.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-treeview.tar" destfile="${installer.build.treeview.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-treeview.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.1.disk-size"> + <fileset dir="${installer.treeview.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.1.real-size"> + <fileset file="${installer.build.treeview.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the sourceview tar.bz2 file --> + + <mkdir dir="${installer.sourceview.dir}"/> + <mkdir dir="${installer.sourceview.dir}/jars"/> + <copy todir="${installer.sourceview.dir}/jars" file="${build.plugin}/sourceview.jar"/> + + <tar basedir="${installer.sourceview.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-sourceview.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-sourceview.tar" destfile="${installer.build.sourceview.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-sourceview.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.2.disk-size"> + <fileset dir="${installer.sourceview.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.2.real-size"> + <fileset file="${installer.build.sourceview.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the api tar.bz2 file --> + + <mkdir dir="${installer.api.dir}"/> + <mkdir dir="${installer.api.dir}/api"/> + <copy todir="${installer.api.dir}/api"> + <fileset dir="${build.javadocs}"> + <include name="**/*"/> + </fileset> + </copy> + + <tar basedir="${installer.api.dir}" excludes="*.class" includes="api/**" tarfile="${installer.build.dir}/${app.name}-${app_version}-api.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-api.tar" destfile="${installer.build.api.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-api.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.3.disk-size"> + <fileset dir="${installer.api.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.3.real-size"> + <fileset file="${installer.build.api.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the install.props file --> + <propertyfile comment="${app.name}'s installer properties" file="${install.props}"> + <entry key="app.name" value="${app.name}"/> + <entry key="app.version" value="${app.version}"/> + <entry key="app.readme" value="${app.readme}"/> + <entry key="app.license.title" value="${app.license.title}"/> + <entry key="app.license" value="${app.license}"/> + <entry key="ostask.unix-script.label" value="${ostask.unix-script.label}"/> + <!--<entry key="ostask.unix-man.label" value="${ostask.unix-man.label}"/>--> + <entry key="comp.count" value="${comp.count}"/> + <entry key="comp.0.name" value="${comp.0.name}"/> + <entry key="comp.0.disk-size" value="${comp.0.disk-size}"/> + <entry key="comp.0.real-size" value="${comp.0.real-size}"/> + <entry key="comp.0.fileset" value="${comp.0.fileset}"/> + + <entry key="comp.1.name" value="${comp.1.name}"/> + <entry key="comp.1.disk-size" value="${comp.1.disk-size}"/> + <entry key="comp.1.real-size" value="${comp.1.real-size}"/> + <entry key="comp.1.fileset" value="${comp.1.fileset}"/> + + <entry key="comp.2.name" value="${comp.2.name}"/> + <entry key="comp.2.disk-size" value="${comp.2.disk-size}"/> + <entry key="comp.2.real-size" value="${comp.2.real-size}"/> + <entry key="comp.2.fileset" value="${comp.2.fileset}"/> + + <entry key="comp.3.name" value="${comp.3.name}"/> + <entry key="comp.3.disk-size" value="${comp.3.disk-size}"/> + <entry key="comp.3.real-size" value="${comp.3.real-size}"/> + <entry key="comp.3.fileset" value="${comp.3.fileset}"/> + </propertyfile> + <!-- }}} --> + + <!-- {{{ create the manifest --> + <manifest file="${installer.build.dir}/installer.manifest"> + <attribute name="Built-By" value="${user.name}"/> + <attribute name="Main-Class" value="${installer.main.class}"/> + <section name="common"> + <attribute name="Implementation-Title" value="${app.name}"/> + <attribute name="Implementation-Version" value="${app.version} ${TODAY}"/> + </section> + </manifest> + <!-- }}} --> + + <!-- {{{ create the install jar --> + <jar jarfile="${build.dir}/${app.name}-${app_version}-install.jar" manifest="${installer.build.dir}/installer.manifest"> + <fileset dir="${installer.build.dest}"> + <include name="**/*"/> + </fileset> + </jar> + <!-- }}} --> + + </target> + <target name="build-exe" if="windows.build"> + <taskdef name="jsmoothgen" + classname="net.charabia.jsmoothgen.ant.JSmoothGen" + classpath="${jsmooth.jar}"/> + + <jsmoothgen project="${jsmooth.project}" skeletonroot="${buildlib.dir}/skeletons"/> + <copy todir="${installer.program.dir}" file="${build.dir}/jsXe.exe"/> + </target> + <!-- }}} --> + <!-- {{{ ============ Generates a windows distribution ================= --> + <target depends="build-installer" name="win" if="windows.build" description="Build a windows distribution"> + + </target> + <!-- }}} --> <!-- {{{ ============ Generates the binary distribution ================ --> - <target depends="compile, prepare-build, doc" name="bin" description="Build binary distribution"> + <target depends="compile, prepare-build, doc" name="bin" description="Build binary distributions"> <!-- plugins --> <mkdir dir="${distbin.dir}/jars"/> @@ -301,6 +635,16 @@ <include name="**/*"/> </fileset> </copy> + + + <!-- api --> + <mkdir dir="${distbin.dir}/doc/api"/> + <copy todir="${distbin.dir}/doc/api"> + <fileset dir="${build.javadocs}"> + <include name="**/*"/> + </fileset> + </copy> + <!-- bin --> <mkdir dir="${distbin.dir}/bin"/> <copy todir="${distbin.dir}/bin"> @@ -326,18 +670,14 @@ </fileset> </copy> - <!-- build the windows executable --> - <antcall target="build-exe"/> - + <!-- create the zip distr --> <zip basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-bin/**" zipfile="${build.dir}/${app.name}-${app_version}-bin.zip"/> - </target> - <target name="build-exe" if="windows.build"> - <taskdef name="jsmoothgen" - classname="net.charabia.jsmoothgen.ant.JSmoothGen" - classpath="${jsmooth.jar}"/> - <jsmoothgen project="${jsmooth.project}" skeletonroot="${buildlib.dir}/skeletons"/> - <copy todir="${distbin.dir}" file="${build.dir}/jsXe.exe"/> + <!-- create the tar.bz2 distr --> + <tar basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-bin/**" tarfile="${build.dir}/${app.name}-${app_version}-bin.tar"/> + <bzip2 src="${build.dir}/${app.name}-${app_version}-bin.tar" destfile="${build.dir}/${app.name}-${app_version}-bin.tar.bz2"/> + <delete file="${build.dir}/${app.name}-${app_version}-bin.tar"/> + </target> <!-- }}} --> <!-- {{{ ============ Generates the source distribution ================ --> @@ -345,6 +685,7 @@ <antcall target="copy-treeview-source"/> <antcall target="copy-sourceview-source"/> + <antcall target="copy-installer-source"/> <!-- doc --> <mkdir dir="${distsrc.dir}/doc"/> @@ -354,6 +695,14 @@ </fileset> </copy> + <!-- api --> + <mkdir dir="${distsrc.dir}/doc/api"/> + <copy todir="${distsrc.dir}/doc/api"> + <fileset dir="${build.javadocs}"> + <include name="**/*"/> + </fileset> + </copy> + <!-- move these files to the root dir of the src distribution --> <move file="${distsrc.dir}/doc/COPYING" tofile="${distsrc.dir}/COPYING"/> <move file="${distsrc.dir}/doc/README" tofile="${distsrc.dir}/README"/> @@ -408,7 +757,14 @@ </fileset> </copy> + <!-- create the zip --> <zip basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-src/**" zipfile="${build.dir}/${app.name}-${app_version}-src.zip"/> + + <!-- create the tar.bz2 distr --> + <tar basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-src/**" tarfile="${build.dir}/${app.name}-${app_version}-src.tar"/> + <bzip2 src="${build.dir}/${app.name}-${app_version}-src.tar" destfile="${build.dir}/${app.name}-${app_version}-src.tar.bz2"/> + <delete file="${build.dir}/${app.name}-${app_version}-src.tar"/> + </target> <target name="copy-treeview-source" if="treeview.avail"> <copy todir="${distsrc.dir}/jars"> @@ -430,6 +786,13 @@ </fileset> </copy> </target> + <target name="copy-installer-source" if="installer.avail"> + <copy todir="${distsrc.dir}/installer"> + <fileset dir="${installer.dir}"> + <include name="**/*"/> + </fileset> + </copy> + </target> <!-- }}} --> <!-- {{{ ============ Deploys documentation to the web module ========== --> <target depends="doc" name="deploy-web-doc" if="web.avail" description="Deploy documentation to the web module"> Added: trunk/jsxe/buildlib/bsf.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/bsf.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/buildlib/js.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/js.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/installer/done-HalfAnOS.html =================================================================== --- trunk/jsxe/installer/done-HalfAnOS.html (rev 0) +++ trunk/jsxe/installer/done-HalfAnOS.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,8 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jEdit, run the <tt>jsxe.cmd</tt> script located in the +installation directory. + +</body></html> Property changes on: trunk/jsxe/installer/done-HalfAnOS.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/done-MacOS.html =================================================================== --- trunk/jsxe/installer/done-MacOS.html (rev 0) +++ trunk/jsxe/installer/done-MacOS.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,12 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jsXe, run the <tt>jsxe</tt> command in a terminal window: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jsxe <i>filename</i> ...</td></tt></tr></table> + +To find out about supported command-line options, run: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jsxe --help</tt></td></tr></table> +</body></html> Property changes on: trunk/jsxe/installer/done-MacOS.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/done-Unix.html =================================================================== --- trunk/jsxe/installer/done-Unix.html (rev 0) +++ trunk/jsxe/installer/done-Unix.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,12 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jsXe, run the <tt>jedit</tt> command in a terminal window: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jsxe <i>filename</i> ...</td></tt></tr></table> + +To find out about supported command-line options, run: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jsxe --help</tt></td></tr></table> +</body></html> Property changes on: trunk/jsxe/installer/done-Unix.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/done-VMS.html =================================================================== --- trunk/jsxe/installer/done-VMS.html (rev 0) +++ trunk/jsxe/installer/done-VMS.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,13 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jsXe, run the following command in a terminal window: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> java -jar <i>disk</i>:[<i>dir</i>]jsXe.jar <i>filename</i> ...</td></tt></tr></table> + +To find out about supported command-line options, run: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> java -jar <i>disk</i>:[<i>dir</i>]jsXe.jar --help</td></tt></tr></table> + +</body></html> Property changes on: trunk/jsxe/installer/done-VMS.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/done-Windows.html =================================================================== --- trunk/jsxe/installer/done-Windows.html (rev 0) +++ trunk/jsxe/installer/done-Windows.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,7 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jsXe, double-click on <code>jsXe.exe</code> in the jsXe installation directory. + +</body></html> Property changes on: trunk/jsxe/installer/done-Windows.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/gpl.html =================================================================== --- trunk/jsxe/installer/gpl.html (rev 0) +++ trunk/jsxe/installer/gpl.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,471 @@ +<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> +<HTML> +<HEAD> +<TITLE>GNU General Public License - GNU Project - Free Software Foundation (FSF)</TITLE> +</HEAD> +<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD"> + +Version 2, June 1991<p> + +<code> +Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br> +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA<p> + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +</code> + + + +<H2>Preamble</H2> + +<P> + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + +</P> +<P> + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + +</P> +<P> + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + +</P> +<P> + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + +</P> +<P> + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + +</P> +<P> + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + +</P> +<P> + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + +</P> +<P> + The precise terms and conditions for copying, distribution and +modification follow. + +</P> + + +<H2>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</H2> + + +<P> + +<STRONG>0.</STRONG> + This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". +<P> + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + +<P> + +<STRONG>1.</STRONG> + You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. +<P> + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. +<P> + +<STRONG>2.</STRONG> + You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: +<P> + +<UL> + +<LI><STRONG>a)</STRONG> + You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + +<P> +<LI><STRONG>b)</STRONG> + You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + +<P> +<LI><STRONG>c)</STRONG> + If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +</UL> + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. +<P> + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. +<P> + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +<P> + +<STRONG>3.</STRONG> + You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + +<!-- we use this doubled UL to get the sub-sections indented, --> +<!-- while making the bullets as unobvious as possible. --> +<UL> + +<LI><STRONG>a)</STRONG> + Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + +<P> +<LI><STRONG>b)</STRONG> + Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + +<P> +<LI><STRONG>c)</STRONG> + Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) +</UL> + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. +<P> + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. +<P> + +<STRONG>4.</STRONG> + You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + +<P> + +<STRONG>5.</STRONG> + You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +<P> + +<STRONG>6.</STRONG> + Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +<P> + +<STRONG>7.</STRONG> + If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. +<P> + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. +<P> + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. +<P> + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +<P> + +<STRONG>8.</STRONG> + If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + +<P> + +<STRONG>9.</STRONG> + The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. +<P> + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + +<P> + + +<STRONG>10.</STRONG> + If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + + +<P><STRONG>NO WARRANTY</STRONG></P> + +<P> + +<STRONG>11.</STRONG> + BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + +<P> + +<STRONG>12.</STRONG> + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +<P> + +<!-- +<H2>END OF TERMS AND CONDITIONS</H2> + + + +<H2>How to Apply These Terms to Your New Programs</H2> + +<P> + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + +</P> +<P> + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + +</P> + +<code> +<VAR>one line to give the program's name and an idea of what it does.</VAR> +Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR> + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +</code> + +<P> +Also add information on how to contact you by electronic and paper mail. + +</P> +<P> +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + +</P> + +<code> +Gnomovision version 69, Copyright (C) <VAR>year</VAR> <VAR>name of author</VAR><p> +Gnomovision comes with ABSOLUTELY NO WARRANTY; for details +type `show w'. This is free software, and you are welcome +to redistribute it under certain conditions; type `show c' +for details. +</code> + +<P> +The hypothetical commands <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP> should show +the appropriate parts of the General Public License. Of course, the +commands you use may be called something other than <SAMP>`show w'</SAMP> and +<SAMP>`show c'</SAMP>; they could even be mouse-clicks or menu items--whatever +suits your program. + +</P> +<P> +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + +</P> + +<code> +Yoyodyne, Inc., hereby disclaims all copyright +interest in the program `Gnomovision' +(which makes passes at compilers) written +by James Hacker.<p> + +<VAR>signature of Ty Coon</VAR>, 1 April 1989 +Ty Coon, President of Vice +</code> + +<P> +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. +--> +</BODY> +</HTML> Property changes on: trunk/jsxe/installer/gpl.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/readme.html =================================================================== --- trunk/jsxe/installer/readme.html (rev 0) +++ trunk/jsxe/installer/readme.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,25 @@ +<html> +<body> + +Simply fill out the required +information at each screen and click <b>Next</b>. Once all installation +parameters have been specified, the <b>Next</b> button changes to +read <b>Install</b>. Clicking it will then begin the installation +process.<p> + +The <b>Cancel</b> button will quit the installer without installing +anything; <b>Previous</b> will take you to the previous screen +(use it if you change your mind about a setting). + +<hr> + +jsXe is free software, released under the terms of the GNU General +Public License. The full text of the license is shown in the next page +of the installer.<p> + +Several class libraries bundled with jsXe are have other +licenses; once jsXe is installed, see the <code>README</code> +file for details. + +</body> +</html> Property changes on: trunk/jsxe/installer/readme.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/src/installer/BZip2Constants.java =================================================================== --- trunk/jsxe/installer/src/installer/BZip2Constants.java (rev 0) +++ trunk/jsxe/installer/src/installer/BZip2Constants.java 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,84 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE.txt file. + */ +package installer; + +/** + * Base class for both the compress and decompress classes. Holds common arrays, + * and static data. + * + * @author <a href="mailto:ke...@af...">Keiron Liddle</a> + */ +interface BZip2Constants +{ + int BASE_BLOCK_SIZE = 100000; + int MAX_ALPHA_SIZE = 258; + int MAX_CODE_LEN = 23; + int RUNA = 0; + int RUNB = 1; + int N_GROUPS = 6; + int G_SIZE = 50; + int N_ITERS = 4; + int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) ); + int NUM_OVERSHOOT_BYTES = 20; + + int[] RAND_NUMS = new int[] + { + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, + 936, 638 + }; +} Property changes on: trunk/jsxe/installer/src/installer/BZip2Constants.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/src/installer/CBZip2InputStream.java =================================================================== --- trunk/jsxe/installer/src/installer/CBZip2InputStream.java (rev 0) +++ trunk/jsxe/installer/src/installer/CBZip2InputStream.java 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,953 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE.txt file. + */ +package installer; + +import java.io.IOException; +import java.io.InputStream; + +/** + * An input stream that decompresses from the BZip2 format (without the file + * header chars) to be read as any other stream. + * + * @author <a href="mailto:ke...@af...">Keiron Liddle</a> + */ +public class CBZip2InputStream + extends InputStream + implements BZip2Constants +{ + private static final int START_BLOCK_STATE = 1; + private static final int RAND_PART_A_STATE = 2; + private static final int RAND_PART_B_STATE = 3; + private static final int RAND_PART_C_STATE = 4; + private static final int NO_RAND_PART_A_STATE = 5; + private static final int NO_RAND_PART_B_STATE = 6; + private static final int NO_RAND_PART_C_STATE = 7; + + private CRC m_crc = new CRC(); + private boolean[] m_inUse = new boolean[ 256 ]; + private char[] m_seqToUnseq = new char[ 256 ]; + private char[] m_unseqToSeq = new char[ 256 ]; + private char[] m_selector = new char[ MAX_SELECTORS ]; + private char[] m_selectorMtf = new char[ MAX_SELECTORS ]; + + /* + * freq table collected to save a pass over the data + * during decompression. + */ + private int[] m_unzftab = new int[ 256 ]; + + private int[][] m_limit = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ]; + private int[][] m_base = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ]; + private int[][] m_perm = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ]; + private int[] m_minLens = new int[ N_GROUPS ]; + + private boolean m_streamEnd; + private int m_currentChar = -1; + + private int m_currentState = START_BLOCK_STATE; + private int m_rNToGo; + private int m_rTPos; + private int m_tPos; + + private int i2; + private int count; + private int chPrev; + private int ch2; + private int j2; + private char z; + + private boolean m_blockRandomised; + + /* + * always: in the range 0 .. 9. + * The current block size is 100000 * this number. + */ + private int m_blockSize100k; + private int m_bsBuff; + private int m_bsLive; + + private InputStream m_inp... [truncated message content] |