Prerequisites :
- know where PHP is installed ;
- know how to start/stop your web server.
On Windows, the installation is quite simple. Follow these steps and it should be OK :
- check your PHP version and download the according RepASM file ;
- stop your web server ;
- extract the repasm.dll file into the extension_dir of your PHP directory (the "ext" subdir in PHP 5 or "extensions" in PHP 4) ;
- open your php.ini file and add "extension=repasm.dll" in the Dynamic Extensions section ;
- for the minimap support, put both StarDat.mpq and BrooDat.mpq on your web server ;
- restart your web server : it should be OK ! Use phpinfo() to see your web server's properties : repasm should be listed there as an extension.
On Unix systems, you'll have to build the whole thing. First of all, we assume that you know how to edit a Makefile and know what kind of C++ compiler you have. Then, proceed as follows :
- download the repasm archive (named repasm.tar.gz) ;
- extract it in the directory of your choice ;
- open the README.txt file and follow the instructions in it (basically how to build the library) ;
- once the library is built, copy the repasm.so (or its equivalent, depending on which OS you use) to your PHP extension directory and either use dl() or declare it in your php.ini ;
- for the minimap support, put both StarDat.mpq and BrooDat.mpq on your web server. Rename those files in lower case (i.e. stardat.mpq and broodat.mpq) and give them read access by the user launching the web server.