visit-bin-dist 19.3 KB
Newer Older
hrchilds's avatar
hrchilds committed
1 2 3 4 5 6 7 8 9 10
#!/bin/csh -f
#-----------------------------------------------------------------------
#
# VISIT-BIN-DIST - Build a compressed tar file from the visit executable
#                  built in the dev directory.
#
# Author: Eric Brugger
# Date:   October 26, 2000
#
# Usage:
hrchilds's avatar
hrchilds committed
11 12
#    visit-bin-dist [-c] [-g] [-h] [-md <visit_dir>] [-nd] [-nmesa] [-npython]
#                   [-nqt] [-nstrip] [-nvtk] [-os <operating_system>]
hrchilds's avatar
hrchilds committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
#
# Modifications:
#    Jeremy Meredith, Fri May 11 14:15:01 PDT 2001
#    Added distribution of VTK, shared libraries, and plot plugins.
#
#    Jeremy Meredith, Mon Jun 25 21:39:53 PDT 2001
#    Changed the finding of Qt to be independent of its version.
#    Made it look for engine_par and engine_ser.
#    Fixed a couple bugs for solaris.
#
#    Jeremy Meredith, Thu Jul 26 09:20:24 PDT 2001
#    Added distribution of operator plugins.
#
#    Eric Brugger, Wed Sep  5 07:49:38 PDT 2001
#    Added distribution of the splash screen.
#
#    Brad Whitlock, Tue Nov 13 10:07:47 PDT 2001
#    Added python to the package.
#
#    Hank Chlids, Fri Dec 21 09:32:45 PST 2001
#    Add support for the new VTK.
#
#    Jeremy Meredith, Wed Jan  9 14:16:26 PST 2002
#    Removed AIX strangeness.
#
#    Eric Brugger, Wed Feb 20 10:39:56 PST 2002
#    Add support for distributing sample data files.
#
#    Eric Brugger, Wed Apr 10 10:01:25 PDT 2002
#    Add the cli to the list of executables to distribute.  Correct
#    the distribution of the vtk libraries.
#
#    Eric Brugger, Tue Apr 16 10:54:25 PDT 2002
#    Add support for distributing the mesa libraries.
#
#    Jeremy Meredith, Wed Apr 17 12:44:19 PDT 2002
#    Made it assume the test binaries get put into VisItDir/data
#    instead of VisItDir/bin.
#
#    Eric Brugger, Fri May 10 10:37:52 PDT 2002
#    Add support for stripping the executables and shared libraries.
#
#    Brad Whitlock, Tue Jun 4 11:34:16 PDT 2002
#    Checked the Qt version when creating the Qt links.
#
#    Jeremy Meredith, Mon Jun 17 15:42:28 PDT 2002
#    Split linux into intel and alpha versions.  Made some repetitive
#    code use loops.  Accomplished all chmods by a single call to
#    chmod -R.   Added the python tree to the distribution.
#
#    Brad Whitlock, Fri Jun 21 15:42:28 PDT 2002
#    Added tire and noise databases.
#
#    Jeremy Meredith, Fri Jul 12 14:39:37 PDT 2002
#    Added distribution of our include files, as well as qt's moc.
#    Added distribution of the plugin creation tools.
#
#    Brad Whitlock, Fri Jul 12 18:17:29 PST 2002
#    Added help files to the distribution.
#
#    Jeremy Meredith, Thu Jul 18 16:30:47 PDT 2002
#    Made the python library in the lib directory be a symlink.
#    Prevented one error message from the Qt library.
#
#    Jeremy Meredith, Mon Jul 22 12:44:16 PDT 2002
#    Added silex and curv3dprep.
#
#    Brad Whitlock, Fri Aug 16 10:09:07 PDT 2002
#    I added a directory for the Java/VisIt class files.
#
#    Jeremy Meredith, Tue Aug 27 21:27:03 PDT 2002
#    I added datbase plugins.
#
#    Jeremy Meredith, Sat Sep 21 08:57:35 PDT 2002
#    I made the search for Qt library a little more restrictive.
#    
#    Jeremy Meredith, Thu Oct 17 16:40:31 PDT 2002
#    Added xmltest and the xml editor to the distribution.
#
#    Eric Brugger, Fri Jan 10 09:02:16 PST 2003
#    Added libvtkfreetype.so and libvtkftgl.so to the distribution.
#
#    Eric Brugger, Mon Mar 10 08:13:17 PST 2003
#    Added text2polys and time_annotation to the distribution.
#
#    Eric Brugger, Thu Mar 13 08:13:29 PST 2003
#    Added a "current" link to distribution.
#
#    Eric Brugger, Wed Apr 16 11:03:53 PDT 2003
#    Change MangledMesaInclude to MangleMesaInclude.
#
#    Jeremy Meredith, Wed May  7 14:36:35 PDT 2003
#    Split include/visit/*.h into two parts to it doesn't overflow
#    argument lists.
#
#    Eric Brugger, Wed May 14 08:59:59 PDT 2003
#    Added vcl to the distribution.
#
hrchilds's avatar
hrchilds committed
111 112 113 114
#    Eric Brugger, Thu Jul  3 08:15:29 PDT 2003
#    Remove the version number option and make it determine the version
#    number from the version file. Add a help option.
#
hrchilds's avatar
hrchilds committed
115 116 117
#    Eric Brugger, Tue Jul 22 08:31:45 PDT 2003
#    Add visit-config-open and visit-config-closed to the distribution.
#
hrchilds's avatar
hrchilds committed
118 119 120 121 122 123 124 125 126 127 128
#-----------------------------------------------------------------------

