            The Install-o-Tron  -  an easy homebrew installer
            -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

By Fanjita and Alex Richter

The aim of the Install-o-Tron is to make it easy for you to automatically
install homebrew to your PSP.  It talks to the PSP Homebrew Database to
get the details of the latest homebrew, then downloads and installs it
automatically.  Hopefully this will make it easier for everyone to use
homebrew, and also cut down on the number of "how do I install this?" support
questions in forums.  It also introduces a simple new addition to homebrew
packaging, that makes it easier for both humans and computers to work out
how to install homebrew, that we recommend to other homebrew developers.

This first version supports a selection of popular homebrew.  In the near
future the list will be expanded dramatically, ultimately allowing you to
install any homebrew from the database.  In future it will also come bundled
with eLoader releases, so there should be no need to manually install it.

How to Install It
-----------------
You will need a PSP that is capable of running homebrew, and a working PSP wifi
connection to the internet.

For v1.5 PSPs, unzip the '1.5' folder into ms0:/psp/game.
For v1.0 or v2.0+ PSPs, unzip the '1.0' folder into ms0:/psp/game.
This is the last time you should have to install anything manually to your
PSP - the Install-o-Tron will offer to automatically install updates to itself
for you.

How to Use It
-------------
Start the Install-o-Tron as you would any other homebrew, e.g. on PSP firmware
versions 1.0 and 1.5, just select the 'Install-o-Tron' icon from the 'Memory
Stick' menu within the 'Game' menu.  On versions 2.0 and above, select
Install-o-Tron from within eLoader.

You will be presented with a network configuration menu.  You can select one
of the wifi configurations on your PSP, or you can choose to use a file browser
instead of the network download method.  (If you choose the file browser, skip
ahead to "Using the File Browser").

After the data has been downloaded from the database, you will be given a
list of homebrew titles.  Note that Install-o-tron automatically restricts
the list to homebrew that is known to work on your PSP version.  Use the UP
and DOWN buttons on the D-Pad to select a title that you're interested in.
Details are shown on the right of the screen for the currently selected item,
shown in red.

The X button will select a homebrew title to download, or if there are
multiple versions available, it will take you to a list of versions to select
from.  Once you've selected, the file is downloaded, and automatically
installed in the correct place for your firmware.

You can also press the TRIANGLE button at any time for help, the START button
to exit, the L-TRIGGER button to take a screenshot, or the CIRCLE button to
return to a previous menu list.

Using the File Browser
----------------------
If you don't have a network connection configured on your PSP, or you don't want
to use it, you can now download homebrew to your memory stick using a PC or other
computer, and then use the Installotron's built-in file browser to locate and
install it.

Using the file browser is the same as using any other menu in Installotron -
just use the D-Pad to move the selection up and down, and the X button to select.
Only folder names, and .ZIP files are displayed.  If you select a folder,
Installotron will browse down into that folder.  You can press 'O', or select the
'..' folder, to go back up a level.

When you select a .ZIP file, Installotron will attempt to install it for you.
Note that it can currently only cope with .ZIP files that are already prepared
for Installotron - in other words, they must contain an HBINFO.TXT file.

If you're a developer, the File Browser can obviously also be used to test
whether an HBINFO.TXT file that you have put into your homebrew package is
working correctly.

The HBINFO.TXT file
-------------------
In future the Install-o-tron will be enhanced with AI to allow automatic
installation of just about any homebrew package.  For now, though, it relies
on a new proposed convention for homebrew packaging.

If you look in the ZIP files that are downloaded by the Install-o-tron, you'll
see that we've added a single text file, HBINFO.TXT, to the top-level folder
of the ZIP.  This file provides scripts that tell the Install-o-tron how
to install the homebrew, on different PSP versions.  For example:

  [meta]
  name=snes9xTYL
  ver=0.42

  [install_150]
  s9xTYL-0.4.2/1.5/* -> ms0:/psp/game/
  s9xTYL-0.4.2/readme.txt -> ms0:/psp/game/snes9xTYL/readme.txt
  s9xTYL-0.4.2/changes.txt -> ms0:/psp/game/snes9xTYL/changes.txt

  [install_100]
  [install_2XX]
  s9xTYL-0.4.2/1.0/* -> ms0:/psp/game/
  s9xTYL-0.4.2/readme.txt -> ms0:/psp/game/snes9xTYL/readme.txt
  s9xTYL-0.4.2/changes.txt -> ms0:/psp/game/snes9xTYL/changes.txt

The [meta] section is currently ignored, but should contain basic name and
version information for the homebrew.

The [install_] sections provide simple installation scripts for different
firmware versions.  The data on the left of the "->" is the source path within
the ZIP, and on the right is the destination to which it will be copied.
You can use '/*' on the end of the source to copy everything within a given
directory, as above.

Note that Install-o-tron searches for the first [install_] section that
matches the current firmware, and does all the instructions within that
section, then quits.  '2XX' matches all firmwares from v2.00 upwards.
You can be more specific than '2XX' if you like, and include separate sections
for '200, 250, 260, 270, 271, 280, 281' etc.  If a more specific section is found,
it will have priority over the generic '2XX' section.

We encourage homebrew developers to adopt this system for their releases -
it's easy, and it's clear to users and to computers how to install the
software.  We all know that most people don't read README files, and sometimes
it can be hard to translate READMEs into your own language.  The HBINFO.TXT
standard is language-neutral, and makes it easy to write installer programs.
Including HBINFO.TXT is also a great way to make sure that your homebrew is
immediately supported by Install-o-tron and other install programs - which
means that it will have a wider audience, with fewer installation support
questions to deal with.

Credits
-------
Includes code from:
- The Info-Zip project (ftp://ftp.info-zip.org/pub/infozip/license.html)
- AnonymousTipster (http://www.anonymoustipster.com)
- The PSPSDK (http://www.ps2dev.org)
- PSP LUA Player (http://www.luaplayer.org)

Much thanks to everyone kind enough to donate code that has been used in this
project.

For any support questions, please contact homebrew@noobz.eu.


Change History
--------------

v0.6
   - Fixed download counter updates
   - Added network connection chooser
   - Added file browser for installation via memstick rather than wifi
   - Tidied up file download code
   - Improved support for linefeeds in text

v0.5 - xLoader support
   - Added auto-patching for xLoader and HEN
   - Fixed bug when installing more than one application in one session

v0.4 - Mostly Bugfixes
   - Fix problems caused by move to new homebrew database server
   - Improve download counter interaction
   - Add basic options screen
   - Removed competition splash screen

v0.3 - Bugfix
   - Fix for crash when finished installing some homebrew.

v0.2 - Minor tweaks
   - Handles larger download files (e.g. IR Shell)
   - Better tidy up of temp files from the memory stick

v0.1 - Initial version for PSP3D Ultimate Goodies and Cash Giveaway Contest
