<html><head></head><body>Hi Paul,<br><br>Have a look at the command line interface for installmgr here.<br><br><a href="https://crosswire.org/svn/sword/trunk/utilities/installmgr.cpp">https://crosswire.org/svn/sword/trunk/utilities/installmgr.cpp</a><br><br><div class="gmail_quote">On December 8, 2022 1:50:48 PM MST, P Mosier <paladin1@sdf.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre dir="auto" class="k9mail">Hello,<br><br>I am trying to figure out what the appropriate steps to take are for programmatically installing a module through FTP. Looking through the backend codebase, it seems like there are some configuration settings that have to be initialized in SWMgr order for InstallMgr::installModule to work. However, tracking this down has eluded me as InstallMgr never seems to be set up and called the same way twice.<br><br>I have this as a simple example:<br><br> sword::SWMgr swrd;<br> sword::InstallSource is("FTP");<br> is.source = "ftp.crosswire.org";<br> is.directory = "/pub/sword";<br><br> sword::InstallMgr im;<br> im.installModule(&swrd, 0, "KJVA", &is);<br><br>The call to installModule segfaults at this line:<br><br> module = mgr.config->getSections().find(modName);<br><br>I recognize it might be related to my own environment. This is the entire content of my /etc/sword:<br>[Install]<br>DataPath=/usr/share/sword/<br><br>Does someone have an idea for what I'm missing, or an example to direct me to so I can get a better handle on this area of code?<br><br>Thanks,<br>- Paul M<hr>sword-devel mailing list: sword-devel@crosswire.org<br><a href="http://crosswire.org/mailman/listinfo/sword-devel">http://crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br></pre></blockquote></div><div class='k9mail-signature'>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></body></html>