Difference between revisions of "Slicer3:Build Instructions"

Jump to: navigation, search
m (Update from Wiki)
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
(60 intermediate revisions by 8 users not shown)
Line 1: Line 1:
= All-in-one Script to checkout and build Slicer3 =
<big>'''Note:''' We are migrating this content to the slicer.org domain - <font color="orange">The newer page is [https://www.slicer.org/wiki/Slicer3:Build_Instructions here]</font></big>
There's a script called getbuildtest.tcl that makes the support libraries (VTK, ITK, teem, etc) and also builds slicer and does a dashboard submission. Just do the following two commands (see [[Slicer3:Build_Instructions#getbuildtest_on_windows|for windows users]] below):
  svn co http://www.na-mic.org:8000/svn/Slicer3/trunk Slicer3
<br /> Note: that a Slicer3-lib and Slicer3-build directory will be created for you. This is meant to be used to set up new machines and to run nightly testing of the full builds.
To run on unix:
To run on windows:
Note: the whole build environment takes about 1.5G of disk space.
Note also that getbuildtest will do an Experimental submission to the [http://www.na-mic.org:8081/Slicer3/Dashboard/ Slicer3 dashboard]. If you want to use getbuildtest without submitting to the dashboard, you can set the test type to nothing with
getbuildtest.tcl -t ""
Other options for the -t (--test-type) option are Nightly or Continuous (or any of the [http://www.cmake.org/Wiki/CMake_Testing_With_CTest CTest] options).
  usage: getbuildtest [options] [target]
    [target] is determined automatically if not specified
    [options] is one of the following:
    --help : prints this message and exits
    --clean : delete lib and build directories first
    -t --test-type : CTest test target
    --release : compile with optimization flags
    --update : does a cvs/svn update on each lib
== Errors from getbuildtest ==
You will need to have your firewall configured to allow access to na-mic.org port 8000 for svn, and also cvs access through port 2401. Also you need 8081 for submitting to the dashboard.
Other errors might mean you don't have all the build tools (see next section).
== Updating Your getbuildtest Build ==
There are a few options:
* you can re-run getbuildtest and it will update slicer3 and rebuild (just slicer3)
* you can add the --update option and all the libs will get a cvs/svn update and will rebuild if needed (good for tracking the development head of VTK/ITK/KWWidgets etc).
* you can just 'svn update' in the Slicer3 directory and then do 'make' in the Slicer3-build to get just the latest Slicer3 code.
The following command for unix machines will update, build, and launch the latest Slicer3:
svn update && (cd ../Slicer3-build; make && ./bin/Slicer3)
<br />
== getbuildtest on windows ==
While still experimental, the script should also work on a properly configured windows environment. Current requirements are:
* Developer studio 8 Visual C++ Express which is free from Microsoft - be sure to install the Platform SDK and follow the ridiculous manual steps to set up the paths [[Slicer3:Build_Instructions#Information_on_Free_Microsoft_C.2B.2B_Compiler_on_Windows|see below]].
** Other releases of visual studio should also work (7 and 7.1)
** If they are installed in "c:/Program Files" they will be detected by the build script automatically
* [http://www.cygwin.com Cygwin] with the following packages
** tcltk
** svn
** cvs
** unzip
** curl
* With Developers Studio and cygwin installed, you only need to do the svn checkout and getbuildtest script to get a fully working Slicer3 plus all the tools you need to develop new code.
* If you build Slicer3, but can't get it to launch (either it fails silently, or gripes about not being able to find the itcl package, you can remedy this as follows:
** Go to System Properties -> Environment Variables and set TCL_LIBRARY to
with the path changed as necessary to reflect where tcl-build/lib is on your machine.
= Manual checkout/build of Slicer3 and support libraries: =
== Prerequisite software ==
You need to get and build the following packages if you aren't using the getbuildtest script:
# [http://www.cmake.org CMake (2.4.1 or later)]
# [http://www.tcl.tk Tcl/Tk (8.4 or later)]
# [http://sourceforge.net/projects/incrtcl/ incrTcl (3.2.1)]
# [http://www.vtk.org VTK 5.0]
# [http://www.itk.org ITK 2.8]
# [http://www.kwwidgets.org KWWidgets CVS head]
== Build Steps ==
$ svn co http://www.na-mic.org:8000/svn/Slicer3/trunk Slicer3
$ cvs -d :pserver:anoncvs@www.vtk.org:/cvsroot/VTK co VTK
$ cvs -d :pserver:anoncvs@www.itk.org:/cvsroot/Insight co Insight
  $ cvs -d :pserver:anoncvs@www.kwwidgets.org:/cvsroot/KWWidgets co KWWidgets
You may choose to take VTK5 instead of VTK CVS
=== Configure and build ITK ===
=== Configure and build VTK ===
* All systems:
<br />
* MacOSX specific (Make sure to install [http://www.apple.com/downloads/macosx/apple/x11formacosx.html X11]):
<br />
* Note, those options '''should not''' appear, since they disapear since VTK5:
* Make sure that the TCL and TK path are set properly
** TCL_* and TK_*
=== Configure and build KWWidgets ===
* You need to specify where your VTK build tree is.
== Build and Run Slicer3 ==
=== Manually ===
# Check out and build slicer3 (e.g. on linux)
  svn co http://www.na-mic.org:8000/svn/Slicer3/trunk Slicer3
  mkdir Slicer3-build
  cd Slicer3-build
  ccmake ../Slicer3
Again make sure to turn:
<br /> Start slicer with the Slicer3Launcher executable in your bin directory.
= Links =
* http://www.na-mic.org/Wiki/index.php/Slicer3
* http://www.na-mic.org:8000/websvn/listing.php?repname=Slicer3
== Information on Free Microsoft C++ Compiler on Windows ==
Be sure to follow '''all''' the steps on Microsoft link. Yes it means you need to download the compiler '''and''' sdk.
* http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

Latest revision as of 14:07, 10 July 2017

Home < Slicer3:Build Instructions

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