Difference between revisions of "Slicer3:Launcher"

From NAMIC Wiki
Jump to: navigation, search
(Replacing page with '<big>'''Note:''' We are migrating this content to the slicer.org domain - <font color="orange">The newer page is [http://www.slicer.org/slicerWiki/index.php/Slicer3:Launcher h...')
Line 1: Line 1:
== Requirements ==
+
<big>'''Note:''' We are migrating this content to the slicer.org domain - <font color="orange">The newer page is [http://www.slicer.org/slicerWiki/index.php/Slicer3:Launcher here]</font></big>
 
 
[[2007_Project_Half_Week#Projects | One of the projects]] at the 2007 AHM was a [[media:2007_AHM_Programming_Half_Week_Slicer3_Launch.ppt | review of the Slicer3 launcher]].
 
 
 
A summary of the conclusions is:
 
* for the shared library plugins to work the application needs to be built in shared mode (not static)
 
* this means that shared library paths must be set ''before'' the application is started
 
* a launcher can do this -- it is a small program that does not have shared library dependencies that sets paths and then executes the main application
 
 
 
Some other nice things the launcher can do:
 
* since the launcher starts quickly, it can put up a splash screen for user feedback while the main program is loading
 
* the launcher can catch abnormal termination conditions of the main program and provide user feedback
 
* the launcher can run arbitrary programs with the exact environment used by the main application (for example, you can run a debugger on Slicer3-real with all the shared libraries resolved, or you can run a shell from which you can run ldd to see the dependencies for a library).
 
 
 
== Implementation ==
 
 
 
The group decided to adopt the approach used by slicer2, which is based on the [http://www.equi4.com/starkit.html starkit/starpack] technology for building small, stand alone programs that include a full tcl/tk interpreter.
 
 
 
The code and documentation are in Slicer3/Utilities/Launcher. The actual startup script is Slicer3/launch.tcl.in, which gets configured by cmake into Slicer3-build/lib/launch.tcl.
 
 
 
Usage for the launcher is:
 
  Slicer3 [--launch <program>] [Options...]
 
where:
 
  <program> is a program that should be run using the environment settings defined by the launcher (defaults to Slicer3-real)
 
  [Options...] are any options to send to <program>
 
 
 
== Considerations ==
 
 
 
Windows only: Due to the way tcl captures text from subprocesses, text feedback should be sent to cout (stdout) rather than to cerr (stderr).  Messages to cerr will be printed out by the launcher after Slicer3-real exits, which may be confusing to the user.  Slicer's implementation of vtkErrorMacro, vtkWarningMacro, etc handles this automatically.
 

Revision as of 21:40, 19 May 2008

Home < Slicer3:Launcher

Note: We are migrating this content to the slicer.org domain - The newer page is here