If like me, you use Ant to deploy builds, etc, and you have migrated to Windows 7 – you may well have troubles getting ant to run.
It all worked flawlessly under Ubuntu, but Windows is a different beast – here’s a step by step guide to getting it working.
1) Install ant
So, first you need ant. This needs extracting somewhere (but remember where… for step 5) You can download ant from here.
2) Install PHPUnit
PHPUnit is best installed through PEAR.
You need to tell PEAR where to get PHPUnit from:
pear channel-discover pear.phpunit.de
And then actually get it:
pear install phpunit/phpunit
3) Install an SVN Client
I nominated to install sliksvn – from here – this svn client is a brilliant piece of software with all the standard commands. Remember where you install this to.
4) Install Java
Install the latest Java development toolkit (Java JDK) from here
NB. Remember where you install it to, as you’ll need the path in the next step.
5) Setup Windows Paths
Holding the Windows key, press Pause/Break (usually the top right key on your keyboard) – This will bring up the system control panel. Click on “Advanced system settings” (on the left)
The system properties dialog appears, click on the Environment Variables button.
In the bottom grid (System Variables), find Path – and double click on it. A small (unhelpfully small) dialog will appear with a load of paths in. Scroll to the end, and enter the paths to the following pieces of software:
- Sliksvn – the bin folder (i.e. c:program filessliksvnbin)
- PHP folder (i.e. c:xamppphp)
- Ant – the bin folder (i.e. c:antbin)
- The path to your java.exe executable (i.e. C:Program Files (x86)Javajdk1.6.0_14bin)
Note: All these paths need separating with a semi-colon, for example:
c:program filessliksvnbin;c:xamppphp;c:antbin;c:program files (x86)javajdk1.6.0_14bin
Remember that each path has to be separated with a semi-colon
And thats that. It should work lovely.
However, when you run ant, PHPUnit will run very slowly. Not sure what it is yet, but I will update once I’ve discovered the problem.