set DataFiles = "TRUE"
set QtLibs = "TRUE"
set MesaLibs = "TRUE"
set VTKLibs = "TRUE"
set PythonExe = "TRUE"
set Compress = GZIP
set VisItDir = .
set OSGiven = "FALSE"
set Strip = "TRUE"
hrchilds's avatar
hrchilds committed
129
set Help = "FALSE"
hrchilds's avatar
hrchilds committed
130 131 132 133 134 135 136 137 138

#
# Parse the argument list.
#
while ($#argv >= 1)
   switch ($1)
      case -c:
               set Compress = COMPRESS
               breaksw
hrchilds's avatar
hrchilds committed
139

hrchilds's avatar
hrchilds committed
140 141 142
      case -g:
               set Compress = GZIP
               breaksw
hrchilds's avatar
hrchilds committed
143 144 145 146

      case -h:
      case -help:
               set Help = TRUE
hrchilds's avatar
hrchilds committed
147
               breaksw
hrchilds's avatar
hrchilds committed
148

hrchilds's avatar
hrchilds committed
149 150 151 152
      case -md:
               shift
               set VisItDir = $1
               breaksw
hrchilds's avatar
hrchilds committed
153

hrchilds's avatar
hrchilds committed
154 155 156 157 158 159 160 161 162 163 164 165 166 167
      case -nd:
               set DataFiles = FALSE
               breaksw

      case -nmesa:
      case -nomesa:
               set MesaLibs = FALSE
               breaksw

      case -npython:
      case -nopython:
               set PythonExe = FALSE
               breaksw

hrchilds's avatar
hrchilds committed
168 169 170 171 172
      case -nqt:
      case -noqt:
               set QtLibs = FALSE
               breaksw

hrchilds's avatar
hrchilds committed
173 174 175 176 177
      case -nstrip:
      case -nostrip:
               set Strip = FALSE
               breaksw

hrchilds's avatar
hrchilds committed
178 179 180 181 182 183
      case -nvtk:
      case -novtk:
               set VTKLibs = FALSE
               breaksw

      case -os:
hrchilds's avatar
hrchilds committed
184
               shift
hrchilds's avatar
hrchilds committed
185 186
               set os = $1
               set OSGiven = TRUE
hrchilds's avatar
hrchilds committed
187
               breaksw
hrchilds's avatar
hrchilds committed
188

hrchilds's avatar
hrchilds committed
189 190 191 192 193 194 195 196 197
      default:
               echo " "
               echo ">>>>>>>>>>  Illegal option $1  <<<<<<<<<<"
               echo " "
               breaksw
   endsw
   shift
end

hrchilds's avatar
hrchilds committed
198 199 200 201
if ($Help == TRUE) then
   echo "Usage: visit-bin-dist [-c] [-g] [-h] [-md <visit_dir>] [-nd] [-nmesa]"
   echo "                      [-npython] [-nqt] [-nstrip] [-nvtk]"
   echo "                      [-os <operating_system>]"
hrchilds's avatar
hrchilds committed
202 203 204
   echo ""
   echo "       -c             Compress the resultant package."
   echo "       -g             Gzip the resultant package.  (default)"
hrchilds's avatar
hrchilds committed
205 206
   echo "       -h             Print this message."
   echo "       -md dir        Set where to find the distribution."
hrchilds's avatar
hrchilds committed
207 208 209
   echo "       -nd            No data files."
   echo "       -nmesa         No Mesa libraries."
   echo "       -npython       No Python executable."
hrchilds's avatar
hrchilds committed
210
   echo "       -nqt           No Qt libraries."
hrchilds's avatar
hrchilds committed
211
   echo "       -nstrip        Do not strip the execubles and libraries."
hrchilds's avatar
hrchilds committed
212 213
   echo "       -nvtk          No VTK libraries."
   echo "       -os os         Operating system."
hrchilds's avatar
hrchilds committed
214 215 216 217
   exit (1)
endif

#
hrchilds's avatar
hrchilds committed
218
# Determine the operating system.
hrchilds's avatar
hrchilds committed
219
#
hrchilds's avatar
hrchilds committed
220 221 222
if("$OSGiven" == "FALSE") then
    set os = `/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
endif
hrchilds's avatar
hrchilds committed
223 224

#
hrchilds's avatar
hrchilds committed
225
# Set up the distribution directory and get rid of any old versions
hrchilds's avatar
hrchilds committed
226
#
hrchilds's avatar
hrchilds committed
227 228
rm -rf distribution
mkdir distribution
hrchilds's avatar
hrchilds committed
229 230

#
hrchilds's avatar
hrchilds committed
231
# Check that the version exists.
hrchilds's avatar
hrchilds committed
232
#
hrchilds's avatar
hrchilds committed
233 234 235 236 237 238
if (! -e $VisItDir/VERSION) then
   echo " "
   echo "Error: The file $VisItDir/VERSION does not exist. aborting ..."
   echo " "
   exit (1)
endif
hrchilds's avatar
hrchilds committed
239 240

#
hrchilds's avatar
hrchilds committed
241
# Check that the launch script exists.
hrchilds's avatar
hrchilds committed
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
#
if (! -e $VisItDir/bin/visit) then
   echo " "
   echo "Error: The file $VisItDir/bin/visit does not exist. aborting ..."
   echo " "
   exit (1)
endif

#
# Check that the data directory exists so that the data files can be created.
#
if (("$DataFiles" == "TRUE") && (! -e $VisItDir/data)) then
   echo "The directory $VisItDir/data does not exist."
   echo "Distribution will not contain sample data files."
   set DataFiles = "FALSE"
endif

hrchilds's avatar
hrchilds committed
259 260 261 262 263
#
# Deterime the version number.
#
set Version = `cat $VisItDir/VERSION`

hrchilds's avatar
hrchilds committed
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
#
# Determine the name of the Qt shared library.
#
set QtLibName = `cd $VisItDir/lib && ls libqt.so.?.?.?`

#
# Check that the Qt libraries exist.
#
if (("$QtLibs" == "TRUE") && (! -e $VisItDir/lib/$QtLibName)) then
   echo " "
   echo "Error: The file $VisItDir/lib/$QtLibName does not exist. aborting ..."
   echo " "
   exit (1)
endif

#
# Determine the names of the Mesa shared libraries.
#
set MesaOSMesaLibName = "libOSMesa.so"
set MesaMesaGLLibName = "libMesaGL.so"

#
# Check that the Mesa libraries exist.
#
if (("$MesaLibs" == "TRUE") && \
    ((! -e $VisItDir/lib/$MesaOSMesaLibName) || \
     (! -e $VisItDir/lib/$MesaMesaGLLibName))) then
   echo " "
   echo "Error: Missing Mesa libraries in $VisItDir/lib. aborting ..."
   echo " "
   exit (1)
endif

#
# Determine the names of the VTK shared libraries.
#
set VTKCoLibName = "libvtkCommon.so"
set VTKFiLibName = "libvtkFiltering.so"
set VTKGrLibName = "libvtkGraphics.so"
set VTKHyLibName = "libvtkHybrid.so"
set VTKImLibName = "libvtkImaging.so"
set VTKIoLibName = "libvtkIO.so"
set VTKReLibName = "libvtkRendering.so"
set VTKExLibName = "libvtkexpat.so"
set VTKFrLibName = "libvtkfreetype.so"
set VTKFtLibName = "libvtkftgl.so"
set VTKPnLibName = "libvtkpng.so"
set VTKJpLibName = "libvtkjpeg.so"
set VTKTiLibName = "libvtktiff.so"
set VTKZlLibName = "libvtkzlib.so"

#
# Check that the VTK libraries exist.
#
if (("$VTKLibs" == "TRUE") && \
    ((! -e $VisItDir/lib/$VTKCoLibName) || \
     (! -e $VisItDir/lib/$VTKFiLibName) || \
     (! -e $VisItDir/lib/$VTKGrLibName) || \
     (! -e $VisItDir/lib/$VTKHyLibName) || \
     (! -e $VisItDir/lib/$VTKImLibName) || \
     (! -e $VisItDir/lib/$VTKIoLibName) || \
     (! -e $VisItDir/lib/$VTKReLibName) || \
     (! -e $VisItDir/lib/$VTKExLibName) || \
     (! -e $VisItDir/lib/$VTKFrLibName) || \
     (! -e $VisItDir/lib/$VTKFtLibName) || \
     (! -e $VisItDir/lib/$VTKPnLibName) || \
     (! -e $VisItDir/lib/$VTKJpLibName) || \
     (! -e $VisItDir/lib/$VTKTiLibName) || \
     (! -e $VisItDir/lib/$VTKZlLibName))) then
   echo " "
   echo "Error: Missing VTK libraries in $VisItDir/lib. aborting ..."
   echo " "
   exit (1)
endif

#
# Make the directory structure shell.
#
mkdir distribution/visit
mkdir distribution/visit/bin
if ($DataFiles == "TRUE") then
    mkdir distribution/visit/data
endif

mkdir distribution/visit/$Version
ln -s $Version distribution/visit/current
set platforms="hp-hpux-pa sgi-irix6-mips2 sun4-sunos5-sparc ibm-aix-pwr dec-osf1-alpha linux-intel linux-alpha intel-tflops-ppro"
foreach platform ($platforms)
   mkdir distribution/visit/$Version/$platform
   mkdir distribution/visit/$Version/$platform/bin
   mkdir distribution/visit/$Version/$platform/lib
   mkdir distribution/visit/$Version/$platform/include
   mkdir distribution/visit/$Version/$platform/help
   mkdir distribution/visit/$Version/$platform/plugins
   mkdir distribution/visit/$Version/$platform/plugins/plots
   mkdir distribution/visit/$Version/$platform/plugins/operators
   mkdir distribution/visit/$Version/$platform/plugins/databases
   mkdir distribution/visit/$Version/$platform/java
end

#
# Create and copy in the sample data files.
#
if ($DataFiles == "TRUE") then
   set pwd = `pwd`
   cd $VisItDir/data
   make
   ./globe
   ./multi_test
   ./testall
   ./noise
   ./tire
   rm multi_point* multi_rect* multi_curv* poly3d.silo
   cp *.silo $pwd/distribution/visit/data
   cd $pwd/distribution/visit/data
   cd $pwd
endif

#
# Find the executables built and copy them to the appropriate bin
# directory.
#

#
# Determine the os version string and hardware os string.
#
switch ($os)
   case hp-ux:
      echo "Found an HP-UX version of visit"
      set osver = hp
      set visitbindir = hp-hpux-pa
      breaksw

   case irix:
      set version = `/bin/uname -r`
      set osver = irix`expr $version : '\([456]\).*'`
      if ($osver == irix6) then
         echo "Found an IRIX 6 version of visit"
         set osver = irix6
         set visitbindir = sgi-irix6-mips2
      endif
      breaksw

   case sunos:
      echo "Found a Solaris version of visit"
      set version = '/bin/uname -r'
      set osver = sunos5
      set visitbindir = sun4-sunos5-sparc
      breaksw

   case aix:
      echo "Found an AIX version of visit"
      set osver = aix
      set visitbindir = ibm-aix-pwr
      breaksw

   case osf:
      echo "Found an OSF1 version of visit"
      set osver = osf1
      set visitbindir = dec-osf1-alpha
      breaksw

   case linux:
      echo "Found a Linux version of visit"
      set osver = linux
      set arch = `/bin/uname -m`
      switch ($arch)
         case i486:
         case i586:
         case i686:
            set visitbindir = linux-intel
            breaksw
         case alpha:
            set visitbindir = linux-alpha
            breaksw
      endsw
      breaksw

   case tflops:
      echo "Found a TFLOPS version of visit"
      set osver = tflops
      set visitbindir = intel-tflops-ppro
      breaksw
endsw

hrchilds's avatar
hrchilds committed
449
set verdir = distribution/visit/$Version
hrchilds's avatar
hrchilds committed
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609
set bindir = distribution/visit/$Version/$visitbindir/bin
set libdir = distribution/visit/$Version/$visitbindir/lib
set incdir = distribution/visit/$Version/$visitbindir/include
set helpdir = distribution/visit/$Version/$visitbindir/help
set plugindir = distribution/visit/$Version/$visitbindir/plugins
set javadir = distribution/visit/$Version/$visitbindir/java

#
# Copy the executables to the distribution.
#
cp $VisItDir/bin/visit         distribution/visit/bin/visit
cp $VisItDir/bin/cli           $bindir/cli
cp $VisItDir/bin/engine_ser    $bindir/engine_ser
if(-e $VisItDir/bin/engine_par) then
    cp $VisItDir/bin/engine_par $bindir/engine_par
endif
cp $VisItDir/bin/gui           $bindir/gui
cp $VisItDir/bin/mdserver      $bindir/mdserver
cp $VisItDir/bin/splashscreen  $bindir/splashscreen
cp $VisItDir/bin/vcl           $bindir/vcl
cp $VisItDir/bin/viewer        $bindir/viewer
# copy qt's moc, too
cp $VisItDir/bin/moc           $bindir/moc
# copy the xml plugin creation tools
cp $VisItDir/bin/xml2*         $bindir
cp $VisItDir/bin/xmltest       $bindir
cp $VisItDir/bin/xmledit       $bindir
# copy silex
cp $VisItDir/bin/silex         $bindir
# copy curv3dprep
cp $VisItDir/bin/curv3dprep    $bindir
# copy text2polys and time_annotation
cp $VisItDir/bin/text2polys    $bindir
cp $VisItDir/bin/time_annotation $bindir

#
# Copy the VisIt libraries to the distribution.
#
cp `ls $VisItDir/lib/*.so | grep -v libvtk | grep -v libqt | grep -v libpython` $libdir
cp $VisItDir/lib/libvtkqt.so $libdir

#
# Copy the Qt libraries to the distribution.
#
cp $VisItDir/lib/$QtLibName $libdir/$QtLibName
set majorVersion = `echo $QtLibName | awk '{printf substr($1, 10, 1)}'`
set minorVersion = `echo $QtLibName | awk '{printf substr($1, 12, 1)}'`
ln -s $QtLibName $libdir/libqt.so.$majorVersion.$minorVersion
ln -s $QtLibName $libdir/libqt.so.$majorVersion
ln -s $QtLibName $libdir/libqt.so

#
# Copy the Mesa libraries to the distribution.
#
cp $VisItDir/lib/$MesaOSMesaLibName $libdir/$MesaOSMesaLibName
cp $VisItDir/lib/$MesaMesaGLLibName $libdir/$MesaMesaGLLibName

#
# Copy Python to the distribution
#
set pyver = `basename $VisItDir/lib/python/lib/python?.?`;
mkdir $libdir/python
mkdir $libdir/python/lib
mkdir $libdir/python/lib/$pyver
mkdir $libdir/python/lib/$pyver/config
mkdir $libdir/python/lib/$pyver/lib-dynload
#mkdir $libdir/python/lib/$pyver/plat-...?
mkdir $libdir/python/lib/$pyver/site-packages
mkdir $libdir/python/lib/$pyver/site-packages/PIL
cp $VisItDir/lib/python/lib/$pyver/*.txt                $libdir/python/lib/$pyver
cp $VisItDir/lib/python/lib/$pyver/*.py                 $libdir/python/lib/$pyver
cp $VisItDir/lib/python/lib/$pyver/*.pyc                $libdir/python/lib/$pyver
cp $VisItDir/lib/python/lib/$pyver/*.pyo                $libdir/python/lib/$pyver
cp $VisItDir/lib/python/lib/$pyver/*.so                 $libdir/python/lib/$pyver
cp $VisItDir/lib/python/lib/$pyver/config/*             $libdir/python/lib/$pyver/config
cp $VisItDir/lib/python/lib/$pyver/lib-dynload/*        $libdir/python/lib/$pyver/lib-dynload
cp $VisItDir/lib/python/lib/$pyver/site-packages/PIL.*  $libdir/python/lib/$pyver/site-packages
cp $VisItDir/lib/python/lib/$pyver/site-packages/PIL/*  $libdir/python/lib/$pyver/site-packages/PIL
ln -s "python/lib/$pyver/config/lib${pyver}.so" $libdir

#
# Copy the VTK libraries to the distribution.
#
cp $VisItDir/lib/$VTKCoLibName $libdir/$VTKCoLibName
cp $VisItDir/lib/$VTKFiLibName $libdir/$VTKFiLibName
cp $VisItDir/lib/$VTKGrLibName $libdir/$VTKGrLibName
cp $VisItDir/lib/$VTKHyLibName $libdir/$VTKHyLibName
cp $VisItDir/lib/$VTKImLibName $libdir/$VTKImLibName
cp $VisItDir/lib/$VTKIoLibName $libdir/$VTKIoLibName
cp $VisItDir/lib/$VTKReLibName $libdir/$VTKReLibName
cp $VisItDir/lib/$VTKExLibName $libdir/$VTKExLibName
cp $VisItDir/lib/$VTKFrLibName $libdir/$VTKFrLibName
cp $VisItDir/lib/$VTKFtLibName $libdir/$VTKFtLibName
cp $VisItDir/lib/$VTKPnLibName $libdir/$VTKPnLibName
cp $VisItDir/lib/$VTKJpLibName $libdir/$VTKJpLibName
cp $VisItDir/lib/$VTKTiLibName $libdir/$VTKTiLibName
cp $VisItDir/lib/$VTKZlLibName $libdir/$VTKZlLibName

#
# Copy the plugins to the distribution.
#
cp $VisItDir/plugins/plots/*.so       $plugindir/plots
cp $VisItDir/plugins/operators/*.so   $plugindir/operators
cp $VisItDir/plugins/databases/*.so   $plugindir/databases

#
# Copy includes
#
mkdir $incdir/visit
mkdir $incdir/mesa
mkdir $incdir/mesa/GL
mkdir $incdir/vtk
mkdir $incdir/vtk/Common
mkdir $incdir/vtk/Filtering
mkdir $incdir/vtk/Graphics
mkdir $incdir/vtk/Hybrid
mkdir $incdir/vtk/IO
mkdir $incdir/vtk/Imaging
mkdir $incdir/vtk/MangleMesaInclude
mkdir $incdir/vtk/Rendering
mkdir $incdir/python
mkdir $incdir/qt

cp $VisItDir/include/*.h                        $incdir
cp $VisItDir/include/make*                      $incdir
cp $VisItDir/include/visit/[A-M]*.h             $incdir/visit
cp $VisItDir/include/visit/[N-Z]*.h             $incdir/visit
cp $VisItDir/include/visit/a*.h                 $incdir/visit
cp $VisItDir/include/visit/[b-z]*.h             $incdir/visit
cp $VisItDir/include/mesa/GL/*.h                $incdir/mesa/GL
cp $VisItDir/include/vtk/*.h                    $incdir/vtk
cp $VisItDir/include/vtk/Common/*.h             $incdir/vtk/Common
cp $VisItDir/include/vtk/Filtering/*.h          $incdir/vtk/Filtering
cp $VisItDir/include/vtk/Graphics/*.h           $incdir/vtk/Graphics
cp $VisItDir/include/vtk/Hybrid/*.h             $incdir/vtk/Hybrid
cp $VisItDir/include/vtk/IO/*.h                 $incdir/vtk/IO
cp $VisItDir/include/vtk/Imaging/*.h            $incdir/vtk/Imaging
cp $VisItDir/include/vtk/MangleMesaInclude/*.h  $incdir/vtk/MangleMesaInclude
cp $VisItDir/include/vtk/Rendering/*.h          $incdir/vtk/Rendering
cp $VisItDir/include/python/*.h                 $incdir/python
cp $VisItDir/include/qt/*.h                     $incdir/qt

#
# Copy the help files to the distribution.
#
cp $VisItDir/help/*.html $helpdir
if (-e $VisItDir/help/visit.helpml) then
    cp $VisItDir/help/visit.helpml $helpdir
endif

#
# Copy the Java class files to the distribution.
#
if (-e $VisItDir/java/llnl/visit/ViewerProxy.class) then
    cp -R $VisItDir/java/llnl $javadir
endif
if (-e $VisItDir/java/RunViewer.class) then
    cp -R $VisItDir/java/RunViewer.class $javadir
endif

hrchilds's avatar
hrchilds committed
610 611 612
#
# Copy the configuration files.
#
hrchilds's avatar
hrchilds committed
613 614 615 616
mkdir $verdir/.visit
cp $VisItDir/clearcase_bin/visit-config-closed $verdir/.visit
cp $VisItDir/clearcase_bin/visit-config-open   $verdir/.visit
ln -s visit-config-open $verdir/.visit/config
hrchilds's avatar
hrchilds committed
617

hrchilds's avatar
hrchilds committed
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652
#
# Strip the executables and shared libraries.
#
if ($Strip == "TRUE") then
   strip $bindir/*
   strip $libdir/*
   strip $plugindir/plots/*
   strip $plugindir/operators/*
   strip $plugindir/databases/*
endif

#
# Change the permissions so that they are correct.
#
chmod -R go+rX distribution

#
# Build the compressed tar file.
#
set fname = visit`echo $Version | tr "." "_"`.$osver.tar

cd distribution
if ($Compress == "COMPRESS") then
   tar cvbf 20 $fname visit
   compress $fname
   mv $fname.Z ..
else
   tar cvbf 20 - visit | gzip > ../$fname.gz
endif
cd ..

#
# Clean up the temporary directories.
#
rm -rf distribution