2.2. Tools on Windows

Although the phpdoc environment is based on many Unix tools and techniques, there are ways to accomplish the same tasks on Windows. It is not too hard to set up a Windows working environment with CVS and the DocBook tools, but put away your mouse as you will need the keyboard for the majority of the tasks! :)

2.2.1. Obtaining the Tools

You need the same tools as on Linux. The very basic thing is a command line CVS client, which is included in Cygwin. Although you can use GUI tools such as WinCVS or TortoiseCVS, we provided instructions only for command line clients in order to keep this HOWTO short and simple.

You are encouraged not to use intelligent WYSIWYG XML editors, such as XML Spy, because the often friendly auto-indent, and optimize features can make the XML files so different from the one you started to work with, that the diff posted to our mailing lists and used by translators will be useless. Emacs is also available for Windows if you would like to give it a try, but any basic text editor with Linux line ending support will suffice.

If you want to produce something viewable, or just would like to test the modified file before committing (recommended!), you need some more tools. To get it running on Windows, you'll need these:

Note that if you use Cygwin, there is no need to download a CVS client, as Cygwin comes with a CVS client built in.

2.2.2. Installing the Tools

You need to download and install the Cygwin tools. Just select the "Install now!" link and run the supplied setup.exe. It will guide you through the process of installation. These tools are ports of standard Unix tools like sed, awk, autoconf, make, perl, ... for Windows.

Note: Be aware, that Cygwin is grown to be a very huge project and it includes many programs (such as PostgreSQL and Apache) ported to Windows, which are not needed for phpdoc. To install the minimal set of required packages select devel/autoconf, devel/automake, devel/make, doc/libxml2, lib/crypt and text/openjade along with components, which are selected in setup by default. You may also want to add devel/cvs to the installation list if you don't have a CVS client yet. Do not care about dependencies - they will be selected automatically.

Once installed, you will see a "Cygwin Bash Shell" command in the Programs menu. Running that, you get a command line which behaves same as bash on Unix boxes. If you never worked with bash or Unix before, note that there are slashes (/) instead of backslashes (\) in paths. If you want to access the foo directory on drive c: write it as c:/foo instead of c:\foo.

Warning

Do NOT use symlinks with Cygwin, it's buggy.

To build and test the manual, you also need a working command line copy of PHP, whose directory should be in the PATH, as it is explained in the PHP Manual.

If you don't have your phpdoc checkout yet, grab it from CVS. More information about CVS can be found in the CVS section of this document.

Change to the dir where your phpdoc snapshot is (or where you want to have it). Use, just like in Windows, the cd command. In Cygwin, the dir command is also supported. Before doing this it's important that your Cygwin environment uses full paths. A simple way to initialize this is to first type cd c: which should then put you in the /cygdrive/c (c: root) directory. From here use your commands as usual.

Now as you are in the phpdoc directory, execute:

autoconf
./configure --with-lang=your_language_code

Substitute your_language_code with a language code you checked out the files of, and would like to work on. The --with-lang parameter is optional. If you don't specify it, the default is en (English).

If you didn't get any errors, you're ready to rock&roll. Otherwise, you could check out the installation appendix of "DocBook: The Definitive Guide". If you think that the problem is in the build system, ask on the mailing list.