Changeset 23244 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2010-09-17T23:14:51+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/smed
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/build.xml
r23236 r23244 41 41 --> 42 42 <property name="josm" location="../../core/dist/josm-custom.jar"/> 43 <property name="plugin.build.dir" value="build"/> 43 <property name="smed_ex" value="../dist/"/> 44 <property name="plugin.build.dir" value="build/"/> 44 45 <property name="plugin.src.dir" value="src"/> 45 46 <!-- this is the directory where the plugin jar is copied to --> 46 47 <property name="plugin.dist.dir" value="../../dist"/> 47 48 <property name="ant.build.javac.target" value="1.5"/> 48 <property name="plugin.dist.dir" value="../../dist"/>49 49 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 50 50 … … 91 91 </copy> 92 92 93 <delete> 94 <fileset dir="${plugin.build.dir}"> 95 <include name="*smed_ex.jar"/> 96 <include name="*smed_about.jar"/> 97 </fileset> 98 </delete> 99 100 93 101 <copy todir="${plugin.build.dir}"> 94 <fileset dir="plugins"/> 102 <fileset dir="../smed_about/smed_dist"/> 103 </copy> 104 105 <copy todir="${plugin.build.dir}"> 106 <fileset dir="../smed_ex/smed_dist"/> 95 107 </copy> 96 108 97 109 <copy todir="${plugin.build.dir}"> 98 110 <fileset dir="."> 99 <include name="copyright.txt" /> 100 <include name="LICENSE.txt" /> 111 <include name="*.txt" /> 101 112 </fileset> 102 113 </copy> -
applications/editors/josm/plugins/smed/src/smed/Smed.java
r23236 r23244 8 8 import java.net.URL; 9 9 import java.net.URLClassLoader; 10 import java.util.Arrays; 10 11 import java.util.Enumeration; 11 12 import java.util.List; … … 23 24 import smed.plug.SmedPluginApp; 24 25 import smed.plug.ifc.SmedPluggable; 26 import smed.plug.util.JARFileFilter; 25 27 import smed.plug.util.SmedPluginLoader; 26 28 import smed.tabs.SmedTabAction; … … 39 41 File pluginDir = Main.pref.getPluginsDirectory(); 40 42 String pluginDirName = pluginDir.getAbsolutePath(); 41 File splug = new File(pluginDirName + "/splug"); 42 if(!splug.exists()) splug.mkdir(); 43 SmedFile splugDir = new SmedFile(pluginDirName + "/splug"); 44 45 if(!splugDir.exists()) splugDir.mkdir(); 43 46 47 File[] jars = splugDir.listFiles(new JARFileFilter()); 48 44 49 // build smed_ifc.jar from smed.jar 45 50 JarEntry e = null; … … 49 54 int len; 50 55 51 System.out.println(new java.util.Date());52 53 56 try { 54 57 JarFile file = new JarFile(pluginDirName + "/smed.jar"); … … 57 60 BufferedOutputStream oos = new BufferedOutputStream( jos); 58 61 59 /* nicht ohne Versionierung freigeben60 62 // extract *.jar to splug 61 63 Enumeration<JarEntry> ent = file.entries(); … … 64 66 eName = e.getName(); 65 67 if(eName.endsWith(".jar")) { 66 FileOutputStream pfos = new FileOutputStream(pluginDirName + "/splug/" + eName); 67 BufferedOutputStream pos = new BufferedOutputStream(pfos); 68 inp = new BufferedInputStream(file.getInputStream( e )); 68 if(splugDir.needUpdate(jars,eName)) { 69 FileOutputStream pfos = new FileOutputStream(pluginDirName + "/splug/" + eName); 70 BufferedOutputStream pos = new BufferedOutputStream(pfos); 71 inp = new BufferedInputStream(file.getInputStream( e )); 69 72 70 71 72 73 while ((len = inp.read(buffer)) > 0) { 74 pos.write(buffer, 0, len); 75 } 73 76 74 pos.flush(); 75 pos.close(); 76 inp.close(); 77 pfos.close(); 77 pos.flush(); 78 pos.close(); 79 inp.close(); 80 pfos.close(); 81 } 78 82 } 79 83 } 80 */ 84 85 81 86 82 87 // write smed_ifc.jar to splug -
applications/editors/josm/plugins/smed/src/smed/plug/ifc/SmedPluggable.java
r23236 r23244 6 6 public interface SmedPluggable { 7 7 8 9 10 11 12 13 14 8 boolean start(); 9 boolean stop(); 10 String getName(); 11 String getInfo(); 12 JComponent getComponent(); 13 14 void setPluginManager(SmedPluginManager manager); 15 15 16 16 }
Note:
See TracChangeset
for help on using the changeset viewer.