kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
112 stars 28 forks source link

Adding a command option to create ZIM with embedded ZIM files (vs. info.js) #289

Closed tim-moody closed 8 years ago

tim-moody commented 8 years ago

I want to build apks with embedded zims for a number the existing apks. The info.json files are tracked so I don't want to modify them to change "embed_zim" to true, but rather create a separate info file.

Is there a naming convention for apks with embedded zims, like wikimedembed and wikimedembedes? The question applies to the directory and to the physical name of the apk.

I tried creating a separate directory both elsewhere and at the level of customapps, but it rapidly gets messy since all links are relative. Does gen-custom-android-build.py need to be run in the android directory or can it be run from anywhere and will find what it needs (the tools are all in my path).

What about creating a separate embed_info.json inside the directory for each apk and passing that to gen-custom-android-build.py?

kelson42 commented 8 years ago

Yes, to my opinion, per default ./gen-custom-android-build.py should create APKs with embedded ZIM file and this should be deactivated with an option. @tim-moody go ahead if you want to implement this. I'm not a friend of "duplicating" the info/embed_info.sh

For now, there is no naming convention. @mhutti1 has a few weeks ago implemented a patch which make us a lot more free with the naming. So we could start to make one. We could for example use "org.kiwix" as a prefix and then add the name of the zim file like "org.kiwix.wikipedia.en.medicine", To finish we could put "embed" if there is no companion file. What do you think?

I guess that "yes" gen-custom-android-build.py needs to be run in the "android" directory. Maybe here also something to fix, should not be too complicated.

mhutti1 commented 8 years ago

Yes at the moment embedding is defined in the XML but adding a command option to override this would be useful.

kelson42 commented 8 years ago

@tim-moody feedback?

tim-moody commented 8 years ago

there are a number of things in the json file that would need to be overridden including the path to the zim. my current practice is to create a directory for json files for embedded apps which include a path to my zims, so the whole thing is particular to my environment. I don't see an easy way to generalize this, so I am happy with this practice rather than adding a command line argument.

mhutti1 commented 8 years ago

Closing this for now then. If it becomes an issue in the future we can enhance the build script.

kelson42 commented 7 years ago

@tim-moody A few improvements recently: