
	IMS Open Corpus Workbench (CWB)
	Release 3

	Installation Guide for Binary Packages


This file describes how to install a precompiled binary package of the CWB.
Please make sure that you have downloaded the appropriate package for your
platform: both CPU architecture and operating system must match.

If you encounter problems during or after installation, consult the CWB wiki

    http://cwb.sslmit.unibo.it/

which offers hints for specific platforms and addresses some common problems.
You may also want to join the CWBdev mailing list

    http://devel.sslmit.unibo.it/mailman/listinfo/cwb

and ask your question there.



	(1) WINDOWS INSTALLATION

Note that the rest of this file applies only to non-windows releases. If
you want to install on Windows, first make sure that you have unzipped the
.zip file that CWB came in, and then run the "install-cwb-win" program 
contained in the same folder as this text file.

Important Note: your username will probably need admin rights to do this.

You can do this either by (a) double-clicking on "install-cwb-win"
or (b) opening a command prompt, navigating to this folder, and 
typing "install-cwb-win". 

Note that the program will display as "install-cwb-win.bat" if you have 
turned off the Windows "Hide File Extensions" option. If you don't know what
the preceding sentence means, you may safely ignore it.

You will also need to add the "binary" directory -- which is usually 
"C:\Program Files\CWB\bin" -- to your path. (Right click on My Computer >
Properties > Advanced > Environment Variables > under "System Variables", 
highlight "Path" and press Edit > add the "binary" directory at the end
of the path, after a semicolon > press OK > OK > OK).

POTENTIAL ISSUE: Sometimes two of the CWB utility program (cwb-atoi and
cwb-itoa) are flagged up as viruses or trojans by antivirus software.
If you downlaoded CWB from a legitimate source (basically, Sourceforege)
this is extremely unlikely to be the case. As far as we can tell the issue
is that tiny programs like these two (about 24kb each) are deemed inherently 
suspicious by some naive antivirus scanners. But they aren't viruses, honest!



	(2) UNIX, etc, INSTALLATION

	QUICK INSTALLATION

If you want to install the CWB in its standard location (depending on the
operating system, but typically in the /usr/local tree), you can simply type

	./install-cwb.sh

Note that you will usually need administrator rights for a standard
installation.  On some systems, you can type

	sudo ./install-cwb.sh

and enter your password when asked for it.

You should now see a reassuring message that the CWB has been installed
successfully.  Please make sure that the indicated directory is in your
search path, so that you can run CQP and other programs from the command
line.

If you are new to the CWB, you should read the "Corpus Encoding Tutorial"
and "CQP Query Language Tutorial" available from the CWB homepage.  You may
also want to install pre-encoded sample corpora for your first experiments.


	CUSTOM INSTALLATION

If you want to install the CWB in a different location, edit the file
"install-cwb.sh" before proceeding with the installation.  In most cases,
it is sufficient to set the variable PREFIX.  For instance, setting

	PREFIX='/corpora/cwb'

will install CQP and other programs in "/corpora/cwb/bin", the CL library
in "/corpora/cwb/lib", the header files in "/corpora/cwb/include/cwb" and
the manual pages in "/corpora/cwb/share/man/man1".  You can also change
these individual directories separately if necessary.

If you have a GNU-compatible "install" program on your computer, you can
change the corresponding line to

	INSTALL='install'

(adding any required options), which may work better than the enclosed
install script.  It is also possible to change the access permissions,
owner and group membership of the installed files.  See the comments in
"install-cwb.sh" for further information.

Note that it is not possible to change the default registry directory,
which has been compiled into CQP and the other programs.  If you edit
the corresponding line in "install-cwb.sh", "cwb-config" will report the
new setting, but CQP and all other CWB programs will continue to use 
the original directory.  It is always possible to set a symbolic link
from the default registry directory to a directory of your choice, or
to override the default by setting the CORPUS_REGISTRY environment variable.

