#!/bin/csh if ($1 != "")goto $1 echo " " echo Hello! This is an automated script for installing Split on your echo system. There are a number of stages, some requiring action on your echo "part. Should the script be interrupted (and you wish to start it up" echo "again), you may restart it with 'install woof', where 'woof' is the" echo "name of the stage you wish to start at. You'll know where this is" echo "because I will periodically issue messages of the form 'stage = woof'." echo " " echo "I am hoping that this script is portable. If not (or there are any other" echo "problems), please let me know\!" echo " " ; echo "David Jaffe (e-mail: jaffe@cpthree.unl.edu)" echo " "; echo -n "Press return to proceed (or x, followed by return to exit)...."; set input = $<; if ($input == "x")exit; echo " "; acknowledge: ; echo stage = acknowledge; echo " " echo Software acknowledgments: Split makes use of the following free software echo which was not written by the author: echo "--- various GNU (Free Software Foundation) products, including g++ and" echo " libg++" echo "--- Brendan McKay's graph isomorphism package **nauty**" echo "--- Keith Briggs double-double precision floating point package **quad**." echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; hardware_check: ; echo stage = hardware_check; echo " " echo "This program should run on any reasonably modern Unix machine. " echo "(However, spurious segmentation faults have been encountered under " echo "NeXTStep-Intel.)" echo " " echo This program requires at least 32 megabytes of RAM to install and use. echo If you have less than 32 megabytes of RAM, go buy some echo more before proceeding. If you have between 32 and 64 megabytes, you echo are probably OK, but the compilation may be slow, as there is likely echo to be a lot of swapping to disk. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; cplex_check: ; echo stage = cplex_check; echo " " echo Split functions best if the commercial linear programming solver CPLEX echo is installed. For academic users, a echo "'Linear Optimizer Single CPU License' costs about 500 dollars; you can " echo send e-mail to info@cplex.com if you want to get it. Otherwise, echo Split will work without CPLEX, but it will be slower. Split has been echo tested with versions 2.1 and 4.04 of CPLEX. Hopefully other versions echo will work as well. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; gnu_check: ; echo stage = gnu_check; echo " " echo "Now I'm going to ask if you have various programs installed on your" echo computer, all available for free, and mostly produced by the Free Software echo "Foundation (GNU). All are essential, except as noted, and you will need" echo "the indicated version. For more recent version (released since this was" echo "written), some adjustments may be necessary." echo "g++ (version 2.7.2)" echo " (Testing for g++ version...)" g++ --version echo " (If that's not 2.7.2, you should upgrade before proceeding.)" echo " (As of 10/29/97, the latest version is 2.7.2.3, which should " echo " work too, but I haven't tested it.)" echo "libg++ (version 2.7.1)" echo -n "sort (the GNU version). I find the following binaries: " which sort | tr '\n' ' ' echo "." echo "Press return if the gnu binary appears first, which it should...." set input = $< echo -n "fold (the GNU version). I find the following binaries: " which fold | tr '\n' ' ' echo -n ". Press return if the gnu binary appears first, which it should...." set input = $< echo -n "gzip. I find the following binaries: " which gzip | tr '\n' ' ' echo "m4 (the GNU version): I find: " m4 --version echo -n Press return if you the word GNU appears on the above line.... set input = $< echo "GNU binutils package (contains c++ filt)" echo "xdvi (version 20 or later -- only used by 'help' command)" echo "gs (ghostscript) -- only used by 'help' command)" echo echo Otherwise, go install the programs you do not have, and come back and echo try again. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; download: ; echo stage = download; echo " " echo You should now be in the directory where you want to install Split. echo This could be an empty directory or it could be a directory where you echo "previously installed Split. I won't delete anything, but I might" echo accidentally overwrite a file you care about. echo I will now download files into this directory by anonymous ftp. echo In total, about 1500 kilobytes will be transferred. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; echo user ftp `whoami`@`hostname` > ftp_in echo cd pub >> ftp_in echo cd coding >> ftp_in echo binary >> ftp_in foreach i (MACROS CODE DATA_F2_1 NOT_MINE LOG t.dvi) echo get $i.gz >> ftp_in end echo get disect.cc >> ftp_in echo get t.idxb >> ftp_in echo bye >> ftp_in ftp -n -v cpthree.unl.edu < ftp_in rm ftp_in echo " "; unpack: ; echo stage = unpack; echo " " echo "File transfer complete. Now I'll make subdirectories, unzip some files," echo "and put some files in them. Please wait..." mkdir cc doc inc obj tex calculations web log foreach i (CODE DATA_F2_1 MACROS NOT_MINE LOG t.dvi) gunzip $i.gz end mv t.dvi tex mv t.idxb tex echo " "; echo -n Done. Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; nextstep: ; echo stage = nextstep; echo " " echo If your platform is NeXTSTep-Intel, change nan.h to math.h in cc/quad.cc. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; modify: ; echo stage = modify; echo " " echo Now you may need to modify CODE to suit your system, by editing the echo "#define lines, as indicated below. In the case where something should not" echo "be defined, put // in front of #define to comment out the line. In the" echo case where something should be defined, remove the // if present. echo " " echo --- CPLEX should be set to the name of your CPLEX executable file echo " (probably cplex or cplexmip)" echo --- CPLEX_VERSION should be set to the version number of your copy of CPLEX echo --- ABSOLUTE_PATH_FOR_CPLEX will need to be set if CPLEX refuses to echo " recognize relative file names" echo " " echo -n Make any needed changes to CODE and then press return to proceed.... set input = $<; if ($input == "x")exit; echo " "; disect: ; echo stage = disect; echo " " echo Now I am ready to unpack the file CODE. First I will compile the program echo disect, and then execute it on CODE. This takes 7 seconds on my echo machine, but disect is rather badly written, and could take forever if echo "files are being shuffled across a network. (I'll also unpack some other" echo "files.)" echo " "; echo -n Press return to proceed with the disection....; set input = $<; if ($input == "x")exit; echo " "; g++ disect.cc -s -o disect foreach i (CODE DATA_F2_1 NOT_MINE LOG) disect $i end chmod 755 prep chmod 555 log/* echo " "; echo -n Done. Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; compile: ; echo stage = compile echo "And now it's time to compile Split\! This takes 12 minutes on my machine." echo "If it is incredibly slow on your machine, try reading the file 'prep'" echo " "; echo -n Press return to proceed with the compilation....; set input = $<; if ($input == "x")exit; echo " "; prep all echo " " echo Assuming that no error messages appeared above, Split has now been echo "successfully installed\!" echo " " echo If you do not wish to modify and thence recompile the program, only echo the following files/directories are absolutely essential: echo Split, code.data, code.data1, calculations, tex, tex/t.dvi, and tex/t.idxb. echo "You could (if you wished) copy these to another place on your computer" echo for someone else to use. echo " "; echo You may wish to look at the file doc/backward-compatibility, which echo contains a record of incompatibilities with earlier versions that have echo been introduced. echo " "; echo -n Press return to proceed....; set input = $<; if ($input == "x")exit; echo " "; echo "Now look at the section of the report (tex/t.dvi) entitled" echo "'Execution of the proofs in this report'", where you will find a echo battery of tests to carry out. echo " "; echo Have fun!