<div dir="ltr">Could JSword's AbstractSwordInstaller be enhanced to make the location that pre-built search indexes are downloaded from configurable. 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 </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"> are stored here: </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> public void downloadSearchIndex(Book book, URI localDest) throws InstallException {</div><div> // TRANSLATOR: Progress label for downloading one or more files.</div><div> String jobName = JSMsg.gettext("Downloading files");</div>
<div> Progress job = JobManager.createJob(jobName, Thread.currentThread());</div><div> job.beginJob(jobName);</div><div><br></div><div> //MJD START</div><div> //use and-bible index location</div>
<div> String indexLocation = "/and-bible/indices/v1";</div><div> try {</div><div> Version versionObj = (Version)book.getBookMetaData().getProperty("Version");</div><div> // if a module has no version then default version is blank</div>
<div> String versionSuffix = "";</div><div> if (versionObj!=null && versionObj.toString()!=null) {</div><div> versionSuffix = "-"+versionObj.toString();</div>
<div> }</div><div> download(job, indexLocation, book.getInitials()+versionSuffix + ZIP_SUFFIX, localDest);</div><div> //MJD END</div><div>//orig: download(job, packageDirectory + '/' + SEARCH_DIR, book.getInitials() + ZIP_SUFFIX, localDest);</div>
<div> } catch (InstallException ex) {</div><div> job.cancel();</div><div> throw ex;</div><div> } finally {</div><div> job.done();</div><div> }</div><div> }</div><div>
<br></div><div style>Martin</div><div><br></div></div></div>