<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes. And you are right that there's nothing else that uses it. While it was planned for all apps, it actually only makes sense for low-powered devices.<div><br><div><div>-- DM</div><div><br><div><div>On Apr 9, 2013, at 5:15 PM, Martin Denham &lt;<a href="mailto:mjdenham@gmail.com">mjdenham@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Could JSword's AbstractSwordInstaller be enhanced to make the location that pre-built search indexes are downloaded from configurable. &nbsp;I modified the previous JSword to make the indexes be picked up from the correct place.<div style="">
<br></div><div style="">I think that it is only And Bible that utilises this method which would make the change simpler.</div><div style=""><br></div><div style="">And Bible copied the index storage structures used by PocketSword.</div>
<div style=""><span style="font-family:arial,sans-serif;font-size:13px">And Bible's pre-built&nbsp;</span><span class="" style="background-color:rgb(255,255,204);font-family:arial,sans-serif;font-size:13px">indexes</span><span style="font-family:arial,sans-serif;font-size:13px">&nbsp;are stored here:&nbsp;</span><a href="http://www.crosswire.org/and-bible/indices/v1/" target="_blank" style="font-family:arial,sans-serif;font-size:13px">http://www.crosswire.org/and-bible/indices/v1/</a><br>
</div><div style=""><span style="font-family:arial,sans-serif;font-size:13px">And Bible index zip files are named "MODULE_NAME-VERSION.zip" (eg KJV-1.3.zip)</span><br></div><div style=""><br></div><div style="">This is the modified method currently being used by And Bible:</div>
<div style=""><div>&nbsp; &nbsp; public void downloadSearchIndex(Book book, URI localDest) throws InstallException {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // TRANSLATOR: Progress label for downloading one or more files.</div><div>&nbsp; &nbsp; &nbsp; &nbsp; String jobName = JSMsg.gettext("Downloading files");</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; Progress job = JobManager.createJob(jobName, Thread.currentThread());</div><div>&nbsp; &nbsp; &nbsp; &nbsp; job.beginJob(jobName);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; //MJD START</div><div>&nbsp; &nbsp; &nbsp; &nbsp; //use and-bible index location</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; String indexLocation = "/and-bible/indices/v1";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; try {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Version versionObj = (Version)book.getBookMetaData().getProperty("Version");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // if a module has no version then default version is blank</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String versionSuffix = "";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (versionObj!=null &amp;&amp; versionObj.toString()!=null) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; versionSuffix = "-"+versionObj.toString();</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; download(job, indexLocation, book.getInitials()+versionSuffix + ZIP_SUFFIX, localDest);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //MJD END</div><div>//orig: &nbsp; &nbsp; download(job, packageDirectory + '/' + SEARCH_DIR, book.getInitials() + ZIP_SUFFIX, localDest);</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; } catch (InstallException ex) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; job.cancel();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw ex;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; } finally {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; job.done();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div>
<br></div><div style="">Martin</div><div><br></div></div></div>
_______________________________________________<br>jsword-devel mailing list<br><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>http://www.crosswire.org/mailman/listinfo/jsword-devel<br></blockquote></div><br></div></div></div></body></html>