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
111 stars 28 forks source link

gen-custom-android-build.py should provide a solution to override info.json #409

Closed kelson42 closed 7 years ago

kelson42 commented 7 years ago

gen-custom-android-build.py is the script used to create custom apps, ie. apps which include a unique content (ZIM file) and are rebranded.

The custom apps properties are stored in a json file like custom/wikimedpt/info.json for example. We need a solution to be able to call gen-custom-android-build.py with a info json file and overrides json files properties on the fly.

Here is how it should work: ./gen-custom-android-build.py custom/wikimedpt/info.json --override-version_code=42

should overwrite the "version_code" in the info.json file. This should work for all the possible values in the json file (--override-version_name, --override-enforced_lang, ...)

EladKeyshawn commented 7 years ago

@kelson42 tell me if this what you required

kelson42 commented 7 years ago

@EladKeyshawn Thx, works for me. Before closing this ticket, I think it would be even better to check the arguments (base on DEFAULT_JSDATA to detect early any typo). You probably need to change a little the way how it works with mandatory fields (they are commented out).

EladKeyshawn commented 7 years ago

@kelson42 yeah I look a bit further into it;)

On Sat, Dec 31, 2016, 10:50 AM Kelson notifications@github.com wrote:

@EladKeyshawn https://github.com/EladKeyshawn Thx, works for me. Before closing this ticket, I think it would be even better to check the arguments (base on DEFAULT_JSDATA to detect early any typo). You probably need to change a little the way how it works with mandatory fields (they are commented out).

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/kiwix/kiwix/issues/409#issuecomment-269856148, or mute the thread https://github.com/notifications/unsubscribe-auth/AQVJueDA9CoiLA5FHmKw1L_Y0l7WDCbcks5rNhddgaJpZM4LYXwQ .

EladKeyshawn commented 7 years ago

@LFT09KA ?

mhutti1 commented 7 years ago

@EladKeyshawn Hes a spammer.

tim-moody commented 7 years ago

could we also have the zim directory as a separate optional parameter to which zim_file would be relative.

kelson42 commented 7 years ago

@tim-moody I would open a new ticket asking to put absolute path in the "zim_file" field

kelson42 commented 7 years ago

@EladKeyshawn Could you got ahead/finish that ticket? You have almost done most of the work.

EladKeyshawn commented 7 years ago

@kelson42 Remind me what addition do I need to do?

kelson42 commented 7 years ago

https://github.com/kiwix/kiwix/issues/409#issuecomment-269856148

tim-moody commented 7 years ago

putting an absolute path for the zim and image files in the json file already worked, at least the last time I ran it. but I am asking for the opposite, having a separate path parameter so the json files don't all have to be changed if I move the zims.

kelson42 commented 7 years ago

@tim-moody I do not really understand how this would be easier to what we already have. But you can implement yourself, and I would merge it if that really helps you. I think in particular that you should use #387 new feature.

kelson42 commented 7 years ago

This issue was moved to kiwix/kiwix-android#35