
#Size kiwix android
VERSION_CODE=3171980 kiwix-build -target-platform android -android-arch x86_64 -android-custom-app wikimed -zim-file-size $ZIM_SIZE kiwix-android-custom VERSION_CODE=2171980 kiwix-build -target-platform android -android-arch x86 -android-custom-app wikimed -zim-file-size $ZIM_SIZE kiwix-android-custom VERSION_CODE=1171980 kiwix-build -target-platform android -android-arch arm64 -android-custom-app wikimed -zim-file-size $ZIM_SIZE kiwix-android-custom VERSION_CODE=171980 kiwix-build -target-platform android -android-arch arm -android-custom-app wikimed -zim-file-size $ZIM_SIZE kiwix-android-custom The version name is the version seen by the user.įor wikimed, we use to have a version using the format "YYYY-MM", so, it should be something like "2017-07" :

The default CONTENT_VERSION_CODE is the same of the VERSION_CODE for arm (so 171980)Īs it is common to all apks we can set it as environment variable : We will also need a CONTENT_VERSION_CODE to version the companion file (the zim file). Now we have the VERSION_CODEs to use, we can launch kiwix-build.
#Size kiwix code
So a VERSION_CODE for a arm build the Juillet 17th of 2017 with extra code of 0 will be 171980įor an arm64 build it will be 1171980, for a x86 it will be 2171980 and so forth. The index of the platform is given with this table : Architecture
#Size kiwix apk
So we need to launch kiwix-build six times.Įach apk need a specific VERSION_CODE and this version code depends on the actual date and the architecture of the apk. We will need to build a apk per android architecture. You can set the ZIM_SIZE variable with ZIM_SIZE=$(stat -c %s wikipedia_en_medicine_novid.zim)īe sure, that the zim size is lesser than 2Go. Stat -c %s wikipedia_en_medicine_novid.zimįor me, the size is 1177575831, but it may change depending of the actual version of the zim version you have downloaded. The default zim is specified in the info.json file in the custom-android-app repository. The exact zim file to use is up to you but you will probably want to get the default zim file associated to the customapp. We assume here that we just download it in the current directory.

You can download it wherever you want, but you will need the zim file at the end of the process to upload it. To build the apks, you need to know the size of the zim file.Īs we will also need the zim file itself at the end to upload it to the play store, let's download it first. You also need to have all dependencies of kiwix-build installed. All command will be launched with this directory as current working directory. This documentation will assume you want to build a wikimed custom app.įirst of all, we assume you have a kiwix-build repository checkout out. However, if you want to compile a custom app on your computer and publish it yourselves, this documentation is for you. The simpler way to build and publish a custom app is to use build-custom-app script that uses travis to launch all the jobs.
