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

Annotation of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 433 - (hide annotations) (download) (as text)
Wed May 17 14:00:17 2006 UTC (11 years, 5 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 11521 byte(s)
ENH: add default locations for Slicer-lib and Slicer-build
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     cd $cwd
27     }
28    
29     # set up variables for the OS Builds, to facilitate the move to solaris9
30     # - solaris can be solaris8 or solaris9
31     set solaris "solaris8"
32     set linux "linux-x86"
33     set linux_64 "linux-x86_64"
34     set darwin "darwin-ppc"
35     set windows "win32"
36     #
37     # set the default locations for the main components
38     #
39     switch $::tcl_platform(os) {
40     "SunOS" { set ::env(BUILD) $solaris }
41     "Linux" {
42     if {$::tcl_platform(machine) == "x86_64"} {
43     set ::env(BUILD) $linux_64
44     } else {
45     set ::env(BUILD) $linux
46     }
47     }
48     "Darwin" { set ::env(BUILD) $darwin }
49     default {
50     set ::env(BUILD) $windows
51     set ::SLICER_HOME [file attributes $::SLICER_HOME -shortname]
52     set ::env(SLICER_HOME) $::SLICER_HOME
53     }
54     }
55    
56     puts stderr "SLICER_HOME is $::SLICER_HOME"
57    
58     # Choose which library versions you want to compile against. These
59     # shouldn't be changed between releases except for testing purposes.
60     # If you change them and Slicer breaks, you get to keep both pieces.
61     #
62     # When modifying these variables, make sure to make appropriate
63     # changes in the "Files to test if library has already been built"
64     # section below, or genlib will happily build the library again.
65    
66     set ::CMAKE_TAG "CMake-2-4-1"
67     set ::TEEM_TAG "Teem-1-9-0-patches"
68     set ::KWWidgets_TAG "HEAD"
69     set ::VTK_TAG "VTK-5-0"
70     set ::ITK_TAG "Slicer-2-6"
71     set ::TCL_TAG "core-8-4-6"
72     set ::TK_TAG "core-8-4-6"
73     set ::ITCL_TAG "itcl-3-2-1"
74     set ::IWIDGETS_TAG "iwidgets-4-0-1"
75     set ::BLT_TAG "blt24z"
76     set ::SANDBOX_TAG "http://svn.na-mic.org:8000/svn/NAMICSandBox/branches/Slicer-2-6"
77    
78     # Set library, binary, etc. paths...
79    
80 pieper 400 #set ::SLICER_LIB $::SLICER_HOME/Lib/$::env(BUILD) ;# as used in slicer2
81 pieper 433 # ;# now can be set outide
82 pieper 400 # ;# of this file
83    
84 pieper 433 # if SLICER_LIB and SLICER_BUILD haven't been set,
85     # then assume they are in the 'standard' places next to the source tree
86     # (as created by getbuildtest.tcl
87     if { ![info exists ::SLICER_LIB] } {
88     set wd [pwd]
89     cd $SLICER_HOME/../Slicer3-lib
90     set SLICER_LIB [pwd]
91     cd $wd
92     }
93     if { ![info exists ::SLICER_BUILD] } {
94     set wd [pwd]
95     cd $SLICER_HOME/../Slicer3-build
96     set SLICER_BUILD [pwd]
97     cd $wd
98     }
99    
100 pieper 376 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
101     set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
102     set ::VTK_DIR $::SLICER_LIB/VTK-build
103     set ::VTK_SRC_DIR $::SLICER_LIB/VTK
104     set ::VTK_BUILD_TYPE ""
105     set ::VTK_BUILD_SUBDIR ""
106     set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
107 pieper 400 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
108 pieper 376 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
109     set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
110     set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
111     set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
112     set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
113     set ::CMAKE_PATH $::SLICER_LIB/CMake-build
114     set ::SOV_BINARY_DIR ""
115     set ::XVNC_EXECUTABLE " "
116    
117    
118     # Files to test if library has already been built by genlib.tcl.
119    
120     switch $::tcl_platform(os) {
121     "SunOS" -
122     "Linux" {
123     set shared_lib_ext "so"
124     }
125     "Darwin" {
126     set shared_lib_ext "dylib"
127     }
128     "Windows NT" {
129     set shared_lib_ext "dll"
130     }
131     }
132    
133     # TODO: identify files for each platform
134    
135     switch $::tcl_platform(os) {
136     "SunOS" -
137     "Darwin" {
138     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
139    
140     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
141     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
142     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
143     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
144     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
145     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
146     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
147 pieper 433 set ::KWWidgets_TEST_FILE $KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
148 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
149     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
150     set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
151     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
152     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
153     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
154     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
155     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
156     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
157     }
158     "Linux" {
159     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
160    
161     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
162     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
163     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
164     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
165     set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
166     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
167     set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
168 pieper 400 set ::KWWidgets_TEST_FILE $KWWidgets_BUILD_DIR/bin/libKWWidgets.so
169 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
170     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
171     set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
172     set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
173     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
174     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
175     set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
176     set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
177     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
178     }
179     "Windows NT" {
180     # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
181    
182     #
183     ### Set your peferred build type:
184     #
185     #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
186     #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
187     set ::VTK_BUILD_TYPE Debug ;# a good default
188     set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
189     set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
190    
191     set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
192     set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
193     set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
194     set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
195     set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
196     set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
197     set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
198     set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
199     set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
200 pieper 400 set ::KWWidgets_TEST_FILE $KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
201 pieper 376 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
202     set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
203     set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
204     set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
205     set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
206     set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
207    
208     }
209     default {
210     puts stderr "Could not match platform \"$::tcl_platform(os)\"."
211     exit
212     }
213     }
214    
215     # System dependent variables
216    
217     switch $::tcl_platform(os) {
218     "SunOS" {
219     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
220     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
221     set ::GENERATOR "Unix Makefiles"
222     set ::COMPILER_PATH "/local/os/bin"
223     set ::COMPILER "g++"
224     set ::CMAKE $::CMAKE_PATH/bin/cmake
225     set ::MAKE "gmake"
226     set ::SERIAL_MAKE "gmake"
227     }
228     "Linux" {
229     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
230     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
231     set ::GENERATOR "Unix Makefiles"
232     set ::COMPILER_PATH "/usr/bin"
233     set ::COMPILER "g++"
234     set ::CMAKE $::CMAKE_PATH/bin/cmake
235 pieper 400 set ::MAKE "make -j 8"
236 pieper 376 set ::SERIAL_MAKE "make"
237     }
238     "Darwin" {
239     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
240     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
241     set ::GENERATOR "Unix Makefiles"
242     set ::COMPILER_PATH "/usr/bin"
243     set ::COMPILER "g++-3.3"
244     set ::CMAKE $::CMAKE_PATH/bin/cmake
245     set ::MAKE make
246     set ::SERIAL_MAKE make
247     }
248     default {
249     # different windows machines say different things, so assume
250     # that if it doesn't match above it must be windows
251     # (VC7 is Visual C++ 7.0, also known as the .NET version)
252    
253    
254     set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
255     set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
256    
257     set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
258    
259     set MSVC6 0
260     #
261     ## match this to the version of the compiler you have:
262     #
263    
264     ## for Visual Studio 6:
265     #set ::GENERATOR "Visual Studio 6"
266     #set ::MAKE "msdev"
267     #set ::COMPILER_PATH ""
268     #set MSVC6 1
269    
270     if {[info exists ::env(MSVC6)]} {
271     set ::MSVC6 $::env(MSVC6)
272     } else {
273     }
274    
275     ## for Visual Studio 7:
276     if {[info exists ::env(GENERATOR)]} {
277     set ::GENERATOR $::env(GENERATOR)
278     } else {
279     set ::GENERATOR "Visual Studio 7"
280     }
281    
282     if {[info exists ::env(MAKE)]} {
283     set ::MAKE $::env(MAKE)
284     } else {
285     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
286     }
287    
288     if {[info exists ::env(COMPILER_PATH)]} {
289     set ::COMPILER_PATH $::env(COMPILER_PATH)
290     } else {
291     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
292     }
293    
294     #
295     ## for Visual Studio 7.1:
296     # - automatically use newest if available
297     #
298     if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
299     set ::GENERATOR "Visual Studio 7 .NET 2003"
300     set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
301     set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
302     }
303    
304     set ::COMPILER "cl"
305     set ::SERIAL_MAKE $::MAKE
306    
307     }
308     }
309    
310    

  ViewVC Help
Powered by ViewVC 1.1.22