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>
|
||||
|
||||
|
||||
<h3>Plugin installer tasks
|
||||
</h3>
|
||||
<h3>Plugin installer tasks</h3>
|
||||
This lists what happens when a plugin is installed by I2P.
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
download .xpi2p
|
||||
<li>
|
||||
verify sud sig against stored keys, or else:
|
||||
- extract, get pubkey from properties, then verify, then store key
|
||||
<li>
|
||||
verify zip integrity
|
||||
<li>
|
||||
extract plugin.config file
|
||||
<li>
|
||||
verify min/max/version/etc
|
||||
<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
|
||||
<li>The .xpi2p file is downloaded.</li>
|
||||
<li>The .sud signature is verified against stored keys.
|
||||
If there is no matching key, the .sud is extracted, the key is loaded from the properties, then verified and stored.</li>
|
||||
<li>Verify the integrity of the zip file.</li>
|
||||
<li>Extract the plugin.config file.</li>
|
||||
<li>Verify the I2P version, to make sure the plugin will work.</li>
|
||||
<li>Check that webapps don't duplicate the existing $I2P applications.</li>
|
||||
<li>Stop the existing plugin (if present).</li>
|
||||
<li>Verify that the install directory does not exist yet if update=false, or ask to overwrite.</li>
|
||||
<li>Verify that the install directory does exist if update=false, or ask to create.</li>
|
||||
<li>Unzip the plugin in to appDir/plugins/name/</li>
|
||||
<li>Add the plugin to plugins.config</li>
|
||||
</ul>
|
||||
|
||||
<h3>
|
||||
Plugin starter tasks
|
||||
</h3>
|
||||
|
||||
Check plugins.config for which to start.
|
||||
For each one:
|
||||
This lists what happens when plugins are started.
|
||||
First, plugins.config is checked to see which plugins need to be started.
|
||||
For each plugin:
|
||||
<ul>
|
||||
<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 (add configured jars to classpath)
|
||||
<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
|
||||
<li>Check clients.config, and load and start each item (add the configured jars to the classpath).</li>
|
||||
<li>Check console/webapp and console/webapp.config. Load and start required items (add the configured jars to the classpath).</li>
|
||||
<li>Add console/locale/foo.jar to the translation classpath if present.</li>
|
||||
<li>Add console/theme to the theme search path if present.</li>
|
||||
<li>Add the summary bar link.</li>
|
||||
</ul>
|
||||
|
||||
<h3>
|
||||
@@ -342,7 +326,7 @@ Pack200 unpacking is supported on routers 0.7.11-5 or higher, which is essential
|
||||
support plugins at all.
|
||||
|
||||
<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>
|
||||
Plugins may write to $CONFIG but keeping files in $PLUGIN only is recommended.
|
||||
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.
|
||||
|
||||
<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>
|
||||
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>
|
||||
Plugin directory is I2PAppContext.getGlobalContext().getAppDir().getAbsolutePath() + "/plugins/" + appname,
|
||||
or put a $PLUGIN argument in the args line in clients.config.
|
||||
@@ -363,7 +347,7 @@ context API in i2p.jar.
|
||||
<li>
|
||||
See <a href="http://zzz.i2p/topics/16">Howto</a> for info on generating signing keys and generating/verifying keys and sud files
|
||||
<li>
|
||||
All config files must be UTF-8
|
||||
All config files must be UTF-8.
|
||||
<li>
|
||||
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...
|
||||
@@ -394,7 +378,7 @@ Since each version must be higher than the one before, you could enhance your bu
|
||||
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.
|
||||
<li>
|
||||
Plugins must never call System.exit()
|
||||
Plugins must never call System.exit().
|
||||
<li>
|
||||
Please respect licenses by meeting license requirements for any software you bundle.
|
||||
|
||||
|
Reference in New Issue
Block a user