Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

automatic creation of plugins folder

  • Loading branch information...
commit 515cef715b371688c892a46307c7d638dbc85989 1 parent 92fa73b
mic authored
View
2  blogracy-vuze/pom.xml
@@ -11,7 +11,7 @@
<resources>
<resource>
<directory>src/main/plugins</directory>
- <targetPath>../plugins/</targetPath>
+ <targetPath>plugins</targetPath>
</resource>
<!--resource>
<directory>src/main/java/net/blogracy/chat/resources</directory>
View
22 blogracy-vuze/src/main/java/net/blogracy/Blogracy.java
@@ -3,9 +3,12 @@
*/
package net.blogracy;
+import java.io.FileWriter;
+import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Properties;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -23,6 +26,9 @@
import org.gudy.azureus2.plugins.Plugin;
import org.gudy.azureus2.plugins.PluginException;
import org.gudy.azureus2.plugins.PluginInterface;
+import org.gudy.azureus2.plugins.PluginManager;
+
+import com.aelitis.azureus.plugins.chat.ChatPlugin;
/**
* @author mic
@@ -80,10 +86,26 @@ public static void main(String[] args) {
} catch (Exception e) {
e.printStackTrace();
}
+
+ try {
+ (new java.io.File("plugins/chat")).mkdirs();
+ Properties chatProp = new Properties();
+ chatProp.load(Blogracy.class.getClassLoader().getResourceAsStream("plugins/chat/plugin.properties"));
+ chatProp.store(new FileWriter("plugins/chat/plugin.properties"), "Chat plugin");
+ (new java.io.File("plugins/blogracy")).mkdirs();
+ Properties blogracyProp = new Properties();
+ blogracyProp.load(Blogracy.class.getClassLoader().getResourceAsStream("plugins/blogracy/plugin.properties"));
+ blogracyProp.store(new FileWriter("plugins/blogracy/plugin.properties"), "Blogracy plugin");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
List<String> argList = new ArrayList<String>();
argList.addAll(Arrays.asList(args));
argList.add("--ui=console");
org.gudy.azureus2.ui.common.Main.main(argList.toArray(args));
+ //PluginManager.startAzureus(PluginManager.UI_NONE, new java.util.Properties());
+ //PluginManager.registerPlugin(new Blogracy(), "blogracy");
+ //PluginManager.registerPlugin(new ChatPlugin(), "chat");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.