[Jsxe-cvs] SF.net SVN: jsxe: [1146] trunk/jsxe
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-08-13 04:07:28
|
Revision: 1146 Author: ian_lewis Date: 2006-08-12 21:07:13 -0700 (Sat, 12 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1146&view=rev Log Message: ----------- merge from the 05pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/INSTALL trunk/jsxe/build.xml trunk/jsxe/installer/src/installer/OperatingSystem.java trunk/jsxe/messages/messages.ja Added Paths: ----------- trunk/jsxe/installer/jsxe-installer.ico trunk/jsxe/installer/jsxe.desktop trunk/jsxe/installer/jsxe.png trunk/jsxe/installer/launch4j.xml trunk/jsxe/jsxe.ico trunk/jsxe/launch4j.xml Removed Paths: ------------- trunk/jsxe/buildlib/jsmoothgen-ant.jar trunk/jsxe/buildlib/skeletons/ trunk/jsxe/jsXe.jsmooth Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/Changelog 2006-08-13 04:07:13 UTC (rev 1146) @@ -1,3 +1,11 @@ +08/12/2006 Ian Lewis <Ian...@me...> + + * Added support for running jsXe in a wrapped exe using launch4j. + * Added an installer for jsXe. The installer can be packaged in an exe for + easy use by windows users. + * Moved the windows integration into it's own component in the installer so + that it won't be installed on systems other than Windows. + 08/09/2006 Ian Lewis <Ian...@me...> * Added a new option to the Global Options dialog for the number of undo Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/INSTALL 2006-08-13 04:07:13 UTC (rev 1146) @@ -2,6 +2,7 @@ Java 1.4.2 Xerces 2.8.0 +launch4j (for building the installer from source) GETTING jsXe @@ -13,17 +14,32 @@ Once you have the source trees for both of these you should put them in a directory called 'jars' in your jsXe root folder. Once they are in that folder, the ant targets (compile, bin, src, etc.) will recognise those plugins and build -them if necessary. So something like this should do it: +them if necessary. -cvs checkout jsxe +You should check out jsxe to make a structure like this. This ensures that +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/ +launch4j (needed for win builds) => buildlib/launch4j + +So something like this should do it: + +svn checkout https://svn.sourceforge.net/svnroot/jsxe/trunk/jsxe cd jsxe mkdir jars cd jars -cvs checkout treeview -cvs checkout sourceview +svn checkout https://svn.sourceforge.net/svnroot/jsxe/trunk/treeview +svn checkout https://svn.sourceforge.net/svnroot/jsxe/trunk/sourceview BUILDING jsXe FROM SOURCE +** Requirements ** + This is pretty simple. You will need jakarta ANT and a Sun's javac compiler (others might work, I just haven't tested them). You will need the optional ant tasks installed as well. On some Linux distributions this may be a separate @@ -38,13 +54,30 @@ (where you installed jsXe's source) or in the jre/lib/ext or lib/ext in your JVM. These jar files will be included with jsXe distributions for convenience. -Simply typing 'ant' in jsXe's root directory will give you the +In order to build jsXe's installer or a windows distribution of jsXe you will +need to install launch4j (http://launch4j.sourceforge.net/). You can install it +in the buildlib directory or change the launch4j.dir property in the build.xml +file. You will also need to put the js.jar and bsf.jar in your classpath. These +files are found in the 'buildlib' directory. They are used in scripts for +calculating file sizes. + +** Building ** + +Simply typing 'ant -p' in jsXe's root directory will give you the available targets to use with ant. To just simply compile jsXe and the default views to a jar file you can type 'ant compile'. To build a binary distribution you will need to run the 'bin' target in the build.xml file. I do this by simply typing 'ant bin'. Source distributions can be built using the 'src' target by typing 'ant src'. +You can build jsXe's installer by running 'ant build-installer' which will +build jsXe's installer. The installer will be packaged in a jar file to be run +by java. + +You can build a windows distribution of jsXe by running the 'ant win'. This will +compile jsXe's installer and wrap it in an exe wrapper. The wrapper will search +for the appropriate java runtime with which to run jsXe. + INSTALLING jsXe Unpack the distribution file wherever you like. Normally you would install it @@ -52,14 +85,14 @@ RUNNING jsXe -You should have 1.4.2 or better of java and you need 2.6.2 of Xerces. +You should have 1.4.2 or better of java and you need 2.8.0 of Xerces. *Windows* Just run jsXe using the jsXe.exe in the install directory. The exe will detect your version of Java and run jsXe using that version. -*Unix* +*Unix/Linux* To run jsXe you should just run the java interpreter on the jsXe.jar file. There is a shell script or batch file included in the source tree for this purpose. Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/build.xml 2006-08-13 04:07:13 UTC (rev 1146) @@ -15,10 +15,10 @@ sourceview module (optional) => jsxe/jars/sourceview jsxe installer (optional) => jsxe/installer jsxe web module (optional) => web/ - jsmooth ant task (optional) => buildlib/ + launch4j (needed for win builds) => buildlib/launch4j --> -<project basedir="." default="usage" name="jsXe"> +<project basedir="." default="compile" name="jsXe"> <description>jsXe - Java Simple XML Editor</description> @@ -48,6 +48,12 @@ <property name="build.messages" value="${build.dir}/messages"/> <property name="docs.dir" value="${src.dir}/doc"/> <property name="plugin.dir" value="${root.dir}/jars"/> + <property name="jsxe.jar" value="${build.dir}/${app.name}.jar"/> + <!-- jar file needs to be relative to the exe --> + <property name="launch4j.jsxe.jar" value="${app.name}.jar"/> + <property name="jsxe.exe" value="${build.dir}/${app.name}.exe"/> + <!-- launch4j doesn't like the ./ in the front of the path --> + <property name="launch4j.jsxe.exe" value="build/${app.name}.exe"/> <property name="build.plugin" value="${build.dir}/jars"/> <property name="build.src" value="${build.dir}/src"/> <property name="build.dest" value="${build.dir}/classes"/> @@ -61,8 +67,9 @@ <!--<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"/> + <property name="launch4j.dir" value="${buildlib.dir}/launch4j"/> + <property name="launch4j.config" value="${root.dir}/launch4j.xml"/> + <property name="launch4j.classpath" value="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar"/> <!-- }}} --> <!-- {{{ installer directories --> <property name="installer.build.dir" value="${build.dir}/installer"/> @@ -70,10 +77,16 @@ <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.win.dir" value="${installer.build.dir}/win"/> + <property name="installer.gnome.dir" value="${installer.build.dir}/gnome"/> <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"/> + <property name="installer.launch4j.config" value="${installer.dir}/launch4j.xml"/> + <!-- launch4j doesn't like the ./ in the front of the path --> + <property name="installer.jar" value="build/${app.name}-${app_version}-install.jar"/> + <property name="installer.exe" value="build/${app.name}-${app_version}-install.exe"/> <!-- }}} --> <!-- {{{ installer props --> <property name="installer.main.class" value="installer.Install"/> @@ -85,8 +98,12 @@ <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-desktop.label" value="Install desktop launchers in:"/> + <property name="ostask.unix-desktop.shortcut" value="jsxe.desktop"/> + <property name="ostask.unix-desktop.pixmap" value="jsxe.png"/> + <!--<property name="ostask.unix-man.manpage" value="jsxe.1"/>--> - <property name="comp.count" value="4"/> + <property name="comp.count" value="5"/> <property name="comp.0.name" value="jsXe XML Editor"/> <!-- size values are set by the filesize task in the @@ -119,6 +136,15 @@ <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"/> + + <property name="comp.4.name" value="Windows Integration (highly recommended)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.4.disk-size" value="7084"/> + <property name="comp.4.real-size" value="6073"/>--> + <property name="comp.4.fileset" value="jsxe-win"/> + <property name="comp.4.os" value="Windows"/> + <property name="installer.build.win.tar" value="${installer.build.dest}/installer/${comp.4.fileset}.tar.bz2"/> <!-- }}} --> <!-- {{{ java build properties --> <property name="javac.debug" value="on"/> @@ -144,7 +170,7 @@ </path> <path id="run-classpath"> - <pathelement location="${build.dir}/${app.name}.jar"/> + <pathelement location="${jsxe.jar}"/> <fileset dir="${lib.dir}"> <include name="**/*.jar"/> </fileset> @@ -152,13 +178,6 @@ <!-- }}} --> <!-- {{{ 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 --> @@ -166,6 +185,7 @@ <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="${launch4j.dir}" property="launch4j.avail"/> <available classname="org.apache.bsf.BSFException" property="bsf.avail"/> <available classname="org.mozilla.javascript.JavaScriptException" property="js.avail"/> @@ -177,21 +197,6 @@ <echo message="----------------------------------------------------------"/> </target> <!-- }}} --> - <!-- {{{ ============ Prints the available targets ===================== --> - <target depends="init" name="usage" description="Prints available targets"> - <echo message=" available targets are:"/> - <echo message=""/> - <echo message=" compile --> generates the ${app.name}.jar file."/> - <echo message=" also generates the jars for the tree view"/> - <echo message=" and source view plugins if available."/> - <echo message=" bin --> generates a binary distribution"/> - <echo message=" src --> generates a source distribution"/> - <echo message=" doc --> generates all documentation"/> - <echo message=" also updates the web api if the web module"/> - <echo message=" is available."/> - <echo message=" clean --> cleans everything up"/> - </target> - <!-- }}} --> <!-- {{{ ============ Prepares for any type of build =================== --> <target depends="init" name="prepare"> <mkdir dir="${build.dir}"/> @@ -247,6 +252,7 @@ <classpath refid="classpath"/> <include name="**/*.java"/> </javac> + <copy todir="${build.dest}"> <fileset dir="${build.src}"> <include name="**/*.props"/> @@ -280,7 +286,7 @@ </section> </manifest> - <jar jarfile="${build.dir}/${app.name}.jar" manifest="${build.dir}/${app.name}.manifest"> + <jar jarfile="${jsxe.jar}" manifest="${build.dir}/${app.name}.manifest"> <fileset dir="${build.dest}"> <include name="**/*.class"/> <include name="**/properties"/> @@ -361,8 +367,9 @@ <!-- {{{ ============ 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="js.avail" message="You must have the ${buildlib.dir}/js.jar in your classpath to build the installer. It is located in the ${buildlib.dir} directory. 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. It is located in the ${buildlib.dir} directory. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="launch4j.avail" message="You must install launch4j in ${launch4j.dir} or change the launch4j.dir property in build.xml"/> <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."/> @@ -399,7 +406,13 @@ size += file.length(); } - project.setNewProperty(attributes.get("property"), Math.round(size/1024)); + + roundedSize = Math.round(size/1024); + + echo = project.createTask("echo"); + echo.setMessage("Size: "+roundedSize+"Kb"); + echo.perform(); + project.setNewProperty(attributes.get("property"), roundedSize); } ]]> </scriptdef> @@ -422,10 +435,18 @@ <!-- copy html files --> <copy todir="${installer.build.dest}/installer"> <fileset dir="${installer.dir}"> - <include name="**/*.html"/> + <include name="*.html"/> </fileset> </copy> + <!-- copy other files --> + <copy todir="${installer.build.dest}"> + <fileset dir="${installer.dir}"> + <exclude name="*.html"/> + <include name="*"/> + </fileset> + </copy> + <!-- {{{ create the program tar.bz2 file --> <mkdir dir="${installer.program.dir}"/> @@ -448,7 +469,7 @@ </fileset> </copy> - <copy file="${build.dir}/${app.name}.jar" tofile="${installer.program.dir}/${app.name}.jar"/> + <copy file="${jsxe.jar}" todir="${installer.program.dir}"/> <!-- lib --> <mkdir dir="${installer.program.dir}/lib"/> <copy todir="${installer.program.dir}/lib"> @@ -457,9 +478,6 @@ </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}"/> @@ -551,6 +569,47 @@ <!-- }}} --> + <!-- {{{ create the win tar.bz2 file --> + + <!-- copy the lib directory so that the jsXe.exe can be run + from the build dir --> + <mkdir dir="${build.dir}/lib"/> + <copy todir="${build.dir}/lib"> + <fileset dir="${build.lib}"> + <include name="**/*"/> + </fileset> + </copy> + + <!-- create the windows exe --> + <taskdef name="launch4j" + classname="net.sf.launch4j.ant.Launch4jTask" + classpath="${launch4j.classpath}"/> + + <launch4j configFile="${launch4j.config}" + outfile="${launch4j.jsxe.exe}" + jarPath="${launch4j.jsxe.jar}" + /> + + <mkdir dir="${installer.win.dir}"/> + <copy file="${jsxe.exe}" todir="${installer.win.dir}" /> + + <tar basedir="${installer.win.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-win.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-win.tar" destfile="${installer.build.win.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-win.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.4.disk-size"> + <fileset dir="${installer.win.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.4.real-size"> + <fileset file="${installer.build.win.tar}"/> + </filesize> + + <!-- }}} --> + <!-- {{{ create the install.props file --> <propertyfile comment="${app.name}'s installer properties" file="${install.props}"> <entry key="app.name" value="${app.name}"/> @@ -559,6 +618,10 @@ <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-desktop.label" value="${ostask.unix-desktop.label}"/> + <entry key="ostask.unix-desktop.pixmap" value="${ostask.unix-desktop.pixmap}"/> + <entry key="ostask.unix-desktop.shortcut" value="${ostask.unix-desktop.shortcut}"/> + <!--<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}"/> @@ -580,6 +643,13 @@ <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}"/> + + <entry key="comp.4.name" value="${comp.4.name}"/> + <entry key="comp.4.disk-size" value="${comp.4.disk-size}"/> + <entry key="comp.4.real-size" value="${comp.4.real-size}"/> + <entry key="comp.4.fileset" value="${comp.4.fileset}"/> + <entry key="comp.4.os" value="${comp.4.os}"/> + </propertyfile> <!-- }}} --> @@ -595,7 +665,7 @@ <!-- }}} --> <!-- {{{ create the install jar --> - <jar jarfile="${build.dir}/${app.name}-${app_version}-install.jar" manifest="${installer.build.dir}/installer.manifest"> + <jar jarfile="${installer.jar}" manifest="${installer.build.dir}/installer.manifest"> <fileset dir="${installer.build.dest}"> <include name="**/*"/> </fileset> @@ -603,18 +673,16 @@ <!-- }}} --> </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 depends="build-installer" name="win" description="Build a windows distribution"> + <taskdef name="launch4j" + classname="net.sf.launch4j.ant.Launch4jTask" + classpath="${launch4j.classpath}"/> + <launch4j configFile="${installer.launch4j.config}" + jar="${installer.jar}" + outfile="${installer.exe}"/> </target> <!-- }}} --> <!-- {{{ ============ Generates the binary distribution ================ --> @@ -661,7 +729,7 @@ </fileset> </copy> - <copy file="${build.dir}/${app.name}.jar" tofile="${distbin.dir}/${app.name}.jar"/> + <copy file="${jsxe.jar}" todir="${distbin.dir}"/> <!-- lib --> <mkdir dir="${distbin.dir}/lib"/> <copy todir="${distbin.dir}/lib"> @@ -695,7 +763,7 @@ </fileset> </copy> - <!-- api --> + <!-- api --> <mkdir dir="${distsrc.dir}/doc/api"/> <copy todir="${distsrc.dir}/doc/api"> <fileset dir="${build.javadocs}"> @@ -747,7 +815,7 @@ <include name="**/*"/> </fileset> </copy> - <copy todir="${distsrc.dir}" file="${jsmooth.project}"/> + <copy todir="${distsrc.dir}" file="${launch4j.config}"/> <!-- messages --> <mkdir dir="${distsrc.dir}/messages"/> Deleted: trunk/jsxe/buildlib/jsmoothgen-ant.jar =================================================================== (Binary files differ) Copied: trunk/jsxe/installer/jsxe-installer.ico (from rev 1144, tags/05pre3/jsxe/installer/jsxe-installer.ico) =================================================================== (Binary files differ) Copied: trunk/jsxe/installer/jsxe.desktop (from rev 1144, tags/05pre3/jsxe/installer/jsxe.desktop) =================================================================== --- trunk/jsxe/installer/jsxe.desktop (rev 0) +++ trunk/jsxe/installer/jsxe.desktop 2006-08-13 04:07:13 UTC (rev 1146) @@ -0,0 +1,14 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=jsXe XML Editor +Name[ja]=jsXe XML エディタ +GenericName=XML Editor +GenericName[ja]= +Comment=Edit XML Documents +Comment[ja]= +Exec=jsxe +Icon=jsxe.png +StartupNotify=true +Terminal=false +Type=Application +Categories=GNOME;Application;Utility; \ No newline at end of file Copied: trunk/jsxe/installer/jsxe.png (from rev 1144, tags/05pre3/jsxe/installer/jsxe.png) =================================================================== (Binary files differ) Copied: trunk/jsxe/installer/launch4j.xml (from rev 1144, tags/05pre3/jsxe/installer/launch4j.xml) =================================================================== --- trunk/jsxe/installer/launch4j.xml (rev 0) +++ trunk/jsxe/installer/launch4j.xml 2006-08-13 04:07:13 UTC (rev 1146) @@ -0,0 +1,20 @@ +<launch4jConfig> + <dontWrapJar>false</dontWrapJar> + <headerType>0</headerType> + <jar>..\build\jsXe-05_pre3-install.jar</jar> + <outfile>..\build\jsxe-installer.exe</outfile> + <errTitle>jsXe Installer</errTitle> + <jarArgs></jarArgs> + <chdir></chdir> + <customProcName>true</customProcName> + <stayAlive>false</stayAlive> + <icon>jsxe-installer.ico</icon> + <jre> + <path></path> + <minVersion>1.4.2</minVersion> + <maxVersion></maxVersion> + <initialHeapSize>16</initialHeapSize> + <maxHeapSize>64</maxHeapSize> + <args></args> + </jre> +</launch4jConfig> \ No newline at end of file Modified: trunk/jsxe/installer/src/installer/OperatingSystem.java =================================================================== --- trunk/jsxe/installer/src/installer/OperatingSystem.java 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/installer/src/installer/OperatingSystem.java 2006-08-13 04:07:13 UTC (rev 1146) @@ -22,321 +22,372 @@ */ public abstract class OperatingSystem { - public abstract String getInstallDirectory(String name, String version); + public abstract String getInstallDirectory(String name, String version); - public abstract static class OSTask - { - protected Install installer; - protected String name; - protected String label; - protected String directory; - protected boolean enabled; + public abstract static class OSTask + { + protected Install installer; + protected String name; + protected String label; + protected String directory; + protected boolean enabled; - public OSTask(Install installer, String name) - { - this.installer = installer; - this.name = name; - this.label = installer.getProperty("ostask." + name + ".label"); - this.directory = getDefaultDirectory(installer); + public OSTask(Install installer, String name) + { + this.installer = installer; + this.name = name; + this.label = installer.getProperty("ostask." + name + ".label"); + this.directory = getDefaultDirectory(installer); - // on by default - enabled = true; - } + // on by default + enabled = true; + } - public String getName() - { - return name; - } + public String getName() + { + return name; + } - public String getLabel() - { - return label; - } + public String getLabel() + { + return label; + } - public String getDefaultDirectory(Install installer) - { - return null; - } + public String getDefaultDirectory(Install installer) + { + return null; + } - public String getDirectory() - { - return directory; - } + public String getDirectory() + { + return directory; + } - public boolean isEnabled() - { - return enabled; - } + public boolean isEnabled() + { + return enabled; + } - public void setEnabled(boolean enabled) - { - this.enabled = enabled; - } + public void setEnabled(boolean enabled) + { + this.enabled = enabled; + } - public void setDirectory(String directory) - { - this.directory = directory; - } + public void setDirectory(String directory) + { + this.directory = directory; + } - public abstract void perform(String installDir, - Vector filesets) throws IOException; - } + public abstract void perform(String installDir, + Vector filesets) throws IOException; + } - public OSTask[] getOSTasks(Install installer) - { - return new OSTask[0]; - } + public OSTask[] getOSTasks(Install installer) + { + return new OSTask[0]; + } - public void mkdirs(String directory) throws IOException - { - File file = new File(directory); - if(!file.exists()) - file.mkdirs(); - } + public void mkdirs(String directory) throws IOException + { + File file = new File(directory); + if(!file.exists()) + file.mkdirs(); + } - public static OperatingSystem getOperatingSystem() - { - if(os != null) - return os; + public static OperatingSystem getOperatingSystem() + { + if(os != null) + return os; - if(System.getProperty("mrj.version") != null) - os = new MacOS(); - else - { - String osName = System.getProperty("os.name"); - if(osName.indexOf("Windows") != -1) - os = new Windows(); - else if(osName.indexOf("OS/2") != -1) - os = new HalfAnOS(); - else if(osName.indexOf("VMS") != -1) - os = new VMS(); - else - os = new Unix(); - } + if(System.getProperty("mrj.version") != null) + os = new MacOS(); + else + { + String osName = System.getProperty("os.name"); + if(osName.indexOf("Windows") != -1) + os = new Windows(); + else if(osName.indexOf("OS/2") != -1) + os = new HalfAnOS(); + else if(osName.indexOf("VMS") != -1) + os = new VMS(); + else + os = new Unix(); + } - return os; - } + return os; + } - public static class Unix extends OperatingSystem - { - public String getInstallDirectory(String name, String version) - { - String dir = "/usr/local/share/"; - if(!new File(dir).canWrite()) - dir = System.getProperty("user.home"); + public static class Unix extends OperatingSystem + { + public String getInstallDirectory(String name, String version) + { + String dir = "/usr/local/share/"; + if(!new File(dir).canWrite()) + dir = System.getProperty("user.home"); - return new File(dir,name.toLowerCase() + "/" + version).getPath(); - } + return new File(dir,name.toLowerCase() + "/" + version).getPath(); + } - public class ScriptOSTask extends OSTask - { - public ScriptOSTask(Install installer) - { - super(installer,"unix-script"); - } + public class ScriptOSTask extends OSTask + { + public ScriptOSTask(Install installer) + { + super(installer,"unix-script"); + } - public String getDefaultDirectory(Install installer) - { - String dir = "/usr/local/"; - if(!new File(dir).canWrite()) - dir = System.getProperty("user.home"); + public String getDefaultDirectory(Install installer) + { + String dir = "/usr/local/"; + if(!new File(dir).canWrite()) + dir = System.getProperty("user.home"); - return new File(dir,"bin").getPath(); - } + return new File(dir,"bin").getPath(); + } - public void perform(String installDir, - Vector filesets) throws IOException - { - if(!enabled) - return; + public void perform(String installDir, + Vector filesets) throws IOException + { + if(!enabled) + return; - mkdirs(directory); + mkdirs(directory); - String name = installer.getProperty("app.name"); + String name = installer.getProperty("app.name"); + + //jsxe specific: this is needed for java to load our xerces rather + // than the one included with java. + String vmArgs = "-Djava.endorsed.dirs=\""+installDir + File.separator+"lib\""; - // create app start script - String script = directory + File.separatorChar - + name.toLowerCase(); + // create app start script + String script = directory + File.separatorChar + + name.toLowerCase(); - // Delete existing copy - new File(script).delete(); + // Delete existing copy + new File(script).delete(); - // Write simple script - FileWriter out = new FileWriter(script); - out.write("#!/bin/sh\n"); - out.write("# Java heap size, in megabytes\n"); - out.write("JAVA_HEAP_SIZE=32\n"); - out.write("DEFAULT_JAVA_HOME=\"" - + System.getProperty("java.home") - + "\"\n"); - out.write("if [ \"$JAVA_HOME\" = \"\" ]; then\n"); - out.write("JAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n"); - out.write("fi\n"); + // Write simple script + FileWriter out = new FileWriter(script); + out.write("#!/bin/sh\n"); + out.write("# Java heap size, in megabytes\n"); + out.write("JAVA_HEAP_SIZE=32\n"); + out.write("DEFAULT_JAVA_HOME=\"" + + System.getProperty("java.home") + + "\"\n"); + out.write("if [ \"$JAVA_HOME\" = \"\" ]; then\n"); + out.write("JAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n"); + out.write("fi\n"); - out.write("exec \"$JAVA_HOME" - + "/bin/java\" -mx${JAVA_HEAP_SIZE}m ${" - + name.toUpperCase() + "} "); + out.write("exec \"$JAVA_HOME" + + "/bin/java\" -mx${JAVA_HEAP_SIZE}m "+vmArgs+" ${" + + name.toUpperCase() + "} "); - String jar = installDir + File.separator - + name.toLowerCase() + ".jar"; + // String jar = installDir + File.separator + // + name.toLowerCase() + ".jar"; + + String jar = installDir + File.separator + + name + ".jar"; - out.write("-jar \"" + jar + "\" $@\n"); + out.write("-jar \"" + jar + "\" $@\n"); - out.close(); + out.close(); - // Make it executable - String[] chmodArgs = { "chmod", "755", script }; - exec(chmodArgs); - } - } + // Make it executable + String[] chmodArgs = { "chmod", "755", script }; + exec(chmodArgs); + } + } + + public class DesktopOSTask extends OSTask { + + public DesktopOSTask(Install installer) { + super(installer,"unix-desktop"); + } - public class ManPageOSTask extends OSTask - { - public ManPageOSTask(Install installer) - { - super(installer,"unix-man"); - } + public String getDefaultDirectory(Install installer) { + String dir = "/usr/local/"; + if (!new File(dir).canWrite()) { + dir = System.getProperty("user.home"); + } - public String getDefaultDirectory(Install installer) - { - String dir = "/usr/local/"; - if(!new File(dir).canWrite()) - dir = System.getProperty("user.home"); + return new File(dir,"share").getPath(); + } - return new File(dir,"man/man1").getPath(); - } + public void perform(String installDir, + Vector filesets) throws IOException + { + if (!enabled) { + return; + } - public void perform(String installDir, - Vector filesets) throws IOException - { - if(!enabled) - return; + mkdirs(directory); + mkdirs(directory+"/applications"); + mkdirs(directory+"/pixmaps"); - mkdirs(directory); + String name = installer.getProperty("app.name"); - String name = installer.getProperty("app.name"); + // install shortcut + String shortcut = installer.getProperty("ostask.unix-desktop.shortcut"); + String pixmap = installer.getProperty("ostask.unix-desktop.pixmap"); - // install man page - String manpage = installer.getProperty("ostask.unix-man.manpage"); + if (shortcut != null) { + InputStream in = getClass().getResourceAsStream("/" + shortcut); + installer.copy(in, new File(directory+"/applications",shortcut).getPath(), null); + } + if (pixmap != null) { + InputStream in = getClass().getResourceAsStream("/" + pixmap); + installer.copy(in, new File(directory+"/pixmaps", pixmap).getPath(), null); + } + } + } + + public class ManPageOSTask extends OSTask + { + public ManPageOSTask(Install installer) + { + super(installer,"unix-man"); + } - InputStream in = getClass().getResourceAsStream("/" + manpage); - installer.copy(in,new File(directory,manpage).getPath(), - null); - } - } + public String getDefaultDirectory(Install installer) + { + String dir = "/usr/local/"; + if(!new File(dir).canWrite()) + dir = System.getProperty("user.home"); - public OSTask[] getOSTasks(Install installer) - { - return new OSTask[] { new ScriptOSTask(installer), - new ManPageOSTask(installer) }; - } + return new File(dir,"man/man1").getPath(); + } - public void mkdirs(String directory) throws IOException - { - File file = new File(directory); - if(!file.exists()) - { - String[] mkdirArgs = { "mkdir", "-m", "755", - "-p", directory }; - exec(mkdirArgs); - } - } + public void perform(String installDir, + Vector filesets) throws IOException + { + if(!enabled) + return; - public void exec(String[] args) throws IOException - { - Process proc = Runtime.getRuntime().exec(args); - proc.getInputStream().close(); - proc.getOutputStream().close(); - proc.getErrorStream().close(); - try - { - proc.waitFor(); - } - catch(InterruptedException ie) - { - } - } - } + mkdirs(directory); - public static class MacOS extends Unix - { - public String getInstallDirectory(String name, String version) - { - return "/Applications/" + name + " " + version; - } - } + String name = installer.getProperty("app.name"); - public static class Windows extends OperatingSystem - { - public String getInstallDirectory(String name, String version) - { - return "C:\\Program Files\\" + name + " " + version; - } + // install man page + String manpage = installer.getProperty("ostask.unix-man.manpage"); - public class JEditLauncherOSTask extends OSTask - { - public JEditLauncherOSTask(Install installer) - { - super(installer,"jedit-launcher"); - } + if (manpage != null) { + InputStream in = getClass().getResourceAsStream("/" + manpage); + installer.copy(in, new File(directory,manpage).getPath(), null); + } + } + } - public String getDefaultDirectory(Install installer) - { - return null; - } + public OSTask[] getOSTasks(Install installer) + { + return new OSTask[] { new ScriptOSTask(installer), + new ManPageOSTask(installer), new DesktopOSTask(installer) }; + } - public void perform(String installDir, - Vector filesets) - { - if(!enabled - || !filesets.contains("jedit-windows")) - return; + public void mkdirs(String directory) throws IOException + { + File file = new File(directory); + if(!file.exists()) + { + String[] mkdirArgs = { "mkdir", "-m", "755", + "-p", directory }; + exec(mkdirArgs); + } + } - // run jEditLauncher installation - File executable = new File(installDir,"jedit.exe"); - if(!executable.exists()) - return; + public void exec(String[] args) throws IOException + { + Process proc = Runtime.getRuntime().exec(args); + proc.getInputStream().close(); + proc.getOutputStream().close(); + proc.getErrorStream().close(); + try + { + proc.waitFor(); + } + catch(InterruptedException ie) + { + } + } + } - String[] args = { executable.getPath(), "/i", - System.getProperty("java.home") - + File.separator - + "bin" }; + public static class MacOS extends Unix + { + public String getInstallDirectory(String name, String version) + { + return "/Applications/" + name + " " + version; + } + } - try - { - Runtime.getRuntime().exec(args).waitFor(); - } - catch(IOException io) - { - } - catch(InterruptedException ie) - { - } - } - } + public static class Windows extends OperatingSystem + { + public String getInstallDirectory(String name, String version) + { + return "C:\\Program Files\\" + name + " " + version; + } - public OSTask[] getOSTasks(Install installer) - { - return new OSTask[] { /* new JEditLauncherOSTask(installer) */ }; - } - } + public class JEditLauncherOSTask extends OSTask + { + public JEditLauncherOSTask(Install installer) + { + super(installer,"jedit-launcher"); + } - public static class HalfAnOS extends OperatingSystem - { - public String getInstallDirectory(String name, String version) - { - return "C:\\" + name + " " + version; - } - } + public String getDefaultDirectory(Install installer) + { + return null; + } - public static class VMS extends OperatingSystem - { - public String getInstallDirectory(String name, String version) - { - return "./" + name.toLowerCase() + "/" + version; - } - } + public void perform(String installDir, + Vector filesets) + { + if(!enabled + || !filesets.contains("jedit-windows")) + return; - // private members - private static OperatingSystem os; + // run jEditLauncher installation + File executable = new File(installDir,"jedit.exe"); + if(!executable.exists()) + return; + + String[] args = { executable.getPath(), "/i", + System.getProperty("java.home") + + File.separator + + "bin" }; + + try + { + Runtime.getRuntime().exec(args).waitFor(); + } + catch(IOException io) + { + } + catch(InterruptedException ie) + { + } + } + } + + public OSTask[] getOSTasks(Install installer) + { + return new OSTask[] { /* new JEditLauncherOSTask(installer) */ }; + } + } + + public static class HalfAnOS extends OperatingSystem + { + public String getInstallDirectory(String name, String version) + { + return "C:\\" + name + " " + version; + } + } + + public static class VMS extends OperatingSystem + { + public String getInstallDirectory(String name, String version) + { + return "./" + name.toLowerCase() + "/" + version; + } + } + + // private members + private static OperatingSystem os; } Deleted: trunk/jsxe/jsXe.jsmooth =================================================================== --- trunk/jsxe/jsXe.jsmooth 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/jsXe.jsmooth 2006-08-13 04:07:13 UTC (rev 1146) @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<jsmoothproject> -<JVMSearchPath>registry</JVMSearchPath> -<JVMSearchPath>javahome</JVMSearchPath> -<JVMSearchPath>jrepath</JVMSearchPath> -<JVMSearchPath>jdkpath</JVMSearchPath> -<JVMSearchPath>exepath</JVMSearchPath> -<JVMSearchPath>jview</JVMSearchPath> -<classPath>build\jsXe.jar</classPath> -<embeddedJar>false</embeddedJar> -<executableName>build\jsXe.exe</executableName> -<iconLocation>src\net\sourceforge\jsxe\icons\jsxe.jpg</iconLocation> -<initialMemoryHeap>16777216</initialMemoryHeap> -<javaProperties> -<name>java.endorsed.dirs</name> -<value>lib</value> -</javaProperties> -<mainClassName>net.sourceforge.jsxe.jsXe</mainClassName> -<maximumMemoryHeap>67108864</maximumMemoryHeap> -<maximumVersion></maximumVersion> -<minimumVersion>1.4.2</minimumVersion> -<skeletonName>Windowed Wrapper</skeletonName> -<skeletonProperties> -<key>Message</key> -<value>Java has not been found on your computer. Do you want to download it?</value> -</skeletonProperties> -<skeletonProperties> -<key>URL</key> -<value>http://www.java.com</value> -</skeletonProperties> -<skeletonProperties> -<key>SingleProcess</key> -<value>0</value> -</skeletonProperties> -<skeletonProperties> -<key>Debug</key> -<value>0</value> -</skeletonProperties> -</jsmoothproject> Copied: trunk/jsxe/jsxe.ico (from rev 1144, tags/05pre3/jsxe/jsxe.ico) =================================================================== (Binary files differ) Copied: trunk/jsxe/launch4j.xml (from rev 1144, tags/05pre3/jsxe/launch4j.xml) =================================================================== --- trunk/jsxe/launch4j.xml (rev 0) +++ trunk/jsxe/launch4j.xml 2006-08-13 04:07:13 UTC (rev 1146) @@ -0,0 +1,23 @@ +<launch4jConfig> + <dontWrapJar>true</dontWrapJar> + <headerType>0</headerType> + <jar>jsXe.jar</jar> + <outfile>build\jsXe.exe</outfile> + <errTitle>jsXe</errTitle> + <jarArgs></jarArgs> + <chdir></chdir> + <customProcName>true</customProcName> + <stayAlive>false</stayAlive> + <icon>jsxe.ico</icon> + <jre> + <path></path> + <minVersion>1.4.2</minVersion> + <maxVersion></maxVersion> + <initialHeapSize>16</initialHeapSize> + <maxHeapSize>64</maxHeapSize> + <args>-Djava.endorsed.dirs=lib + + +</args> + </jre> +</launch4jConfig> \ No newline at end of file Modified: trunk/jsxe/messages/messages.ja =================================================================== --- trunk/jsxe/messages/messages.ja 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/messages/messages.ja 2006-08-13 04:07:13 UTC (rev 1146) @@ -9,12 +9,25 @@ common.ok=決定 common.cancel=キャンセル +common.open=開く +common.save=保存 +common.save.as=名前を付けて保存 +common.close=閉じる common.apply=適用 +common.more=次 +common.insert=インサート common.add=追加 common.remove=削除 +common.moveUp=上げる +common.moveDown=下げる + +#common.ctrl=Ctrl +#common.alt=Alt +#common.shift=Shift +#common.meta=Meta -#}}} - +#}}} + #{{{ XML Terminology #{{{ XML Node Types @@ -22,9 +35,11 @@ xml.processing.instruction=処理命令 xml.cdata=CDATAセクション xml.text=テキスト -xml.entity.reference=エンティティ参照 +xml.entity.reference=エンティティ参照 +#xml.declaration=Element Declaration xml.notation=表記法 -xml.entity=エンティティ +xml.entity=エンティティ +#xml.entity=Entity Declaration xml.comment=コメント xml.attribute=属性 xml.doctype=文書型 @@ -35,7 +50,8 @@ xml.document=XMLドキュメント xml.namespace=ネームスペース xml.namespace.prefix=ネームスペース前置修飾子 -xml.namespace.prefix.short=前置修飾子 +xml.namespace.prefix.short=前置修飾子 +#xml.namespace.decl=Namespace Declaration xml.doctypedef=文書型 xml.doctype.name=DTDの名前 xml.doctype.public=公開識別子 @@ -43,6 +59,38 @@ xml.schema=XMLスキーマ #}}} + +#{{{ Global Options +Global.Options.Dialog.Title=Global Options +Global.Options.Title=General +Global.Options.Max.Recent.Files=最近使用したドキュメント数: +Global.Options.Max.Recent.Files.ToolTip=最近使用したドキュメントのメニューに表示するドキュメントの数 +Global.Options.network-off=Always cache without asking +Global.Options.network-cache=Ask first, then cache remote files +Global.Options.network-always=Always download without asking +Global.Options.network=DTDとXMLスキーマ ダウンロード: +Global.Options.Menu.Spill.Over=Number of items before menus spill over: +Global.Options.Undos.To.Remember=元に戻す数: +Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXeは元に戻すために、この操作数を覚える.<BR> しかし, ビューを変わったら、覚えることはできません。</HTML> + +Shortcuts.Options.Title=ショットカット +Shortcuts.Options.Select.Label=ショットカットを編集: +Shortcuts.Options.Shortcut=ショットカット +Shortcuts.Options.Command=コマンド + +Grab.Key.title=ショットカットを選択 +Grab.Key.caption="{0}" のショットカットを選択して、決定を押してくただい。 +Grab.Key.keyboard-test=Input the key strokes that are causing problems. +Grab.Key.assigned-to=今登録されたコマンド: {0} +Grab.Key.assigned-to.none=<なし> +Grab.Key.clear=クリア +Grab.Key.remove=今のショットカットを削除 + +Grab.Key.remove-ask.title=ショットカットを削除? +Grab.Key.remove-ask.message=\ + 新しいショットカットは選択されてなかった。\n\ + 今のショットカットを削除? +#}}} #{{{ Document Options Document.Options.Title=ドキュメント設定 @@ -57,18 +105,31 @@ Tools.Menu=ツール View.Menu=表示 -#{{{ File Menu Items -open-file.label=開く... -save-file.label=保管 -reload-file.label=再ロード -close-file.label=閉じる -close-all.label=すべてを閉じる -exit.label=終了 +#{{{ Action Labels +new-file.label=新規作成 +open-file.label=開く... +File.Recent=最近使用したドキュメント +File.Recent.None=最近使用したドキュメントはありません +save-file.label=保存 +save-as.label=名前を付けて保存... +reload-file.label=再ロード +close-file.label=閉じる +close-all.label=すべて閉じる +exit.label=終了 + +undo.label=元に戻す +redo.label=やり直し +cut.label=切り取り +copy.label=コピー +paste.label=貼り付け +find.label=探索... +findnext.label=次を探索 + +document-options.label=ドキュメント設定... +plugin-manager.label=プラグインマネジャー... +about-jsxe.label=jsXeについて... #}}} -document-options.label=ドキュメント設定... -about-jsxe.label=jsXeについて... - #}}} #{{{ Dialogs @@ -89,4 +150,5 @@ ホームページ: http://jsxe.sourceforge.net/ #}}} -#}}} \ No newline at end of file +#}}} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |