标签:keystore LibreraReader get Librera dev 编译 build 阅读器 RELEASE
开源电子书阅读器 LibreraReader 编译环境与编译
https://github.com/foobnix/LibreraReader
========================================================================================
1.下载代码到linux环境 git clone git@github.com:foobnix/LibreraReader.git
2.下载sdk和ndk:我使用的是sdk build-tools 29.0.3
ndkVersion 21.3.6528147
buildToolsVersion '29.0.3'
compileSdkVersion 29
ndkVersion "21.3.6528147"
targetSdkVersion 29
3.根目录创建local.properties文件
ndk下载
https://developer.android.com/ndk/downloads?hl=zh-cn
android {
ndkVersion "22.0.7026061"
}
sdk.dir = /home/xxx/work/androidSdk
ndk.dir = /home/xxx/work/android-ndk-r21d
4.export ANDROID_HOME=/home/xxx/work
export PATH=$PATH:$ANDROID_HOME/android-ndk-r21d
5.安装一些依赖包
sudo apt-get install build-essential
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libglut-dev
sudo apt-get install freeglut3-dev
sudo apt-get install libx11-dev
sudo apt-get install libxi-dev
6.配置keystore.pkcs12
(1)生成key
keytool -genkey -v -storetype PKCS12 -keystore keystore.pkcs12 -alias ALIAS -keyalg RSA -keysize 2048 -validity 10000
(2)~/.gradle/gradle.properties 修改key配置
RELEASE_STORE_FILE=/PATH/TO/YOUR/keystore.pkcs12
RELEASE_STORE_PASSWORD=PASSWD
RELEASE_KEY_PASSWORD=PASSWD
RELEASE_KEY_ALIAS=ALIAS
7.cd Builder ./link_to_mupdf_1.16.1.sh
./gradlew assembleFdroid
等待编译完成
========================================================================================
Librera Reader
Librera Reader is an e-book reader for Android devices; it supports the following formats: PDF, EPUB, EPUB3, MOBI, DjVu, FB2, TXT, RTF, AZW, AZW3, HTML, CBZ, CBR, DOC, DOCX, and OPDS Catalogs
Web: http://librera.mobi/
FAQ: Read
Android Play Market Apps:
Application Fonts (fonts.zip download to internal sd card, to [Downloads] folder) link
Required build libs
mesa-common-dev libxcursor-dev libxrandr-dev libxinerama-dev libglu1-mesa-dev libxi-dev pkg-config
You also need the Android NDK in version 20+ Please ensure to download it using android studio and add the NDK to your PATH.
Create a keystore
Even if you do not plan to upload a version yourself you need a keystore with a certificate to build. The keystore needs to be in PKCS12 format. You can create a keystore in your actual directory using the following call (replace ALIAS by your alias, it is just a name):
keytool -genkey -v -storetype PKCS12 -keystore keystore.pkcs12 -alias ALIAS -keyalg RSA -keysize 2048 -validity 10000
Now edit or create the file ~/.gradle/gradle.properties and set following values (replacing PASSWD by the password you typed while creating the keystore, ALIAS as before and using the path to your keystore):
RELEASE_STORE_FILE=/PATH/TO/YOUR/keystore.pkcs12
RELEASE_STORE_PASSWORD=PASSWD
RELEASE_KEY_PASSWORD=PASSWD
RELEASE_KEY_ALIAS=ALIAS
Create Firebase Authentication file
To build with firebase support (all version but the ones for Fdroid) you need to get an authentication file for firebase services offered by google. Therefore please follow https://firebase.google.com/docs/android/setup to create your own project. You need to register for the packages com.foobnix.pdf.info and com.foobnix.pdf.reader.a1. This way you will get a google-services.json file that you have to place in the app folder of the repository.
For this project only Analytics is used, so a spakling plan is all you need.
Librera Build on MuPdf 1.11 (Default)
cd Builder
./link_to_mupdf_1.11.sh (Change the paths to mupdf and jniLibs folders)
./gradlew assembleLibrera
Librera Build on MuPdf 1.16.1 (Optional, alpha, F-Droid)
cd Builder
./link_to_mupdf_1.16.1.sh
./gradlew assembleAlpha
Building for F-Droid
If you wish to build for F-Droid (e.g. not using google services) you can run the build with
cd Builder
./link_to_mupdf_1.16.1.sh
./gradlew assembleFdroid
F-Droid build does also not need a google-services.json
Librera depends on:
MuPDF - (AGPL License) https://mupdf.com/downloads/archive/
- ebookdroid
- djvulibre
- hpx
- junrar
- glide
- libmobi
- commons-compress
- eventbus
- greendao
- jsoup
- juniversalchardet
- commons-compress
- okhttp3
- okhttp-digest
- okio
- rtfparserkit
- java-mammoth
- zip4j
Librera is distributed under the GPL
License
See the LICENSE file for license rights and limitations (GPL v.3).
标签:keystore,LibreraReader,get,Librera,dev,编译,build,阅读器,RELEASE 来源: https://blog.csdn.net/hi_zhengjian/article/details/112916093
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。