Exemplo n.º 1
0
        if not plugin.filename in argv[1:]:
            continue
        from ij import IJ
        IJ.debugMode = True

    print 'Handling', plugin
    dependencies = [dep.filename for dep in plugin.getDependencies()]
    seen = set()
    # dependencies have timestamps, so let's keep them intact when possible
    result = plugins.analyzeDependencies(plugin)
    for dependency in result:
        if dependency in dependencies:
            seen.add(dependency)
        else:
            plugin.addDependency(dependency)

    # special case: imglib dependency of Script Editor
    if plugin.filename == 'plugins/Script_Editor.jar':
        for dependency in ['jars/imglib.jar']:
            if not dependency in dependencies:
                plugin.addDependency(dependency)
                seen.add(dependency)

    for dependency in dependencies:
        if not dependency in seen:
            plugin.removeDependency(dependency)

writer = XMLFileWriter(plugins)
writer.validate()
writer.write(GZIPOutputStream(FileOutputStream(dbPath)))