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

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 400 - (show annotations) (download) (as text)
Fri May 12 16:33:59 2006 UTC (11 years, 5 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 11090 byte(s)
ENH: updated genlib for slicer3 plus a new getbuildtest.tcl that is a one liner to set up development on a new machine (and for using in cron jobs)
1
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 #set ::SLICER_LIB $::SLICER_HOME/Lib/$::env(BUILD) ;# as used in slicer2
81 # ;# now must be set outide
82 # ;# of this file
83
84 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
85 set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
86 set ::VTK_DIR $::SLICER_LIB/VTK-build
87 set ::VTK_SRC_DIR $::SLICER_LIB/VTK
88 set ::VTK_BUILD_TYPE ""
89 set ::VTK_BUILD_SUBDIR ""
90 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
91 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
92 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
93 set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
94 set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
95 set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
96 set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
97 set ::CMAKE_PATH $::SLICER_LIB/CMake-build
98 set ::SOV_BINARY_DIR ""
99 set ::XVNC_EXECUTABLE " "
100
101
102 # Files to test if library has already been built by genlib.tcl.
103
104 switch $::tcl_platform(os) {
105 "SunOS" -
106 "Linux" {
107 set shared_lib_ext "so"
108 }
109 "Darwin" {
110 set shared_lib_ext "dylib"
111 }
112 "Windows NT" {
113 set shared_lib_ext "dll"
114 }
115 }
116
117 # TODO: identify files for each platform
118
119 switch $::tcl_platform(os) {
120 "SunOS" -
121 "Darwin" {
122 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
123
124 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
125 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
126 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
127 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
128 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
129 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
130 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
131 set ::KWWidgets_TEST_FILE $KWWidgets_BUILD_DIR/bin/libKWWidgets.so
132 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
133 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
134 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
135 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
136 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
137 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
138 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
139 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
140 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
141 }
142 "Linux" {
143 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
144
145 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
146 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
147 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
148 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
149 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
150 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
151 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
152 set ::KWWidgets_TEST_FILE $KWWidgets_BUILD_DIR/bin/libKWWidgets.so
153 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
154 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
155 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
156 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
157 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
158 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
159 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
160 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
161 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
162 }
163 "Windows NT" {
164 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
165
166 #
167 ### Set your peferred build type:
168 #
169 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
170 #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
171 set ::VTK_BUILD_TYPE Debug ;# a good default
172 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
173 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
174
175 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
176 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
177 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
178 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
179 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
180 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
181 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
182 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
183 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
184 set ::KWWidgets_TEST_FILE $KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
185 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
186 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
187 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
188 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
189 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
190 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
191
192 }
193 default {
194 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
195 exit
196 }
197 }
198
199 # System dependent variables
200
201 switch $::tcl_platform(os) {
202 "SunOS" {
203 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
204 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
205 set ::GENERATOR "Unix Makefiles"
206 set ::COMPILER_PATH "/local/os/bin"
207 set ::COMPILER "g++"
208 set ::CMAKE $::CMAKE_PATH/bin/cmake
209 set ::MAKE "gmake"
210 set ::SERIAL_MAKE "gmake"
211 }
212 "Linux" {
213 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
214 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
215 set ::GENERATOR "Unix Makefiles"
216 set ::COMPILER_PATH "/usr/bin"
217 set ::COMPILER "g++"
218 set ::CMAKE $::CMAKE_PATH/bin/cmake
219 set ::MAKE "make -j 8"
220 set ::SERIAL_MAKE "make"
221 }
222 "Darwin" {
223 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
224 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
225 set ::GENERATOR "Unix Makefiles"
226 set ::COMPILER_PATH "/usr/bin"
227 set ::COMPILER "g++-3.3"
228 set ::CMAKE $::CMAKE_PATH/bin/cmake
229 set ::MAKE make
230 set ::SERIAL_MAKE make
231 }
232 default {
233 # different windows machines say different things, so assume
234 # that if it doesn't match above it must be windows
235 # (VC7 is Visual C++ 7.0, also known as the .NET version)
236
237
238 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
239 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
240
241 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
242
243 set MSVC6 0
244 #
245 ## match this to the version of the compiler you have:
246 #
247
248 ## for Visual Studio 6:
249 #set ::GENERATOR "Visual Studio 6"
250 #set ::MAKE "msdev"
251 #set ::COMPILER_PATH ""
252 #set MSVC6 1
253
254 if {[info exists ::env(MSVC6)]} {
255 set ::MSVC6 $::env(MSVC6)
256 } else {
257 }
258
259 ## for Visual Studio 7:
260 if {[info exists ::env(GENERATOR)]} {
261 set ::GENERATOR $::env(GENERATOR)
262 } else {
263 set ::GENERATOR "Visual Studio 7"
264 }
265
266 if {[info exists ::env(MAKE)]} {
267 set ::MAKE $::env(MAKE)
268 } else {
269 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
270 }
271
272 if {[info exists ::env(COMPILER_PATH)]} {
273 set ::COMPILER_PATH $::env(COMPILER_PATH)
274 } else {
275 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
276 }
277
278 #
279 ## for Visual Studio 7.1:
280 # - automatically use newest if available
281 #
282 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
283 set ::GENERATOR "Visual Studio 7 .NET 2003"
284 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
285 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
286 }
287
288 set ::COMPILER "cl"
289 set ::SERIAL_MAKE $::MAKE
290
291 }
292 }
293
294

  ViewVC Help
Powered by ViewVC 1.1.22