Plugin spec modifications (needs more reworking).
This commit is contained in:
@@ -205,52 +205,36 @@ foo.xpi2p is a sud file containing the following:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
<h3>Plugin installer tasks
|
<h3>Plugin installer tasks</h3>
|
||||||
</h3>
|
This lists what happens when a plugin is installed by I2P.
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>
|
<li>The .xpi2p file is downloaded.</li>
|
||||||
download .xpi2p
|
<li>The .sud signature is verified against stored keys.
|
||||||
<li>
|
If there is no matching key, the .sud is extracted, the key is loaded from the properties, then verified and stored.</li>
|
||||||
verify sud sig against stored keys, or else:
|
<li>Verify the integrity of the zip file.</li>
|
||||||
- extract, get pubkey from properties, then verify, then store key
|
<li>Extract the plugin.config file.</li>
|
||||||
<li>
|
<li>Verify the I2P version, to make sure the plugin will work.</li>
|
||||||
verify zip integrity
|
<li>Check that webapps don't duplicate the existing $I2P applications.</li>
|
||||||
<li>
|
<li>Stop the existing plugin (if present).</li>
|
||||||
extract plugin.config file
|
<li>Verify that the install directory does not exist yet if update=false, or ask to overwrite.</li>
|
||||||
<li>
|
<li>Verify that the install directory does exist if update=false, or ask to create.</li>
|
||||||
verify min/max/version/etc
|
<li>Unzip the plugin in to appDir/plugins/name/</li>
|
||||||
<li>
|
<li>Add the plugin to plugins.config</li>
|
||||||
check that webapps don't duplicate those in $I2P
|
|
||||||
<li>
|
|
||||||
stop existing plugin
|
|
||||||
<li>
|
|
||||||
verify install dir doesn't exist if update=false, or ask
|
|
||||||
<li>
|
|
||||||
verify install dir does exist if update=true, or ask
|
|
||||||
<li>
|
|
||||||
unzip into appDir/plugins/name/
|
|
||||||
<li>
|
|
||||||
add to plugins.config
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
Plugin starter tasks
|
Plugin starter tasks
|
||||||
</h3>
|
</h3>
|
||||||
|
This lists what happens when plugins are started.
|
||||||
Check plugins.config for which to start.
|
First, plugins.config is checked to see which plugins need to be started.
|
||||||
For each one:
|
For each plugin:
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>Check clients.config, and load and start each item (add the configured jars to the classpath).</li>
|
||||||
check clients.config, load and start each item (add configured jars to classpath)
|
<li>Check console/webapp and console/webapp.config. Load and start required items (add the configured jars to the classpath).</li>
|
||||||
<li>
|
<li>Add console/locale/foo.jar to the translation classpath if present.</li>
|
||||||
check console/webapp and console/webapp.config, load and start (add configured jars to classpath)
|
<li>Add console/theme to the theme search path if present.</li>
|
||||||
<li>
|
<li>Add the summary bar link.</li>
|
||||||
add console/locale/foo.jar to translate classpath if present
|
|
||||||
<li>
|
|
||||||
add console/theme to theme search path if present
|
|
||||||
<li>
|
|
||||||
add summary bar link
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
@@ -342,7 +326,7 @@ Pack200 unpacking is supported on routers 0.7.11-5 or higher, which is essential
|
|||||||
support plugins at all.
|
support plugins at all.
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
Plugins should not attempt to write anywhere in $I2P as it may be readonly, and that isn't good policy anyway
|
Plugins should not attempt to write anywhere in $I2P as it may be readonly, and that isn't good policy anyway.
|
||||||
<li>
|
<li>
|
||||||
Plugins may write to $CONFIG but keeping files in $PLUGIN only is recommended.
|
Plugins may write to $CONFIG but keeping files in $PLUGIN only is recommended.
|
||||||
All files in $PLUGIN will be deleted at uninstall.
|
All files in $PLUGIN will be deleted at uninstall.
|
||||||
@@ -352,9 +336,9 @@ If the user may want to save data after uninstallation, the uninstallargs hook
|
|||||||
could ask.
|
could ask.
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
$CWD may be anywhere; do not assume it is in a particular place, do not attempt to read or write files relative to $CWD
|
$CWD may be anywhere; do not assume it is in a particular place, do not attempt to read or write files relative to $CWD.
|
||||||
<li>
|
<li>
|
||||||
Java programs should find out where they are with the directory getters in I2PAppContext
|
Java programs should find out where they are with the directory getters in I2PAppContext.
|
||||||
<li>
|
<li>
|
||||||
Plugin directory is I2PAppContext.getGlobalContext().getAppDir().getAbsolutePath() + "/plugins/" + appname,
|
Plugin directory is I2PAppContext.getGlobalContext().getAppDir().getAbsolutePath() + "/plugins/" + appname,
|
||||||
or put a $PLUGIN argument in the args line in clients.config.
|
or put a $PLUGIN argument in the args line in clients.config.
|
||||||
@@ -363,7 +347,7 @@ context API in i2p.jar.
|
|||||||
<li>
|
<li>
|
||||||
See <a href="http://zzz.i2p/topics/16">Howto</a> for info on generating signing keys and generating/verifying keys and sud files
|
See <a href="http://zzz.i2p/topics/16">Howto</a> for info on generating signing keys and generating/verifying keys and sud files
|
||||||
<li>
|
<li>
|
||||||
All config files must be UTF-8
|
All config files must be UTF-8.
|
||||||
<li>
|
<li>
|
||||||
To run in a separate JVM, use ShellCommand with java -cp foo:bar:baz my.main.class arg1 arg2 arg3.
|
To run in a separate JVM, use ShellCommand with java -cp foo:bar:baz my.main.class arg1 arg2 arg3.
|
||||||
Of course, it will be a lot harder to stop the plugin then...
|
Of course, it will be a lot harder to stop the plugin then...
|
||||||
@@ -392,9 +376,9 @@ access to router classes.
|
|||||||
<li>
|
<li>
|
||||||
Since each version must be higher than the one before, you could enhance your build
|
Since each version must be higher than the one before, you could enhance your build
|
||||||
script to add a build number to the end of the version.
|
script to add a build number to the end of the version.
|
||||||
This helps for testing. Most of zzz's plugins have that feature, check build.xml for an example.
|
This helps for testing. Most of zzz's plugins have that feature, check build.xml for an example.
|
||||||
<li>
|
<li>
|
||||||
Plugins must never call System.exit()
|
Plugins must never call System.exit().
|
||||||
<li>
|
<li>
|
||||||
Please respect licenses by meeting license requirements for any software you bundle.
|
Please respect licenses by meeting license requirements for any software you bundle.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user