[sword-devel] Sword API / Basic question regarding InstallMgr class

Tobias Klein contact at tklein.info
Mon Jul 8 12:03:32 MST 2019


Thank you, Troy!
Ok, I didn't see that there are these entirely different use cases when constructing a SWMgr instance. I created my own factory method and basically tried to use the same kind of SWMgr object both for installing/uninstalling and for reading the content of modules.
I think the API docs could mention those different use cases.

For the parameter iConfigPath it says:
iConfigPath provide a custom path to use for module set location, instead of searching the system for it.

I think here it should say something at least about 2 different use cases:
1) Installing/ uninstalling
2) Reading module information/content

Currently the description only applies to the second use case.

Best regards,
Tobias

Am 8. Juli 2019 13:33:42 MESZ schrieb "Troy A. Griffitts" <scribe at crosswire.org>:
>Yes. This is expected behavior. If you sudo your installmgr command, it
>will have access to install globally. If you cd to your ~/.sword folder
>and run the installmgr command, it will install to the CWD (as long as
>a mods.d/ folder exists to let SWORD know you are at the root of a
>SWORD module library).
>
>Programmatically, you should specify where you want to install
>(globally or to a private module library for the user), so you are
>exactly correct. You should provide a destMgr which specifies the
>installation location. There are means to query an SWMgr which has
>autodiscovered its module library. Maybe you could see if you have
>write permission to the path.
>
>Troy
>
>On July 7, 2019 11:35:16 PM MST, Tobias Klein <contact at tklein.info>
>wrote:
>>Hi,
>>
>>I'm struggling with some basic issues regarding installation of
>>modules.
>>
>>When using a SWMgr that has been initialized with no arguments as a 
>>destMgr (first Parameter) for InstallMgr, my module installs fail.
>>
>>Same thing happens when trying to use the command line utility
>>installmgr:
>>
>>./installmgr -ri CrossWire KJV
>>
>>...
>>
>>...
>>
>>Error installing module: [KJV] (write permissions?)
>>
>>
>>On the other hand if I use a SWMgr with a fixed path as the first 
>>parameter (for example pointing to ~/.sword) then the installations of
>
>>modules are succeeding.
>>
>>I'm using Sword 1.8.1.
>>
>>Best regards,
>>Tobias
>>
>>
>>_______________________________________________
>>sword-devel mailing list: sword-devel at crosswire.org
>>http://www.crosswire.org/mailman/listinfo/sword-devel
>>Instructions to unsubscribe/change your settings at above page
>
>-- 
>Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
Message sent from my phone. Please excuse brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20190708/819ce277/attachment.html>


More information about the sword-devel mailing list