/[Slicer3]/oldtrunk/slicer_variables.tcl
ViewVC logotype

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3301 - (hide annotations) (download) (as text)
Tue May 1 14:34:57 2007 UTC (10 years, 5 months ago) by hliu
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 13348 byte(s)
ENH: replaced OpenTracker with NaviTrack.
1 pieper 376
2     #
3     # Note: this local vars file overrides sets the default environment for :
4     # Scripts/genlib.tcl -- make all the support libs
5     # Scripts/cmaker.tcl -- makes slicer code
6     # launch.tcl -- sets up the runtime env and starts slicer
7     # Scripts/tarup.tcl -- makes a tar.gz files with all the support files
8     #
9     # - use this file to set your local environment and then your change won't
10     # be overwritten when those files are updated through CVS
11     #
12    
13    
14     ## variables that are the same for all systems
15     set ::SLICER_DATA_ROOT ""
16    
17     if {[info exists ::env(SLICER_HOME)]} {
18     # already set by the launcher
19     set ::SLICER_HOME $::env(SLICER_HOME)
20     } else {
21     # if sourcing this into cmaker, SLICER_HOME may not be set
22     # set the SLICER_HOME directory to the one in which this script resides
23     set cwd [pwd]
24     cd [file dirname [info script]]
25     set ::SLICER_HOME [pwd]
26 pieper 435 set ::env(SLICER_HOME) $::SLICER_HOME
27 pieper 376 cd $cwd
28     }
29    
30     # set up variables for the OS Builds, to facilitate the move to solaris9
31     # - solaris can be solaris8 or solaris9
32 pieper 435 set ::SOLARIS "solaris8"
33     set ::LINUX "linux-x86"
34     set ::LINUX_64 "linux-x86_64"
35     set ::DARWIN "darwin-ppc"
36 naucoin 2494 set ::DARWIN_X86 "darwin-x86"
37 pieper 435 set ::WINDOWS "win32"
38    
39 pieper 376 #
40     # set the default locations for the main components
41     #
42     switch $::tcl_platform(os) {
43 pieper 435 "SunOS" { set ::env(BUILD) $::SOLARIS }
44 pieper 376 "Linux" {
45     if {$::tcl_platform(machine) == "x86_64"} {
46 pieper 435 set ::env(BUILD) $::LINUX_64
47 pieper 376 } else {
48 pieper 435 set ::env(BUILD) $::LINUX
49 pieper 376 }
50     }
51 naucoin 2494 "Darwin" {
52 lauren 2510 if {$::tcl_platform(machine) == "i386"} {
53 naucoin 2494 set ::env(BUILD) $::DARWIN_X86
54     } else {
55     set ::env(BUILD) $::DARWIN
56     }
57     }
58 pieper 376 default {
59 pieper 435 set ::env(BUILD) $::WINDOWS
60 pieper 376 set ::SLICER_HOME [file attributes $::SLICER_HOME -shortname]
61     set ::env(SLICER_HOME) $::SLICER_HOME
62     }
63     }
64    
65     puts stderr "SLICER_HOME is $::SLICER_HOME"
66    
67     # Choose which library versions you want to compile against. These
68     # shouldn't be changed between releases except for testing purposes.
69     # If you change them and Slicer breaks, you get to keep both pieces.
70     #
71     # When modifying these variables, make sure to make appropriate
72     # changes in the "Files to test if library has already been built"
73     # section below, or genlib will happily build the library again.
74    
75 pieper 2143 #set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/branches/Slicer3.0-PreAHMBeta"
76 hliu 3288 set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/trunk"
77 pieper 879 set ::CMAKE_TAG "CMake-2-4-2"
78 pieper 3132 #set ::TEEM_TAG "HEAD"
79 pieper 376 set ::TEEM_TAG "Teem-1-9-0-patches"
80     set ::KWWidgets_TAG "HEAD"
81 pieper 1114 set ::VTK_TAG "VTK-5-0"
82 pieper 3132 set ::ITK_TAG ITK-3-2
83 pieper 376 set ::TCL_TAG "core-8-4-6"
84     set ::TK_TAG "core-8-4-6"
85     set ::ITCL_TAG "itcl-3-2-1"
86     set ::IWIDGETS_TAG "iwidgets-4-0-1"
87     set ::BLT_TAG "blt24z"
88 pieper 2730 set ::SANDBOX_TAG "http://svn.na-mic.org/svn/NAMICSandBox/branches/Slicer-2-6"
89 pieper 376
90     # Set library, binary, etc. paths...
91    
92 pieper 433 # if SLICER_LIB and SLICER_BUILD haven't been set,
93     # then assume they are in the 'standard' places next to the source tree
94     # (as created by getbuildtest.tcl
95     if { ![info exists ::SLICER_LIB] } {
96     set wd [pwd]
97 pieper 435 cd $::SLICER_HOME/../Slicer3-lib
98     set ::SLICER_LIB [pwd]
99 pieper 433 cd $wd
100     }
101     if { ![info exists ::SLICER_BUILD] } {
102     set wd [pwd]
103 pieper 435 cd $::SLICER_HOME/../Slicer3-build
104     set ::SLICER_BUILD [pwd]
105 pieper 433 cd $wd
106     }
107    
108 pieper 376 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
109     set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
110     set ::VTK_DIR $::SLICER_LIB/VTK-build
111     set ::VTK_SRC_DIR $::SLICER_LIB/VTK
112 alexy 1573 set ::VTK_BUILD_TYPE "Debug"
113 pieper 376 set ::VTK_BUILD_SUBDIR ""
114     set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
115 pieper 400 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
116 pieper 435 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
117 pieper 376 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
118     set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
119     set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
120     set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
121     set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
122     set ::CMAKE_PATH $::SLICER_LIB/CMake-build
123     set ::SOV_BINARY_DIR ""
124     set ::XVNC_EXECUTABLE " "
125 hliu 3004 set ::IGSTK_DIR $::SLICER_LIB/IGSTK-build
126 pieper 376
127    
128 hliu 3004 # Options for building IGT modules in Slicer
129     set ::IGSTK "OFF"
130 hliu 3301 set ::NAVITRACK "OFF"
131 pieper 376
132 hliu 3301 # The absolute path and directory containing the navitrack library,
133     # for instance on linux the libNaviTrack.so
134     # set ::NAVITRACK_LIB_DIR /home/hliu/projects/navitrack/NaviTrack-build
135     set ::NAVITRACK_LIB_DIR ""
136 hliu 3004
137 hliu 3301 # The navitrack include directry, e.g.
138     # /home/hliu/projects/navitrack/NaviTrack/include
139     # set ::NAVITRACK_INC_DIR /home/hliu/projects/navitrack/NaviTrack/include
140     set ::NAVITRACK_INC_DIR ""
141 hliu 3004
142 pieper 376 switch $::tcl_platform(os) {
143     "SunOS" -
144     "Linux" {
145     set shared_lib_ext "so"
146     }
147     "Darwin" {
148     set shared_lib_ext "dylib"
149     }
150     "Windows NT" {
151     set shared_lib_ext "dll"
152     }
153     }
154    
155     # TODO: identify files for each platform
156    
157     switch $::tcl_platform(os) {
158     "SunOS" -
159     "Darwin" {
160     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
161    
162     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
163     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
164     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
165     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
166     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
167     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
168     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
169 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
170 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
171     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
172     set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
173     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
174     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
175     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
176     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
177     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
178     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
179 hliu 3004 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.so
180    
181 pieper 376 }
182     "Linux" {
183     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
184    
185     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
186     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
187     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
188     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
189     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
190     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
191     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
192 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
193 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
194     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
195     set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
196     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
197     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
198     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
199     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
200     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
201     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
202 hliu 3004 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/libIGSTK.so
203    
204 pieper 376 }
205     "Windows NT" {
206     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
207    
208 pieper 1414 #
209     ### Set your peferred build type:
210     #
211     #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
212     #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
213     #set ::VTK_BUILD_TYPE Debug ;# a good default
214 alexy 1573 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# a good default
215 pieper 376 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
216     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
217    
218     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
219     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
220     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
221     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
222     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
223     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
224     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
225     set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
226 pieper 435 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
227 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
228     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
229     set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
230     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
231     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
232     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
233 pieper 3016 set ::IGSTK_TEST_FILE $::IGSTK_DIR/bin/$::VTK_BUILD_TYPE/IGSTK.lib
234 pieper 376 }
235     default {
236     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
237     exit
238     }
239     }
240    
241     # System dependent variables
242    
243     switch $::tcl_platform(os) {
244     "SunOS" {
245     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
246     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
247     set ::GENERATOR "Unix Makefiles"
248     set ::COMPILER_PATH "/local/os/bin"
249     set ::COMPILER "g++"
250     set ::CMAKE $::CMAKE_PATH/bin/cmake
251     set ::MAKE "gmake"
252     set ::SERIAL_MAKE "gmake"
253     }
254     "Linux" {
255     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
256     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
257     set ::GENERATOR "Unix Makefiles"
258     set ::COMPILER_PATH "/usr/bin"
259     set ::COMPILER "g++"
260     set ::CMAKE $::CMAKE_PATH/bin/cmake
261 pieper 885 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
262 pieper 883 set ::MAKE "make -j [expr $numCPUs * 2]"
263 pieper 376 set ::SERIAL_MAKE "make"
264     }
265     "Darwin" {
266     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
267     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
268     set ::GENERATOR "Unix Makefiles"
269     set ::COMPILER_PATH "/usr/bin"
270 hayes 933 set ::COMPILER "g++"
271 pieper 376 set ::CMAKE $::CMAKE_PATH/bin/cmake
272     set ::MAKE make
273     set ::SERIAL_MAKE make
274     }
275     default {
276     # different windows machines say different things, so assume
277     # that if it doesn't match above it must be windows
278     # (VC7 is Visual C++ 7.0, also known as the .NET version)
279    
280    
281     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
282     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
283    
284     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
285    
286     set MSVC6 0
287     #
288     ## match this to the version of the compiler you have:
289     #
290    
291     ## for Visual Studio 6:
292     #set ::GENERATOR "Visual Studio 6"
293     #set ::MAKE "msdev"
294     #set ::COMPILER_PATH ""
295     #set MSVC6 1
296    
297     if {[info exists ::env(MSVC6)]} {
298     set ::MSVC6 $::env(MSVC6)
299     } else {
300     }
301    
302     ## for Visual Studio 7:
303     if {[info exists ::env(GENERATOR)]} {
304     set ::GENERATOR $::env(GENERATOR)
305     } else {
306     set ::GENERATOR "Visual Studio 7"
307     }
308    
309     if {[info exists ::env(MAKE)]} {
310     set ::MAKE $::env(MAKE)
311     } else {
312     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
313     }
314    
315     if {[info exists ::env(COMPILER_PATH)]} {
316     set ::COMPILER_PATH $::env(COMPILER_PATH)
317     } else {
318     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
319     }
320    
321     #
322     ## for Visual Studio 7.1:
323 pieper 917 # - automatically use newer if available
324 pieper 376 #
325     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
326     set ::GENERATOR "Visual Studio 7 .NET 2003"
327     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
328     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
329     }
330    
331 pieper 917 #
332     ## for Visual Studio 8
333     # - automatically use newest if available
334 pieper 1456 # - use full if available, otherwise express
335 pieper 917 #
336     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
337     set ::GENERATOR "Visual Studio 8 2005"
338     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
339     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
340     }
341    
342 pieper 1456
343     if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
344     set ::GENERATOR "Visual Studio 8 2005"
345     set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
346     set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
347     }
348    
349 pieper 376 set ::COMPILER "cl"
350     set ::SERIAL_MAKE $::MAKE
351     }
352     }
353    
354    

  ViewVC Help
Powered by ViewVC 1.1.22