Difference between revisions of "Setting Up a MIRC Development Environment"

From MircWiki
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<b>UNDER CONSTRUCTION</b>
 
 
 
This article describes the development environment that was used to develop the MIRC software, including CTP and TFS. It is not the only way that it could have been done, and it is certainly not a sophisticated approach; it is just the way that I did it. The intended audience for this article is software engineers who are extending or maintaining the code.
 
This article describes the development environment that was used to develop the MIRC software, including CTP and TFS. It is not the only way that it could have been done, and it is certainly not a sophisticated approach; it is just the way that I did it. The intended audience for this article is software engineers who are extending or maintaining the code.
  
Line 6: Line 4:
 
* <b><tt>Util</tt></b> contains the embedded server, common servlets, and a collection of utility classes.
 
* <b><tt>Util</tt></b> contains the embedded server, common servlets, and a collection of utility classes.
 
* <b><tt>CTP</tt></b> contains the CTP application, including.
 
* <b><tt>CTP</tt></b> contains the CTP application, including.
* <b><tt>MIRC</tt></b> contains the CTP plugin that implements the teaching file system.
+
* <b><tt>MIRC2</tt></b> contains the CTP plugin that implements the teaching file system.
 +
 
 +
==Obtaining the Source Code==
 +
All the software written by the RSNA for the MIRC project is released under the [http://mirc.rsna.org/rsnapubliclicense.pdf RSNA Public License]. It is maintained on GitHub. To obtain the source code, go to http://github.com/johnperry/CTP and click the <b>Downloads</b> button.
 +
 
 +
If you plan to do any substantial development on CTP or MIRC, I recommend that you obtain all three modules and build them. This will provide all the Javadocs.
  
 
All the software is available on GitHub at https://github.com/johnperry.
 
All the software is available on GitHub at https://github.com/johnperry.
  
The best approach is to fork the <b><tt>Util</tt></b>, <b><tt>CTP</tt></b>, and <b><tt>MIRC2</tt></b> repositories and check out the code onto your development system.
+
The best approach is to fork the <b><tt>Util</tt></b>, <b><tt>CTP</tt></b>, and <b><tt>MIRC2</tt></b> repositories and check out the code onto your development system using Git. Alternatively, you can get the three zip files from GitHub, unpack them onto your development system, and rename the top-level directories to the names shown below.
  
Each module has an Ant build.xml file to build it. The build files expect this directory structure:
+
==The Development Directory Structure==
 +
Each module has an Ant build file to build it. The build files expect this directory structure:
 
<tt>
 
<tt>
 
* Development
 
* Development
Line 21: Line 25:
  
 
==Building the Software==
 
==Building the Software==
When you download the <b>CTP</b> repository from GitHub, you obtain a zip file containing a directory tree full of the sources and libraries for building the application. The top of the directory tree has a complicated name that includes the letters <tt><b>CTP</b></tt>. In the rest of this article, that directory will be called <b><tt>CTP</tt></b>. The directory contains several subdirectories. The source code is in the <tt><b>source</b></tt> directory, which has four subdirectories, one each for the default CTP configuration file, the Java sources, the files required by the application, and resources which are included in the application's jar.
+
Each module's top-level directory contains its Ant <b><tt>build.xml</tt></b> file and several subdirectories. The source code is in the <tt><b>source</b></tt> directory, which has at least two subdirectories, one for the Java sources and one for the files required by the module.
 +
 
 +
All the modules will build on Java 1.6, and 1.7.  
  
Building CTP requires the Java 1.5 JDK (or better) and Ant. Running CTP just requires the JRE. If you use stages that create JPEGs from DICOM images, the JAI ImageIO Tools are also required.
+
To build the software on a Windows system, launch a command window, navigate to the root directory of the tree, and enter <tt><b>ant all</b></tt>.
  
The Ant build file for CTP is in the <b><tt>CTP</tt></b> directory and is called <tt><b>build.xml</b></tt>. To build the software on a Windows system, launch a command window, navigate to the root directory of the tree, and enter <tt><b>ant all</b></tt>.
+
Each build file contains several targets. The <tt><b>all</b></tt> target does a clean build of everything, including the installer (if the module has one) and the Javadocs.
  
The build file contains several targets. The <tt><b>all</b></tt> target does a clean build of everything, including the installer and the Javadocs.
+
Each build file must be run manually.
 +
* All the build processes put their output in their <b><tt>products</tt></b> subdirectories.
 +
* The Util build process creates the <b><tt>util.jar</tt></b> file and copies it to the <b><tt>CTP/libraries</tt></b> directory.
 +
* The CTP build process can be run alone.
 +
* The CTP build process creates the <b><tt>CTP/products/CTP-installer.jar</tt></b> file.
 +
* The MIRC2 build process references files in the <b><tt>CTP</tt></b> directory tree.
 +
* The MIRC2 build process creates the <b><tt>MIRC2/products/TFS-installer.jar</tt></b> file.
 +
* The jar containing the MIRC2 code is called <b><tt>MIRC.jar</tt></b>. It is deleted from the <b><tt>MIRC2/products</tt></b> directory after the installer is created.
 +
*The Javadocs are built in the module's <b><tt>documentation</tt></b> subdirectory. They can be accessed with a browser by opening the <b><tt>index.html</tt></b> file.
  
The Javadocs can be accessed with a browser by opening the file:
+
To do a manual rebuild of all modules, do it in this order:
 +
# <b><tt>Util</tt></b>
 +
# <b><tt>CTP</tt></b>
 +
# <b><tt>MIRC2</tt></b>
  
:<tt>CTP/documentation/index.html</tt>
+
If you aren't working on the MIRC teaching file plugin, you don't need to set up its development environment (or build it).
  
The installer is located in the <tt><b>products</b></tt> directory.
+
==The Modules==
 +
For technical descriptions of the modules, see these articles:
 +
* [[The Util Module]]
 +
* [[The CTP Module]]
 +
* [[The MIRC Module]]

Latest revision as of 12:59, 10 February 2014

This article describes the development environment that was used to develop the MIRC software, including CTP and TFS. It is not the only way that it could have been done, and it is certainly not a sophisticated approach; it is just the way that I did it. The intended audience for this article is software engineers who are extending or maintaining the code.

There are three key modules in the MIRC software:

  • Util contains the embedded server, common servlets, and a collection of utility classes.
  • CTP contains the CTP application, including.
  • MIRC2 contains the CTP plugin that implements the teaching file system.

1 Obtaining the Source Code

All the software written by the RSNA for the MIRC project is released under the RSNA Public License. It is maintained on GitHub. To obtain the source code, go to http://github.com/johnperry/CTP and click the Downloads button.

If you plan to do any substantial development on CTP or MIRC, I recommend that you obtain all three modules and build them. This will provide all the Javadocs.

All the software is available on GitHub at https://github.com/johnperry.

The best approach is to fork the Util, CTP, and MIRC2 repositories and check out the code onto your development system using Git. Alternatively, you can get the three zip files from GitHub, unpack them onto your development system, and rename the top-level directories to the names shown below.

2 The Development Directory Structure

Each module has an Ant build file to build it. The build files expect this directory structure:

  • Development
    • Util
    • CTP
    • MIRC2

3 Building the Software

Each module's top-level directory contains its Ant build.xml file and several subdirectories. The source code is in the source directory, which has at least two subdirectories, one for the Java sources and one for the files required by the module.

All the modules will build on Java 1.6, and 1.7.

To build the software on a Windows system, launch a command window, navigate to the root directory of the tree, and enter ant all.

Each build file contains several targets. The all target does a clean build of everything, including the installer (if the module has one) and the Javadocs.

Each build file must be run manually.

  • All the build processes put their output in their products subdirectories.
  • The Util build process creates the util.jar file and copies it to the CTP/libraries directory.
  • The CTP build process can be run alone.
  • The CTP build process creates the CTP/products/CTP-installer.jar file.
  • The MIRC2 build process references files in the CTP directory tree.
  • The MIRC2 build process creates the MIRC2/products/TFS-installer.jar file.
  • The jar containing the MIRC2 code is called MIRC.jar. It is deleted from the MIRC2/products directory after the installer is created.
  • The Javadocs are built in the module's documentation subdirectory. They can be accessed with a browser by opening the index.html file.

To do a manual rebuild of all modules, do it in this order:

  1. Util
  2. CTP
  3. MIRC2

If you aren't working on the MIRC teaching file plugin, you don't need to set up its development environment (or build it).

4 The Modules

For technical descriptions of the modules, see these articles: