|
|
|
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.server directory inside your development directory.properties 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 five statements which define the following environment variables for MySQL and Ant:
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.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.
You also need to set the values of your MySQL root username and password in three of the property files. Open and edit the following files to set these values:
properties/hibernate.propertiesproperties/localhost.hibernate.propertiesproperties/server.propertiesNone of these files containing your MySQL root username and password are deployed as part of public versions of WordHoard. They are only used during development on your private development host.
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.
|
|
|