[sword-devel] Making a Zip archive of a module?

David Haslam dfhdfh at protonmail.com
Thu Jan 10 12:20:01 MST 2019


I generally build modules straight into the Sword path. viz.

- Either it's a new (or test) module that wasn't already installed from an external repository
- or it's an update for a module I'd previously submitted.
- or it's a new build for a module I'm developing, etc

And yes, I generally create a cmd file for building each module as I'm very likely to have to use it again.
So I could choose to include a command to archive a module straight after building it.

Xiphos archives modules into the Zip folder under the Sword path.
I generally move the most recently archived module into a suitably named folder somewhere below that.

Aside: In my various development activities, I make use of symbolic links (using the Windows mklink command) and subst drives.
e.g. My Sword path is set up as subst drive S: which makes it very easy to go to in Windows Explorer.

Best regards,

David

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, 10 January 2019 19:05, Dudeck, John <John.Dudeck at sim.org> wrote:

> I get your point. But that is assuming the module has been built and installed into the local Sword path. To me it doesn't seem logical that you would build the module directly in the Sword tree. I would build first, then install.
>
> I have set up my build scripts to work in the working directory for each source, and create the output in a mods.d and modules tree under each source, and the zip file in the working directory. After building I install the module into Sword using Xiphos Module Manager (I could just copy them). I build the zip file at the same time since my script already knows the modulename.
>
> I guess my biggest question with your suggestion is where should the tool place the resulting zip file? Is there a standardized location?
>
> John
>
>> I was rather hoping that a tool that takes just the ModuleName as its parameter might be
>> available.
>>
>> If we can have
>> mkfastmod ModuleName
>> and
>> mod2zmod ModuleName
>> then why not one like
>> zipmod ModuleName
>> that finds the right files by looking up the path in .conf file?
>>
>> David
>>
>> Sent from ProtonMail Mobile
>>
>>
>> On Thu, Jan 10, 2019 at 18:13, Dudeck, John <John.Dudeck at sim.org> wrote:
>> David, here's a snippet from my bat files that I use for creating modules. The zip files import
>> into AndBible without problem.
>>
>> ========================================
>> rem usage: OSIS2sword-bibles sourcepath/filename
>> set modname=%~n1
>>
>> [snip]
>>
>> rem create zip file
>> rem delete any previous zip
>> del "%modname%.zip"
>> rem (uses zip.exe from http://downloads.sourceforge.net/gnuwin32/zip-3.0-setup.exe)
>> "c:Program Files (x86)GnuWin32 inzip.exe" -r -u "%modname%.zip" mods.d* modules*
>> ========================================
>>
>>
>>
>> > I normally use the Xiphos Module Manager (Maintenance | Archive) to create a
>> compressed Zip
>> > archive of a selected module.
>> >
>> > Is there an equivalent Sword Utility to perform the same task in a command shell ?
>> >
>> > Regards,
>> >
>> > David
>> >
>> > Sent from ProtonMail Mobile
>>
>> John Dudeck
>> Programmer at Editions Cle                             Lyon, France
>> john.dudeck at sim.org                            john at editionscle.com
>> --
>> Table saw: A large stationary power tool commonly used to launch wood
>> projectiles for testing wall integrity.
>>
>>
>>
>
> John Dudeck
> Programmer at Editions Cle                             Lyon, France
> john.dudeck at sim.org                            john at editionscle.com
> --
> Table saw: A large stationary power tool commonly used to launch wood
> projectiles for testing wall integrity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20190110/7ce74380/attachment-0001.html>


More information about the sword-devel mailing list