[sword-devel] InstallMgr improvements
Troy A. Griffitts
scribe at crosswire.org
Sat Jan 1 16:29:34 MST 2005
The InstallMgr code has be updated to include support for recursive
directory installations. This is needed to support modules that contain
images and other media in subdirectories of their DataPath.
I've temporarily augmented our Finney genbook module with an image for
testing (sorry Chris for temporarily corrupting a module, but the
currently released installmgr code shouldn't download the extra
Quickest access to the engine code is with the commandline installmgr
utility under sword/utilities/installmgr, and you can test with a
./installmgr -i #to initialize installmgr in case you've never used
./installmgr -ri crosswire Finney #to download and install the Finney
module from crosswire
check for finney datapath directory and new image subdirectory installed
in your current module-set.
./installmgr -u Finney #uninstall Finney and be sure we've cleaned up
all datafiles, including image subdirectory.
If you're calling installmgr engine code directory from your
application, the API has changed slightly:
Names have been changed to better reflect our standard naming
conventions, and make more sense.
The 2 status reporting virtual methods have been moved from InstallMgr
class to a new StatusReporter class, and the InstallMgr constructor
takes an instance of your subclassed StatusReporter.
There is also a new mechanism to provide your own FTP tranport code, in
case you don't have CURL on your machine. There is a new base class:
FTPTransport that implements basic FTP functions and exposes a single
virtual method to override for subclasses:
char FTPTransport::getURL(const char *destPath, const char *sourceURL);
if you override this method and provide your own implementation to
retrieve sourceURL and save it to destPath, then you can supply this
subclass to the InstallMgr by overriding:
FTPTransport *InstallMgr::createFTPTransport(const char *host,
The default implementation returns our CURL or FTPLib subclass of
FTPTransport (I don't think FTPLib is completely functional yet:
return new CURLFTPTransport(host, statusReporter);
return new FTPLibFTPTransport(host, statusReporter);
There have been some other useful methods added around the API recently
to support this and other things, you might check the ChangeLog or
unaptly named sword-cvs archives for svn checkins:
PS. I'm excited about and look hopefully toward all the desires to help!!!
More information about the sword-devel