Comparing versions 10 and 11.

InstallationInstructions

Prerequisites

On your desktop

  • The XML dump of your choice from wikimedia. Take the standard one without images and page history (pages-articles.xml.bz2).
  • Perl
  • The bzip2 binaries, namely bzcat and bzip2recover. The only way I know to get these on Windows are to install Cygwin, which you need anyway on the next line.
  • The Unix sort executable. Again, Windows users should install Cygwin to have it.

On the iPhone

The dependencies are numerous and not trivial to make all of it work. I'm sorry about this but I'm pretty sure installing those is a good idea anyway. - Apache - PHP - check out this guide to make both work together - Perl (as I explain in HowItWorks, the wiki parsing and HTML rendering was not possible in pure PHP because PCRE functions do not work) - Bzip, from the "Shai's Apps" repository accessible at http://ride4.org/shai.xml

Create the data files

Now that you have the basics, let's create the data files - Download the indexer from the file zone - Create a new clean folder (let's call it <rootFolder>) and place your big dump file in a <rootFolder>/bz2 subfolder. - IMPORTANT Edit the makeindex.pl script to specify the path of the sort command. If you're on Windows and you don't do this, it will take the Windows one, which will lamentably crash after a few hours of crippling your machine. The GNU sort is the only candidate for dealing with large files. - Run the indexer script. It takes one argument, the root folder path makeindex.pl <rootFolder>. It will create the index files in <rootFolder>/db. - Go clean your room or do some other ~1-2h activity - Check that you have all the small archive files created in <rootFolder>/bz2. If it's the case, you can safely delete the large unsplit archive file. The script does not do it for you, so that in case anything goes wrong in the process you won't have to re-download the 3Gb file... If you want to keep it, at least move it off this folder. We don't want the file to land on the iPhone

Copy the data files

  • Create a root data folder on the iPhone. It cannot be in your default Apache document root because this one is (by default) on the small partition of the iPhone, so it will never have the capacity to host the data files. Let's call it <datapath>. In my installation I chose /private/var/root/Library/WebServer/Data.
  • The application supports multiple concurrent languages, so we create a language subfolder, like en or fr (it can be anything but since the name is reused in the web interface I suggest to keep it short).

Copy the web app

  • UnzipDownload the web archive from the zip.file section and unzip it somewhere
  • Edit the localconfig.php confg file. The important variables are $datapath, which should be set to what you used above, and $installedlanguages which lists the languages you have installed. I know this could be inferred dynamically by simply listing the available folders, but the explicit declaration is the best way to specify a default language, and an ordering if you have many languages installed (you may doubt you'll ever have 12 different languages installed... True, but future evolutions will include support for other wikimedia projects like wikiquotes etc...)
  • Copy the content of the zip somewhere in the Apache document root of your choice on your iPhone. All paths are relative so you can put them in any subfolder.

And this should be it!

If it doesn't work you can try to set the $bDebug flag to true to have some diagnostic information, but I admit my error messages may not always be very informative...

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 11. 11 months by kinglothar
  2. 10. 11 months by kinglothar
  3. 9. 11 months by kinglothar
  4. 8. 11 months by kinglothar
  5. 7. 11 months by kinglothar
  6. 6. 11 months by kinglothar
  7. 5. 11 months by kinglothar
  8. 4. 11 months by kinglothar
  9. 3. 11 months by kinglothar
  10. 2. 11 months by kinglothar
  11. 1. 11 months by kinglothar