5 Star 9 Fork 2

Gitee 极速下载 / koreader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/koreader/koreader
克隆/下载
Building_targets.md 3.54 KB
一键复制 编辑 原始数据 按行查看 历史

Building targets

KOReader is available for multiple platforms. Here are instructions to build installable packages for all these platforms.

These instructions are intended for a Linux OS. MacOS and Windows users are suggested to develop in a Linux VM.

Prerequisites

This instructions asume that you have a development environment ready to run KOReader. If not then please install common prerequisites first.

A toolchain for your target.

Each target has its own architecture and you'll need to setup a proper cross-compile toolchain. Your GCC should be at least version 4.9.

for Android

A compatible version of the Android NDK and SDK will be downloaded automatically by ./kodev release android if no NDK or SDK is provided in environment variables. For that purpose you can use:

ANDROID_NDK_HOME=/ndk/location ANDROID_HOME=/sdk/location ./kodev release android

If you want to use your own installed tools please make sure that you have the NDKr23c and the SDK for Android 9 (API level 28) already installed.

for embedded linux devices

Cross compile toolchains are available for Ubuntu users through these commands:

e-Ink devices (e.g., Kindle, Kobo, Cervantes, reMarkable, PocketBook)

NOTE: While, for some targets (specifically, Cervantes, Kindle & Kobo), we make some effort to support Linaro/Ubuntu TCs, they do not exactly target the proper devices. While your build may go fine, this will probably lead to runtime failure.
As time goes by, and/or the more bleeding-edge your distro is, the greater the risk for mismatch gets.

Which means, that, unless you are very sure you know what you're doing, you'll want to use the exact same TCs we do, ones that target their respective platforms properly.
We have a distribution-agnostic solution to make that mostly painless: koxtoolchain!
This will allow you to build the exact same TCs used to build the nightlies, thanks to the magic of crosstool-ng. These are also included precompiled in the Docker images for the respective targets.

Additional packages

Some platforms will require additional packages:

for Android

Building for Android requires openjdk-8-jdk and p7zip-full.

For both Ubuntu and Debian, install the packages:

sudo apt-get install openjdk-8-jdk p7zip-full

for Debian

Building a debian package requires the dpkg-deb tool. It should be already installed if you're on a Debian/Ubuntu based distribution.

Building

You can check out our nightlybuild script to see how to build a package from scratch.

Android

./kodev release android

Android (x86)

ANDROID_ARCH=x86 ./kodev release android

Desktop Linux

Emulator

See Building.

AppImage (x86_64)

./kodev release appimage

Debian (x86_64)

./kodev release debian

Debian (armel)

./kodev release debian-armel

Debian (armhf)

./kodev release debian-armhf

Desktop macOS

./kodev release macos

e-Ink devices

Cervantes

./kodev release cervantes

Kindle

./kodev release kindle

Kobo

./kodev release kobo

Pocketbook

./kodev release pocketbook

reMarkable

./kodev release remarkable

Porting to a new target.

See Porting.md

C/C++
1
https://gitee.com/mirrors/koreader.git
git@gitee.com:mirrors/koreader.git
mirrors
koreader
koreader
master

搜索帮助