Developing TikiWiki with Eclipse on a Mac | |
Initially this page documents my experiences setting up Eclipse on an Intel Mac (June/July 2008)
|
The basic setup | |
What is described below is based on Mac OS 10.4 (Tiger) running on an Intel Mac. 10.5 (Leopard) has a different Apache/PHP setup so some modifications will be required (I have added a few notes about getting this to work on Leopard). I also have PHP 5 installed (in /usr/local) which needs some special handling later on (I still had to install PHP5 using the entropy.ch package as described here as the built in PHP doesn't let you add extensions). To do the whole thing will probably take you an hour or two - the main struggle is getting the PHP debugger working which you might not need (in which case I would recommend using Aptana with the Subclipse plugin). |
Get Eclipse | |
It seems a new version has just come out (3.4) but i'm using 3.3.2, so I'll base these instructions on that. You might get it to work (especially on Linux or Windows) with latest versions of everything.
Oops! Just spotted this page - most of this should be there... i guess
|
Get Subclipse | |
Subclipse is an Eclipse plugin that deals with SVN (the source control system used now for releases 1.10 onwards). This is where you get the latest version of all the files that make up TikiWiki.
|
Get Tiki! | |
|
Get PDT (PHP features for Eclipse) | |
Use the same method as for Subclipse to add a new remote update site for the URL http://download.eclipse.org/tools/pdt/updates/ - but, when you check the "sites to visit while looking for new features" also check the "Europa Discovery Site" as there are some other things from there PDT needs.
|
Get smartypdt (Smarty Support for PDT) | |
This one has to be downloaded from http://code.google.com/p/smartypdt/. Instructions to install from a "New Local Site" can be found there too.
Note, it seems you need version 0.5.5 for this set-up - that's available here at the moment. |
Get xdebug (Debugger and profiler for tool PHP) | |
This is one of the two debuggers PDT supports. I couldn't get the Zend one working as I think you need to buy the whole "Zend Platform" - so i moved on to the other one http://www.xdebug.org/
Xdebug is an extension for Apache and you install it by adding the line: Copy to clipboard
Copy to clipboard
But first you have to have a compiled version of xdebug, and there are several available (here for instance) prebuilt for all platforms, including Intel Mac, but i couldn't get any of them to work. Mac peculiaritiesFor the non-Mac platforms this should now all work as expected but the Mac version of xdebug seems to have compatibility problems with later versions of PDT (e.g. we need PDT 1.0.2), and you need to build a slightly old version of xdebug specifically match your system apparently. So... deep breath, and:
|
Ok, so did it work? | |
Then open Eclipse and set up a "PHP Web Page" debug session - there are several pages to show you how here.
Sorry this is short of screen-shots and possibly a little more conusing than it need be - I will try to tidy it up soon... promise.
|