mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
fixed building environment
calibre series info patch (by Kevin Carr) git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1046 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
6f34d5f97c
commit
26e3d749c2
4 changed files with 31 additions and 9 deletions
10
HowToBuild
Normal file
10
HowToBuild
Normal file
|
@ -0,0 +1,10 @@
|
|||
How to Build for Android
|
||||
------------------------
|
||||
|
||||
Requirements: Android SDK 1.6, Android NDK 1.5
|
||||
|
||||
1. Compile native code.
|
||||
This step could be skipped, prebuilded native libraries are currently included into the source package.
|
||||
2. Edit 'local.properties' file.
|
||||
3. Run './createRawResources.py'.
|
||||
4. Run 'ant release'.
|
8
README
8
README
|
@ -1,8 +0,0 @@
|
|||
How to Build for Android
|
||||
------------------------
|
||||
|
||||
Requirements: Android SDK 1.6, Android NDK 1.5
|
||||
|
||||
1. compile native code in 'native' directory
|
||||
2. edit 'local.properties' file
|
||||
3. run 'ant release'
|
|
@ -25,7 +25,7 @@ buildSourceArchive() {
|
|||
ant clean
|
||||
rm -rf $dir $archive
|
||||
mkdir $dir
|
||||
cp -r data icons src native build.xml res *.properties $0 VERSION $dir
|
||||
cp -r data icons src native build.xml AndroidManifest.xml* res *.properties createRawResources.py libs HowToBuild $0 VERSION $dir
|
||||
rm -rf `find $dir -name .svn`
|
||||
zip -rq $archive $dir/*
|
||||
rm -rf $dir
|
||||
|
|
|
@ -37,6 +37,10 @@ class OEBMetaInfoReader extends ZLXMLReaderAdapter implements XMLNamespace {
|
|||
private String myAuthorTag;
|
||||
private String mySubjectTag;
|
||||
private String myLanguageTag;
|
||||
private String myMetaTag = "meta";
|
||||
|
||||
private String mySeriesTitle = "";
|
||||
private int mySeriesIndex = 0;
|
||||
|
||||
private final ArrayList<String> myAuthorList = new ArrayList<String>();
|
||||
private final ArrayList<String> myAuthorList2 = new ArrayList<String>();
|
||||
|
@ -124,6 +128,16 @@ class OEBMetaInfoReader extends ZLXMLReaderAdapter implements XMLNamespace {
|
|||
myReadState = READ_SUBJECT;
|
||||
} else if (tag == myLanguageTag) {
|
||||
myReadState = READ_LANGUAGE;
|
||||
} else if (tag == myMetaTag) {
|
||||
if (attributes.getValue("name").equals("calibre:series")) {
|
||||
mySeriesTitle = attributes.getValue("content");
|
||||
} else if (attributes.getValue("name").equals("calibre:series_index")) {
|
||||
final String strIndex = attributes.getValue("content");
|
||||
try {
|
||||
mySeriesIndex = Integer.parseInt(strIndex);
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -178,6 +192,12 @@ class OEBMetaInfoReader extends ZLXMLReaderAdapter implements XMLNamespace {
|
|||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (tag == myMetaTag) {
|
||||
if (!mySeriesTitle.equals("") && mySeriesIndex > 0) {
|
||||
myBook.setSeriesInfo(mySeriesTitle, mySeriesIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
myBuffer.delete(0, myBuffer.length());
|
||||
myReadState = READ_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue