Giter Club home page Giter Club logo

kiwix-apple-custom's Introduction

Kiwix

Kiwix is an offline reader for Web content. It's especially thought to make Wikipedia available offline. This is done by reading the content of the project stored in a file format ZIM, a high compressed open format with additional meta-data.

COMPILATION INSTRUCTIONS

Take care, the paragraphs are about the target platforms. If you want to build Kiwix for Android on a GNU/Linux system, you should follow the instructions of the "Android" paragraph.

GNU/Linux

Install pre-requisties in your distro, eg, in Debian based:

sudo apt-get install zip pkg-config aptitude
sudo apt-get install libmagic-dev
sudo aptitude install libtool automake

Static (Probably what you need to do if you don't know)

Kiwix uses shared libraries only. A static build of Kiwix is a build which packages the dependencies. Command line tools (indexer, server, etc) are compiled statically.

Run automake

./autogen.sh

Run autoconf

./configure --enable-compileall --enable-staticbins --disable-android;

Download all dependencies

cd src/dependencies;
make;
cd ../..;

Reconfigure with dependencies (Gecko version)

./configure --enable-compileall --enable-staticbins --disable-android;

Compile

make;

Creates tarbal suitable for distribution (no deps)

make diststatic
  • If you want to be able to run directly from your dev repository copy the "xulrunner" directory in the distributation tarball to the "kiwix" sub-directory of your developement tree.

  • Don't try to install with "make install", if you want to have kiwix install on your system just copy the directory in a /usr/local/bin directory.

Dynamic

GNU/Linux build uses shared libraries by default. You will need the following dependencies (also -dev packages) to compile Kiwix for Linux (this list can vary a little bit depending of the GNU/Linux distribution):

  • g++
  • gcc
  • autoconf
  • automake
  • libtool
  • pkg-config
  • liblzma
  • libicu
  • libmicrohttpd
  • zlib
  • libcrypto++
  • cmake
  • wget
  • aria2
  • libuuid
  • libssl
  • libzim
  • libpugixml
  • libctpp2
  • xulrunner

Debian is the only distribution providing natively all these packages. Ubuntu provides most of them, excluding xulrunner and zimlib. You will have to download and install them separatly or run configure --with-static-dep=SELF. Then run the following commands:

Run automake

./autogen.sh;

Configure the compilation check --help for options. Most dependencies accept --with-dep=XX and with-static-dep=XX.a. Static version of libraries are used for building static binaries (server, indexer, etc) Use --with-dep=SELF or --with-static-dep=SELF to trigger fetch and build for the dependency.

./configure;

Compile

make;

Optionaly install on the filesystem

sudo make install;

Mac OSX Universal

WARNING: To build the Mac OS version you will have to install proprietary software which are free of charge. You will also need to build on an Apple Mac computer.

Configure Macports

Install the following tools and libraries

sudo port install autogen +universal pkgconfig +universal wget +universal gmake +universal coreutils +universal libidl +universal autoconf213 +universal icu +universal;

NOTE: the following commands seem to work better on OS X Yosemite, apparently 'universal' is less relevant and various packages are no longer available as universal options.

sudo port  install autogen pkgconfig  wget  gmake  coreutils  libidl  autoconf213  icu;
sudo port -v install aclocal automake libtool autoconf cmake imagemagick
./autogen.sh alt && ./configure --enable-compileall;
cd src/dependencies && make;
make clean;
./autogen.sh alt && ./configure --enable-compileall --enable-compileall --disable-dependency-tracking --with-target-arch=i386;
make;
make distmac;
make clean;
./autogen.sh alt && ./configure --enable-compileall --enable-compileall --disable-dependency-tracking --with-target-arch=x86_64;
make;
make distmac;
make universal;
Debugging tips:
  • components file type can be either Mach-O dynamically linked shared library or Mach-O bundle but above instructions will create dynamic libraries.
  • Shared Object (.so files on Linux) have .dylib extension on OSX.
  • use dtruss to inspect program execution like strace.
  • dyldinfo -lazy_bind | dyldinfo -bind components/zimAccessor.dylib |grep zim
  • nm -gm components/zimAccessor.dylib | nm -u | nm -g
  • otool -L libzim.dylib
  • install_name_tool -change @executable_path/../libicuuc.dylib libicuuc.dylib kiwix-serve
  • lldb

Android

Look at android/README

Windows

  • Install Windows XP SP2+

  • Install Visual Studio Express 2010

  • Install 7-zip

  • Install MozillaBuild 1.6

  • Install ActivePerl

  • Install Ruby

  • Install NSIS 2.46

  • Install nsis_locate

  • Install nsis_uac

  • Replace installed UAC.dll by new one.

  • Install all software in default locations.

  • Change your Windows PATH environment variable:

    • 7zip
    • NSIS
    • ruby
    • Perl
    • mozilla-build\msys\bin\
  • Get shell from c:\mozilla-build\start-msvc10.bat

mkdir -p /c/slave/windows-32b
git clone git://git.code.sf.net/p/kiwix/kiwix kiwix
cd kiwix
./autogen.sh alt
./configure --disable-indexer --enable-jar
make win
make windist
make wininstaller

Contact

Email: [email protected] or [email protected]

Jabber: [email protected]

IRC: #kiwix on irc.freenode.net

You can use IRC web interface on http://chat.kiwix.org/

More... http://www.kiwix.org/wiki/Communication

LEGAL & DISCLAIMER

Read 'COPYING' file

kiwix-apple-custom's People

Contributors

bperlakih avatar kelson42 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gremid

kiwix-apple-custom's Issues

Remove build_number from info.json file

Since we are creating and setting the versions of our releases thanks to GitHub release / tag, we no longer need the build_number to be present in the info.json files.

Use full URL in info.json files for custom apps

#The problem

In the current info.json files we cannot use a full URL.
The reason for this, is that in .xcconfig files slashes are not parsed correctly.

#Solution
Actually we can bypass this now.
Currently these custom app values go from:
info.json -> dwds.xcconfig as a variable, that variable goes into the dwds.plist file.

At the moment all the custom .plist files are essentially identical, but we can move the actual value from info.json to the custom .plist file, this way we won't have the limitations that the xcconfig file format has, so we can use a full url.

Requires updating both the info.json and the kiwix/apple repo.

Trigger CD build, and set build version from GitHub tags

The CD GitHub action should start from a published tag.
The tag should contain the folder name (brand name), the build number (the [PATCH] part of the version) as the [MAJOR].[MINOR] is based on the ZIM file date (see issue on versioning).
The tag should be validated, if it has the right format, and if the folder actually exists.
Eg. a valid tag should look like:
dwds_03 out of which we have the dwds folder/brand to be built with the build number 3 (there are no zeros in semantic versioning).
Also it should be possible to extend the tag with a further optional part, such as:
dwds_11_A1 or dwds_11_test02 in order to be able to retry building or overriding builds with the same number, but having different tags.

Custom Apps CD - per brand, set version from release tag

We want to build and deliver custom apps via a manual trigger, similar to kiwix/kiwix-android-custom.
Assumptions:

  • The build should be triggered by a release, with the appropriate tag (see below)
  • On a single run only the apps of one brands should be built.
  • The versioning should be inline with the ZIM file based approach described here: kiwix/apple#559,
    meaning we have the version [MAJOR].[MINOR].[PATCH] = YYYY.MM.build_number
  • The build_number should be taken from the tag we create on the release
  • In order to be able to create the same build_number twice (we might need to restart or overwrite the build), any additional parts can be appended to tags.
  • Tags should be validated, and should come in the form: brandName_buildNumber(_optionalPart), where the brandName must be an existing folder (on the main branch), containing an info.json file.

Generate custom project file with XcodeGen on top of kiwix/apple

We want to dynamically generate the Xcode project files with XcodeGen for custom projects as well, using the kiwix/apple repository as our base and build on top of it.

The kiwix/apple repository has been prepared to contain all the "base" settings for the Xcode project, that we inherit for the custom apps.

We are creating a new project file that is importing the "project.yml" from the kiwix/apple repo.
This way we are re-using the XcodeGen template from the kiwix/apple repo, and adding new custom targets.

This way all the base settings are still applicable, and we only customising the bare minimum, without any duplications.

The current setup is based on a similar info.json file as the Android one (see: kiwix/kiwix-android-custom), each contained in a "brand" folder. Currently we have 1 brand: "dwds".

What we need in each brand folder:

  • an info.json file
  • xcassets (these are mostly images and icons for the brand)

The rest of the process is automated to create the appropriate branded targets:
Screenshot 2023-12-31 at 15 06 12

DWDS custom app reference point

We need a reference branch, that we can build the DWDS app from manually,
and also a reference point to compare to while working on the 2 repository setup for custom apps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.