Information for new jot developers. This file assumes knowledge of basic UNIX commands like cd, ls, etc. If you haven't used CVS before it's a good idea to read about it before you start. Read (and bookmark!) the following: http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1 See also: * the man pages for cvs, * or the output of cvs --help. Or see the quick intro at the bottom of this document. - - Setting up your own jot hierarchy - ----------------------------------------------------------------- 1. Check out the source code *** Skip this if you already have the source code *** You can get the source code using CVS, or by copying files remotely using scp or equivalent. On Windows, we recommend using cygwin in either case. --------- Using cvs: If you're working on afs space you can check out jot locally (as opposed to over the network via ssh), which is better since you won't have to enter your password each time you run a cvs command later on. Decide where you want to put jot, then cd to the directory that will CONTAIN the jot directory, and run the following command: cvs -d /afs/engin.umich.edu/class/perm/eecs487/cvsroot checkout -P jot If you are not on afs space, you'll need a different version of the above command. Ensure ssh is in your path. Then set the following environment variable using whatever method is used for your kind of shell: bash> export CVS_RSH=ssh tcsh> setenv CVS_RSH ssh DOS> set CVS_RSH=ssh Then run the following, replacing with your uniqname: cvs -d :ext:@red.engin.umich.edu:/afs/engin.umich.edu/class/perm/eecs487/cvsroot checkout -P jot --------- Using scp: cd to the directory that will contain jot, then do: % scp -r red.engin.umich.edu:/afs/engin.umich.edu/class/perm/eecs487/jot . ----------------------------------------------------------------- 2. Customize your copy of Makefile.local cd to your jot directory (referred to as your jot root), and copy the file doc/Makefile.local into your jot directory (note the '.' at the end of the line): % cp doc/Makefile.local . Edit your copy of Makefile.local (in your jot root) according to the directions in it (look for 'XXX'). The main reason is to define the path to your jot root. In addition, there are various settings to check, though in most cases the defaults should work. Chose a directory where you will compile (i.e. where the object files will be created). We'll refer to this as the "compile directory". By default, this directory is called 'lib' and is in your jot root. If your jot root is not on the local disk of the machine where you're working, you should choose a compile directory on the local disk, so compiling will go faster. (Another reason is so you don't blow your disk quota with 200MB worth of jot object files). You can select the compile directory by editing your Makefile.local (define the variable COMP_DIR_BASE in that file). ----------------------------------------------------------------- 3. (Mac OS X only): Install needed header files and libraries on your system. You'll need Xcode (Apple's developer tools) and X11R6 for MacOS X, available here, or on the Tiger DVD (optional install): http://www.apple.com/macosx/features/x11/download/ ----------------------------------------------------------------- 4. Define needed environment variables WINDOWS ------- cd to your jot root and copy doc/setup.bat into your jot root (note the '.' at the end of the line): % cp doc/setup.bat . Edit it as needed (look for 'XXX'). Put a shortcut (named JOT) on your windows desktop with the following target. Replace with your real JOT_ROOT: %SystemRoot%\system32\cmd.exe /k \setup.bat E.g.: %SystemRoot%\system32\cmd.exe /k C:\jot\setup.bat To start a session, double click on the JOT shortcut created above If instead you start a session from an existing DOS prompt, be sure to run setup.bat before trying to run make. *** NOTE: When you compile jot or your projects, you should use a DOS shell that you launched via the above shortcut, or in which you ran the setup.bat script to define needed variables. Note: compiling from a cygwin shell does not work (yet). However, it can be convenient to run the jot app "smview" or your projects from a cygwin shell. Linux and Mac OS X ------------------ Define the following in your startup files for convenience, and then you can skip this step from then on. (For tcsh replace 'export VAR=VALUE' with 'setenv VAR VALUE'). export JOT_ROOT= export ARCH=linux // or macosx export CVS_RSH=ssh Optional: select your preferred default window size, e.g.: export JOT_WINDOW_WIDTH=1024 export JOT_WINDOW_HEIGHT=768 ----------------------------------------------------------------- <- After the first time you can start here 5. cd to your jot directory created in step 1. Get the latest updates: run cvs update: % cvs up -Pd (-P means prune empty directories, and -d means retrieve newly created directories, if any). ----------------------------------------------------------------- 6. Compile: % make (If necessary, try gmake instead of make.) If compiled successfully, the jot model viewer "smview" will be found in: //D/ (Example: jot/lib/linux/D/) refers to the compile directory that you specified in your Makefile.local. (If you didn't specify one, it will be set to /lib where is your jot directory.) refers to linux, WIN32, or macosx, depending on whether you are compiling on Linux, Windows, or Mac OS X. The D stands for debugging, which is the default. (The other options are O for optimized and P for profiling). To view a jot file, give it as a command line argument to smview, e.g.: % smview cow.sm or % smview cow.sm barn.sm terrain.sm For other options, try: % smview -H To compile optimized, use: make smview M=O To compile multiple (e.g. 3) source files simultaneously use: make smview JOBS=3 or make smview JOBS=3 M=O ----------------------------------------------------------------- 7. Troubleshooting Some compile/link problems that may come up on Redhat 9 systems are discussed here (with solutions): doc/redhat.txt For info on using the debugger with jot in VS .net, see: doc/win_issues.txt ----------------------------------------------------------------- 8. Brief summary of CVS commands: "cvs up -Pd": update your tree to the current version "cvs -n up -Pd": DON'T actually update your tree, but show what would happen if you did. "cvs add ": schedule the file(s) to be added "cvs add -kb ": schedule binary file(s) to be added "cvs remove ": schedule the file(s) to be removed "cvs remove -f ": schedule the file(s) to be removed, and also remove your copy of the file right now "cvs commit": commit changes you've made (including file additions/deletions) "cvs diff ": list your changes (NOT necessarily a diff against the current version, if it's been changed since you last updated) "cvs status ": get status info "cvs log ": get a log of changes For more info, see the links at the top of this file.