ImageJA开始时是一个双管齐下的项目:
1.我们希望有一个源代码管理系统,以便我们可以为ImageJ贡献和更新补丁。 Originally, this was CVS, now it is Git, and in the meantime Wayne Rasband, the author of ImageJ, also adopted a routine involving Git. So basically, this goal was reached. 2.我们希望为不“弹出”的浏览器内的小程序提供支持。 In other words, we wanted an applet version of ImageJ which would be embedded into the webpage without having an extra main window. This code is basically working, but there are still many places where extra windows are popping up (e.g. the results table, or error messages). Plus, it has not made it back into upstream ImageJ. So this goal was not reached. 为了保持最新状态,ImageJA 与 ImageJ 同步。此同步涉及三个(实际上是四个)脚本。
真正的第一个脚本是一个通知程序,它每隔一小时左右抽取一次§§1§§§,并在它连续发生变化时向我发送一封电子邮件。每当我收到这样的邮件时,我都会参加三个运行脚本,它们都存储在 ImageJA.git 的“工具”分支中:
1.commit-new-version.sh
This script downloads the News section, detects the current version, downloads the -src package, changes line endings to standard (Unix) line endings, deletes Mac-specific files (e.g. Finder-related files which have nothing to do with Java source files) and finally commits that as new state in the ‘imagej’ branch.
2.merge-imagej.sh
This script tries to make sure that my current working directory is an up-to-date version of ImageJA, then merges the ‘imagej’ branch.
3.upload-imageja.sh
This script builds the current commit, determines which ImageJ version it is based on, adds an appropriate tag and uploads -src and signed release jar to ImageJA’s sourceforge download site, to ImageJA’s website, to Fiji’s ImageJA site, and then pushes the ‘master’ and ‘imagej’ branches as well as the new tag to all kinds of remote repositories, including repo.or.cz, fiji.sc and dev.loci.wisc.edu.
这些脚本已经经历了很长的历史(I于2005年10月开始编写这些内容,当时我尝试获取更多以前的源代码包,把它们作为ImageJ的历史记录,以关注多地记录事物的开发过程)。
通常,合并步骤会以合并冲突结束,因为我们在 ImageJA 与 ImageJ 中进行了相当多的更改,但由于某种原因而未能到达上游。
将来,我的计划是使这些更改过时,基本上将脚本脚本更改为采用当前 imagej 状态放置内容放入适当的 src/main/* 子目录中的脚本,并调整 pom.xml 中的版本。它甚至可能如此自动化,从而让 Hudson 来执行这项工作。
这些变化分为三类,并采用不同的策略来“使它们过时”:
- 我们由于传统原因进行了更改,但这些更改将在 IJ2 中过时,例如 Plugins › Install Plugin… 支持代码中的“转换为 8 位”或命令查找器中的“模糊匹配”。 Roughly half of these changes I will just forget, while the other half of changes will persist in the IJ1-based Fiji through Javassist.
- 婚礼应该作为 ImageJ 的附加组件存在的更改,例如 File › Import › Image Sequence… 插件。当然,将其作为斐济插件会移动到其中的位置,但这并不重要。 3.无头的东西。我将尝试将其作为实现javassist的运行时调整以及由javassist用户最终重写的包提供(介入仅提供,适用于由于安全限制而无法让javassist完成其工作的情况)。
有些情况是混合的,其中代码将移至 ij.jar 外部并可使用插件,但我将使用 javassist 来设置可从 IJ1 内部的适当位置使用。
总的来说,这应该明确 IJ1 中的许多不必要的修改,并让我们(阅读:me)更多地关注 IJ2。