<div dir="ltr"><div>Oi. That's going to be really ... interesting. Modules aren't particularly small, though they rarely exceed 6-8 files except in the case of those biggest image-based modules. You might be best to auto-scan the list of available languages, and generate a different copy of your app for each language that Sword offers modules for? And it would just have all the relevant files for that language already loaded? It's going to cut down on one of the great parts of Sword apps, and that's access to *all the languages*. But if you include *all the languages* even just form CrossWire and only the ones whose licenses are free to distribute (not all of them are free for others to distribute, some are CW-only, etc), you're going to be looking at a good sized application. You can easily grow to dozens of gigabytes even just picking up a few modules from a few of the more popular languages. And that's to say nothing of commentaries, lexica, and general book modules which can balloon quickly in size.</div><div><br></div><div>And the user will need to download it *every time*. You might be better off to have them load the files once, import the content into the Web database on the host, and just ask for user permission to store lots of data.</div><div><br></div><div>A third alternative is to incorporate WebAssembly to fetch Sword files and write them to local disk using the newly available <a href="https://web.dev/file-system-access/">https://web.dev/file-system-access/</a>. Requires newer browsers, but you're not likely running on antique hardware if you're running a browser new enough for WASM+Qt applications.</div><div><br></div><div>You'll mainly be looking into the FileMgr class in Sword for where file access is.</div><div><br></div><div>CLucene is an optional library that is used to build indexes to modules to speed up searching. It's entirely optional. libsword already includes brute-force searching that's "good enough" for nearly everyone and "fast enough" on any remotely modern machine to do the trick. CLucene is nice-to-have, especially if you know the advanced Lucene search syntax or if you have an older system with slow access. But it's definitely an advanced, optional feature.</div><div><br></div><div>--Greg<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 17, 2020 at 9:27 PM Loren Burkholder <<a href="mailto:computersemiexpert@outlook.com">computersemiexpert@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for the suggestions, Greg. One positive thing for me is that I am using Qt, and Qt has a macro Q_OS_WASM that is defined when you are building for WASM. I'm planning to use this, if necessary, to circumvent WASM limitations by removing/rethinking features when in WASM. Also, settings that require program reloads are not (in my experience) stored between loads of the WASM app. Therefore, the Q_OS_WASM macro could be used to simply cut such features from the WASM build.<br>
<br>
One thing to consider, as far as modules are concerned, is that if somebody is using the WebAssembly build of a program, they almost certainly will have a working internet connection at some point. This could mean that the program could simply download a basic module--like KJV--at startup, and give the user the option to download others straight from the web. Alternatively, embedded resources work just fine in WASM (that's how I've been delivering the Bible in my app up until now), so the KJV module could be embedded with the option to install others.<br>
<br>
About CLucene--is that something that is used in Sword by default or is it an optional feature?<br>
<br>
Loren<br>
<br>
<br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer" target="_blank">http://crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</blockquote></div>