Based on the tinyweb server, sqlite, PHP, MediaWiki and a self-written
XML-to-sqlite converter, I have created a package [1] for Windows that
can run a wikipedia without any installation required.
This package doesn't include any wikipedia data set, so you'll have to
generate your own from an XML dump. Instructions are dead easy, see the
included README file. Some drawbacks of this alpha-version:
* Conversion takes long
Took 6 hours to convert a recent XML dump on my 2.8GHz P4. So, start
this in the evening ;-)
* sqlite database gets huge
For the above mentioned dump, it is just below 3GB. However, as this is
mostly text, it should compress well, if someone wants to make a CD
image with a simple installer from it.
I might play with the whole setup, maybe keeping the actual text in the
zipped XML dump and just store titles etc. in the database. This will
speed up the conversion process and decrease database size considerably,
but will pose other problems and slow down the whole thing.
* Browsing is slow
Most pages render in under 10 sec, but some (like the Main Page, for
some unknown reason) get stuck somewhere and won't stop rendering. I'll
look into this. Meanwhile, the default start page is "Biology" ;-)
* Categories and interwiki links are broken
For categories to work, I'd have to regenerate all the links in the
database, which means rendering all articles, which would take too long.
I'm not sure why the interwiki links are broken. Looks like it forgot
the language codes, somehow.
* Links and articles with a single quote (') in them show as broken
This has something to do with sqlite quote escaping. I'm not sure how to
fix that, but basically shouldn't be a problem.
Other than that, you can read all (OK, most) of the pages, links work. I
did't dare try searching yet ;-)
It might be noteworthy that no MediaWiki code had to be patched for
this. The package actually includes the CVS info, so you can "cvs
update" MediaWiki. I only had to design a special LocalSettings.php and
write a DatabaseSqlite.php structure, containing some ugly hacks.
Strangely enough, I have to route all GET requests through a DOS batch
file, which is where I lose POST data. Otherwise, one could even edit
the wiki.
Please have a look at it and tell me what you think.
Magnus
[1]
http://www.magnusmanske.de/wikipedia/standalonewiki.zip (about 6MB)