Skip to content

Commit ca42cba

Browse files
committed
build procedure has been changed
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1627 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
1 parent 9eb9b9b commit ca42cba

4 files changed

Lines changed: 42 additions & 13 deletions

File tree

HowToBuild

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
How to Build for Android
22
------------------------
33

4-
Requirements: Android SDK 1.6, Android NDK 1.5
4+
Prerequisites:
55

6-
1. Compile native code.
7-
This step could be skipped, prebuilded native libraries are currently included into the source package.
6+
1. Android SDK >= 1.6
87

9-
2. Create 'local.properties' file containing sdk-location definition:
10-
sdk-location=<path to the Android SDK folder>
8+
2. Android NDK >= r4b
119

12-
3. Run './createRawResources.py'.
10+
3. python
1311

14-
4. Run 'ant release'.
12+
To build:
13+
14+
1. Create 'local.properties' file containing sdk.dir && ndk.dir definitions:
15+
sdk.dir=<path to the Android SDK folder>/tools
16+
ndk.dir=<path to the Android NDK folder>
17+
E.g., on my computer 'local.properties' consists of 2 lines:
18+
sdk.dir=/Users/geometer/android-sdk-mac_86
19+
ndk.dir=/Users/geometer/android-ndk-r4b
20+
21+
2. Run 'ant'.
22+
23+
3. Sign your package manually.

build.xml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="FBReaderJ" default="help">
2+
<project name="FBReaderJ" default="package">
33
<property file="local.properties"/>
44
<property file="build.properties"/>
55
<property file="default.properties"/>
66

77
<path id="android.antlibs">
8-
<pathelement path="${sdk-location}/tools/lib/anttasks.jar" />
9-
<pathelement path="${sdk-location}/tools/lib/sdklib.jar" />
10-
<pathelement path="${sdk-location}/tools/lib/androidprefs.jar" />
11-
<pathelement path="${sdk-location}/tools/lib/apkbuilder.jar" />
12-
<pathelement path="${sdk-location}/tools/lib/jarutils.jar" />
8+
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
9+
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
10+
<pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
11+
<pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
12+
<pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
1313
</path>
1414

1515
<taskdef name="setup"
@@ -18,10 +18,30 @@
1818

1919
<setup />
2020

21+
<target name="native">
22+
<exec executable="${ndk.dir}/ndk-build">
23+
<arg value="-C"/>
24+
<arg value="jni"/>
25+
</exec>
26+
</target>
27+
28+
<target name="resources">
29+
<exec executable="./createRawResources.py"/>
30+
</target>
31+
32+
<target name="package" depends="native,resources,release">
33+
</target>
34+
2135
<target name="clean">
2236
<delete dir="gen"/>
2337
<delete dir="bin"/>
2438
<delete dir="res/raw"/>
2539
<delete dir="res/drawable"/>
40+
<exec executable="${ndk.dir}/ndk-build">
41+
<arg value="-C"/>
42+
<arg value="jni"/>
43+
<arg value="clean"/>
44+
</exec>
45+
<delete dir="obj"/>
2646
</target>
2747
</project>
-14.4 KB
Binary file not shown.

libs/armeabi/libLineBreak.so

-43 KB
Binary file not shown.

0 commit comments

Comments
 (0)