|
|
|
Create a new directory for your WordHoard development work. Download the following files and place them in the new development directory.
src
directory inside your development
directory.data
directory inside your development directory. These files are
used to build the static object model database.wordhoard
directory inside your
development directory. You will move this directory into your
MySQL data directory later (see Installing the Database). Note
that it is possible to build this database from the raw data
files, and we will discuss how to do this in the chapter Building the Static Object Model.
This takes a long time, however, so to help you get started more
quickly, we have included this pre-built copy of the
database.lib
directory inside your
development directory.lib
directory inside inside your development directory.server
directory inside your development directory.scripts
directory inside your development
directory.misc
directory inside your development
directory.userman
directory inside your development
directory.build.xml
in your
development directory.setup
in your
development directory.After you have downloaded all of these files, open the
setup
file. At the top of the file there are
several statements which define important environment
variables:
MYSQL_ROOT_USERNAME
= MySQL root username.MYSQL_ROOT_PASSWORD
= MySQL root password.MYSQL_BIN
= Path to the directory containing the MySQL client and utility programs.MYSQL_DATA
= Path to the MySQL data directory.ANT_HOME
= Path to the Ant home directory.CODEBASE
= HTTP URL for deployed client directory.HOMEPAGE
= HTTP URL for deployed user manual.Change the values of these variables to the ones you use. The root account is the one you use to manage your MySQL system. It must be granted all privileges on everything. See the MySQL manual for details.
When we want to work on WordHoard, we open a new terminal window, change to our development directory, and execute the following command:
source setup
Our setup file defines the environment variables discussed
above, sets up our classpath, and defines a large number of
aliases that make our work go faster. Other developers, of
course, will want to customize their own environments, and
developers on other platforms will almost certainly need to make
changes to the setup
file.
Some of our more useful and frequently used aliases include the following:
mysql-start
. Starts MySQL.mysql-stop
. Stops MySQL.mysql
. Runs the MySQL command line client with the root
username and password.b
. Runs Ant. Used to build the source code.start
. Starts the WordHoard server.stop
. Stops the WordHoard server.r
. Runs the WordHoard client.We will use these aliases in the examples in the following
chapters. To see their definitions, look in the
setup
file. You may need to change the definitions
on your system to get them to work right.
|
|
|