[Jsxe-cvs] SF.net SVN: jsxe: [1143] tags/05pre3/jsxe
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-08-12 18:51:31
|
Revision: 1143 Author: ian_lewis Date: 2006-08-12 11:51:25 -0700 (Sat, 12 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1143&view=rev Log Message: ----------- Fixed how jsXe installs on Unix/Linux; Added support for desktop launchers in Unix Modified Paths: -------------- tags/05pre3/jsxe/build.xml tags/05pre3/jsxe/installer/src/installer/OperatingSystem.java Added Paths: ----------- tags/05pre3/jsxe/installer/jsxe.desktop tags/05pre3/jsxe/installer/jsxe.png Modified: tags/05pre3/jsxe/build.xml =================================================================== --- tags/05pre3/jsxe/build.xml 2006-08-12 17:22:38 UTC (rev 1142) +++ tags/05pre3/jsxe/build.xml 2006-08-12 18:51:25 UTC (rev 1143) @@ -78,6 +78,7 @@ <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"/> @@ -97,6 +98,10 @@ <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="5"/> @@ -140,7 +145,6 @@ <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"/> @@ -402,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> @@ -425,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}"/> @@ -600,9 +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="extra.vm.args" value="-Djava.endorsed.dirs=lib"/> - <!--<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}"/> @@ -630,6 +649,7 @@ <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> <!-- }}} --> Added: tags/05pre3/jsxe/installer/jsxe.desktop =================================================================== --- tags/05pre3/jsxe/installer/jsxe.desktop (rev 0) +++ tags/05pre3/jsxe/installer/jsxe.desktop 2006-08-12 18:51:25 UTC (rev 1143) @@ -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 Added: tags/05pre3/jsxe/installer/jsxe.png =================================================================== (Binary files differ) Property changes on: tags/05pre3/jsxe/installer/jsxe.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: tags/05pre3/jsxe/installer/src/installer/OperatingSystem.java =================================================================== --- tags/05pre3/jsxe/installer/src/installer/OperatingSystem.java 2006-08-12 17:22:38 UTC (rev 1142) +++ tags/05pre3/jsxe/installer/src/installer/OperatingSystem.java 2006-08-12 18:51:25 UTC (rev 1143) @@ -153,7 +153,10 @@ mkdirs(directory); String name = installer.getProperty("app.name"); - String vmArgs = installer.getProperty("extra.vm.args"); + + //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 @@ -193,7 +196,50 @@ exec(chmodArgs); } } + + public class DesktopOSTask extends OSTask { + + public DesktopOSTask(Install installer) { + super(installer,"unix-desktop"); + } + 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(); + } + + public void perform(String installDir, + Vector filesets) throws IOException + { + if (!enabled) { + return; + } + + mkdirs(directory); + mkdirs(directory+"/applications"); + mkdirs(directory+"/pixmaps"); + + String name = installer.getProperty("app.name"); + + // install shortcut + String shortcut = installer.getProperty("ostask.unix-desktop.shortcut"); + String pixmap = installer.getProperty("ostask.unix-desktop.pixmap"); + + 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) @@ -233,7 +279,7 @@ public OSTask[] getOSTasks(Install installer) { return new OSTask[] { new ScriptOSTask(installer), - new ManPageOSTask(installer) }; + new ManPageOSTask(installer), new DesktopOSTask(installer) }; } public void mkdirs(String directory) throws IOException This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |