Changeset 2022
- Timestamp:
- 02/13/2010 09:37:29 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
- 3 moved
-
installer.xml (modified) (1 diff)
-
src/common/resources/conf/log4j-debug.properties.dist (moved) (moved from trunk/src/common/resources/conf/log4j-debug.properties)
-
src/common/resources/conf/log4j-default.properties.dist (moved) (moved from trunk/src/common/resources/conf/log4j-default.properties)
-
src/common/resources/conf/log4j-eclipse.properties.dist (moved) (moved from trunk/src/common/resources/conf/log4j-eclipse.properties)
-
src/tools/org/drftpd/tools/ant/ResourceTask.java (modified) (4 diffs)
-
src/tools/org/drftpd/tools/installer/PluginBuildListener.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/installer.xml
r1953 r2022 40 40 debug="${build.debug}" 41 41 optimize="${build.optimize}" /> 42 <!-- create toolsjar -->42 <!-- create plugin framework jar --> 43 43 <jar destfile="lib/${app.name}-jpf-${app.version}.jar"> 44 44 <manifest> -
trunk/src/tools/org/drftpd/tools/ant/ResourceTask.java
r1925 r2022 48 48 private boolean _slavePlugin; 49 49 private ArrayList<String> _filePatterns; 50 private ArrayList<String> _installedConfs; 50 51 51 52 /** … … 66 67 * @see org.apache.tools.ant.Task#execute() 67 68 */ 69 @SuppressWarnings("unchecked") 68 70 @Override 69 71 public void execute() throws BuildException { … … 81 83 } 82 84 _longDate = buildDate.getTime(); 85 _installedConfs = (ArrayList<String>)getProject().getReference("installed.confs"); 83 86 findResources(_resourceDir); 84 87 if (_slavePlugin && !_filePatterns.isEmpty()) { … … 181 184 } catch (IOException e) { 182 185 // FileWriter is already closed 186 } 187 } 188 // See if this is a dist file that needs installing 189 if (relativePath.endsWith(".dist")) { 190 String installRelativePath = relativePath.substring(0, relativePath.lastIndexOf(".dist")); 191 File installConfFile = new File(_baseDir, installRelativePath); 192 boolean doInstall = true; 193 if (installConfFile.exists()) { 194 if (!_installedConfs.contains(installRelativePath)) { 195 doInstall = false; 196 } 197 } else { 198 _installedConfs.add(installRelativePath); 199 } 200 if (doInstall) { 201 // Write data to installed file 202 FileWriter installOutputWriter = null; 203 try { 204 installOutputWriter = new FileWriter(installConfFile,true); 205 installOutputWriter.write(output.toString()+"\n"); 206 installOutputWriter.flush(); 207 } catch (FileNotFoundException e) { 208 log("Cannot install resource file to: " + installConfFile.getParent(),Project.MSG_ERR); 209 } catch (IOException e) { 210 log("Error installing resource file: " + installConfFile.getName(),Project.MSG_ERR); 211 } finally { 212 try { 213 installOutputWriter.close(); 214 } catch (IOException e) { 215 // FileWriter is already closed 216 } 217 } 218 } 219 // Do this regardless so that any existing user installed confs get pulled into slave.zip 220 if (_slavePlugin) { 221 _filePatterns.add(installRelativePath); 183 222 } 184 223 } -
trunk/src/tools/org/drftpd/tools/installer/PluginBuildListener.java
r1925 r2022 57 57 private HashMap<String,PluginDescriptor> _slavePluginMap; 58 58 private FileSet _slaveFiles; 59 private ArrayList<String> _installedConfs; 59 60 private TreeSet<String> _missingLibs; 60 61 private InstallerConfig _config; … … 93 94 } 94 95 _slaveFiles = new FileSet(); 96 _installedConfs = new ArrayList<String>(); 95 97 _missingLibs = new TreeSet<String>(); 96 98 _pluginsDone = 0; … … 256 258 p.addReference("plugin.descriptor",currDescriptor); 257 259 p.addReference("slave.fileset",_slaveFiles); 260 p.addReference("installed.confs",_installedConfs); 258 261 p.addReference("libs.missing",_missingLibs); 259 262 }
