[sword-devel] InstallMgr improvements
Troy A. Griffitts
scribe at crosswire.org
Wed Jan 5 02:00:31 MST 2005
Joachim Ansorg wrote:
> Troy,
> thank you very much for your work on the installmgr part!
>
> I noticed that calling terminate() doesn't terminate the download. Is tested
> this in BibleTime, so I'm not sure if it's our bug or Sword's. Can you
> reproduce the bug?
Yes, I could reproduce and think I have it fixed now. Thanks for the
report. Let me know if you still have troubles.
> Is there a way of error (connection troubles, etc.) handling?
Yeah, I think there are error codes (<0) returned from the FTP methods.
Where you wanting something additional?
-Troy.
>
> Thanks again,
> Joachim
>
>
>>A few corrections:
>>
>> ./installmgr -init #to initialize installmgr. NOTE: -init, not -i
>>
>> You might need to be root on your *nix system if your sword modules are
>>installed systemwide, like at /usr/share/sword
>>
>> I'll post a new InstallManager.exe for windows soon that links against
>>the new library, so we can get some windows feedback from you.
>>
>> -Troy.
>>
>>Troy A. Griffitts wrote:
>>
>>>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
>>>subdirectory)
>>>
>>>Quickest access to the engine code is with the commandline installmgr
>>>utility under sword/utilities/installmgr, and you can test with a
>>>command like:
>>>
>>>./installmgr -i #to initialize installmgr in case you've never used
>>>it before
>>>
>>>./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,
>>>StatusReporter *statusReporter);
>>>
>>>The default implementation returns our CURL or FTPLib subclass of
>>>FTPTransport (I don't think FTPLib is completely functional yet:
>>>
>>>
>>>#ifdef CURLAVAILABLE
>>> return new CURLFTPTransport(host, statusReporter);
>>>#else
>>> return new FTPLibFTPTransport(host, statusReporter);
>>>#endif
>>>
>>>
>>>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:
>>>
>>>http://www.crosswire.org/pipermail/sword-cvs/
>>>
>>> -Troy.
>>>
>>>
>>>PS. I'm excited about and look hopefully toward all the desires to
>>>help!!!
>>>
>>>_______________________________________________
>>>sword-devel mailing list
>>>sword-devel at crosswire.org
>>>http://www.crosswire.org/mailman/listinfo/sword-devel
>>
>>_______________________________________________
>>sword-devel mailing list
>>sword-devel at crosswire.org
>>http://www.crosswire.org/mailman/listinfo/sword-devel
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> sword-devel mailing list
> sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
More information about the sword-devel
mailing list