Installation

Downloading and extracting the library

The qCal library is available for download in two flavors. Both are archives and both contain the exact same files. There is what is called a “tarball” (the one with the .tar.gz extension) and there is a ZIP file (the one with the .zip extension). It is up to you which flavor you want to download. Windows users are advised to download the ZIP file.

Extracting the archive on Linux or Mac OS X

Tarball

tar -xvzf /path/to/qCal-<version>.tar.gz

ZIP File

unzip /path/to/qCal-<version>.zip

Extracting the archive on Windows

Tarball

Windows does not natively support this archive format (which is why I recommend Windows users download the zip file). In order to extract the tarball, Windows users will need to download a program such as WinZIP or WinRAR.

ZIP File

To extract the ZIP file, simply double click the archive icon and copy the files to whatever directory you wish.

Uploading to your web server

After you have extracted the archive, you should have a directory called something like “qCal-v0.0.1”. Inside this directory, there will be three sub-directories: “lib”, “docs”, and “tests”. Before doing anything, read the “README” file within the “docs” directory. After that, you can use FTP (or whatever method you use to get files on your server) to upload the “lib” directory to your web server. You do not need to upload the docs or tests directories.

As for where you should upload the lib directory, that is really up to you. I recommend placing it somewhere within PHP's include path (you can find out what that is by calling PHP's get_include_path() function). You can rename the lib directory, but do not move or rename any files inside of it.

Setting up autoload

Due to the heavy use of inheritance in this library, and the fact that each class resides in its own file, there is a pretty large amount of files necessary to do just about anything with it. It would be pretty inconvenient to have to include each file individually, so the library comes with its own auto-loader. To use it, simply include the “lib/autoload.php” file and that's it. You're good to go.

Running the unit tests

qCal was developed using a method called test-driven development. As a result, each and every feature in the library is thoroughly tested. These tests are called “unit tests”. To be sure all of the library's features are working as they should on your particular server, you can run the tests yourself. In order to do so, you'll need to download the Simpletest framework and upload it to your web server.

Once you've got the Simpletest framework in place, you'll need to edit the “config.php” file, which is located within qCal's “tests” directory. Change the QCAL_PATH to wherever you placed qCal's “lib” directory, and change “SIMPLETEST_PATH” to wherever you uploaded Simpletest. Now simply point your web server at tests/index.php. If you see a green bar, all of the tests have passed. If you see a red bar, you have a failing test (or several). If you see a blank page, or a PHP error, you haven't configured the test suite correctly.

If you get a failed test (a red bar), you can help me out a lot by contacting me with the exact message displayed on the screen, as well as any relevant information about your web server and its configuration.

 
/home/luke/dokuwiki/data/pages/installation.txt · Last modified: 2010/09/01 10:38 by luke
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki