1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

desktop-specific source files were moved to platform/desktop/src

git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@485 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
Nikolay Pultsin 2008-01-18 02:42:32 +00:00
parent 11c9619e1d
commit 45098a9b7a
27 changed files with 70 additions and 97 deletions

1
TODO
View file

@ -95,3 +95,4 @@ DONE FootnoteView
выход по escape из view, не из приложения выход по escape из view, не из приложения
получение списка шрифтов в ZLPaintContext получение списка шрифтов в ZLPaintContext
полноэкранный режим полноэкранный режим
tap scrolling

110
build.xml
View file

@ -1,83 +1,83 @@
<?xml version = "1.0" encoding = "UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project basedir = "." default = "buildJar" name = "fbreader"> <project basedir="." default="buildJar" name="fbreader">
<property name = "src.dir" value = "src"/> <property name="src.path" value="src:platform/swing/src"/>
<property name = "bin.dir" value = "bin"/> <property name="bin.dir" value="bin"/>
<property name = "cache.dir" value = "depcache"/> <property name="cache.dir" value="depcache"/>
<property name = "icons.dir" value = "icons"/> <property name="icons.dir" value="icons"/>
<property name = "data.dir" value = "data"/> <property name="data.dir" value="data"/>
<property name = "test.dir" value = "test"/> <property name="test.dir" value="test"/>
<property name = "manifest.file" value = "manifest.mf"/> <property name="manifest.file" value="manifest.mf"/>
<property name = "main.jar" value = "FBReaderJ.jar"/> <property name="main.jar" value="FBReaderJ.jar"/>
<property name = "sources.zip" value = "FBReaderJ-sources.zip"/> <property name="sources.zip" value="FBReaderJ-sources.zip"/>
<target name = "prepare"> <target name="prepare">
<mkdir dir = "${bin.dir}" /> <mkdir dir="${bin.dir}" />
</target> </target>
<target name = "depend" depends = "prepare"> <target name="depend" depends="prepare">
<depend srcdir = "${src.dir}" destdir = "${bin.dir}" cache = "${cache.dir}" closure = "yes"> <depend srcdir="${src.path}" destdir="${bin.dir}" cache="${cache.dir}" closure="yes">
<exclude name = "org/zlibrary/core/xml/sax/**"/> <exclude name="org/zlibrary/core/xml/sax/**"/>
</depend> </depend>
</target> </target>
<target name = "compile" depends = "depend"> <target name="compile" depends="depend">
<javac srcdir = "${src.dir}" destdir = "${bin.dir}"> <javac srcdir="${src.path}" destdir="${bin.dir}">
<exclude name = "org/zlibrary/core/xml/sax/**"/> <exclude name="org/zlibrary/core/xml/sax/**"/>
</javac> </javac>
</target> </target>
<target name = "buildJar" depends = "compile"> <target name="buildJar" depends="compile">
<jar destfile = "${main.jar}" manifest = "${manifest.file}"> <jar destfile="${main.jar}" manifest="${manifest.file}">
<fileset dir = "${bin.dir}" includes = "**/*.class"/> <fileset dir="${bin.dir}" includes="**/*.class"/>
<fileset dir = "." includes = "${icons.dir}/**/*.png"/> <fileset dir="." includes="${icons.dir}/**/*.png"/>
<fileset dir = "." includes = "${data.dir}/**"/> <fileset dir="." includes="${data.dir}/**"/>
<fileset dir = "platform/swing" includes = "${data.dir}/**"/> <fileset dir="platform/swing" includes="${data.dir}/**"/>
</jar> </jar>
</target> </target>
<target name = "test" depends = "compile"> <target name="test" depends="compile">
<javac srcdir = "${test.dir}" destdir = "${bin.dir}"> <javac srcdir="${test.dir}" destdir="${bin.dir}">
<classpath> <classpath>
<pathelement location = "lib/junit.jar"/> <pathelement location="lib/junit.jar"/>
</classpath> </classpath>
</javac> </javac>
</target> </target>
<target name = "runtests" depends = "test"> <target name="runtests" depends="test">
<junit printsummary = "yes"> <junit printsummary="yes">
<classpath> <classpath>
<pathelement location = "${bin.dir}"/> <pathelement location="${bin.dir}"/>
</classpath> </classpath>
<test name = "org.test.zlibrary.model.TestAll"/> <test name="org.test.zlibrary.model.TestAll"/>
<test name = "org.test.zlibrary.options.TestAll"/> <test name="org.test.zlibrary.options.TestAll"/>
<test name = "org.test.zlibrary.core.resources.AllTests"/> <test name="org.test.zlibrary.core.resources.AllTests"/>
<test name = "org.test.fbreader.formats.fb2.AllTests"/> <test name="org.test.fbreader.formats.fb2.AllTests"/>
</junit> </junit>
</target> </target>
<target name = "clean"> <target name="clean">
<delete dir = "${bin.dir}"/> <delete dir="${bin.dir}"/>
<delete dir = "${cache.dir}"/> <delete dir="${cache.dir}"/>
<delete file = "${main.jar}"/> <delete file="${main.jar}"/>
<delete file = "${sources.zip}"/> <delete file="${sources.zip}"/>
<delete file = "FBReaderJ.jad"/> <delete file="FBReaderJ.jad"/>
<delete dir = "platform/android/res/raw"/> <delete dir="platform/android/res/raw"/>
<delete file = "platform/android/src/org/zlibrary/ui/android/library/R.java"/> <delete file="platform/android/src/org/zlibrary/ui/android/library/R.java"/>
</target> </target>
<target name = "sources-archive" depends = "clean"> <target name="sources-archive" depends="clean">
<echo>Packaging sources archive...</echo> <echo>Packaging sources archive...</echo>
<exec executable = "zip" failonerror = "true"> <exec executable="zip" failonerror="true">
<arg value = "-rq" /> <arg value="-rq" />
<arg value = "${sources.zip}" /> <arg value="${sources.zip}" />
<arg value = "${src.dir}" /> <arg value="${data.dir}" />
<arg value = "${data.dir}" /> <arg value="${icons.dir}" />
<arg value = "${icons.dir}" /> <arg value="${manifest.file}" />
<arg value = "${manifest.file}" /> <arg value="build.xml" />
<arg value = "build.xml" /> <arg value="src" />
<arg value = "platform" /> <arg value="platform" />
<arg value = "-x" /> <arg value="-x" />
<arg value = "*/.svn/*" /> <arg value="*/.svn/*" />
</exec> </exec>
</target> </target>
</project> </project>

View file

@ -5,6 +5,7 @@
<property name="wtk.home" value="/home/geometer/WTK2.5.2" /> <property name="wtk.home" value="/home/geometer/WTK2.5.2" />
<property name="wtk.cldc.version" value="1.1" /> <property name="wtk.cldc.version" value="1.1" />
<property name="wtk.midp.version" value="2.0" /> <property name="wtk.midp.version" value="2.0" />
<property name="wtk.optionalpda.enabled" value="true" />
<property name="wtk.proguard.home" value="${project.dir}"/> <property name="wtk.proguard.home" value="${project.dir}"/>
<property name="platform.dir" value="${project.dir}/platform/a1200" /> <property name="platform.dir" value="${project.dir}/platform/a1200" />
<property name="bin.dir" value="${project.dir}/bin" /> <property name="bin.dir" value="${project.dir}/bin" />
@ -21,8 +22,6 @@
<target name="compile" depends="prepare"> <target name="compile" depends="prepare">
<wtkbuild srcdir="${src.path}" destdir="${bin.dir}"> <wtkbuild srcdir="${src.path}" destdir="${bin.dir}">
<exclude name="org/zlibrary/core/xml/sax/**"/> <exclude name="org/zlibrary/core/xml/sax/**"/>
<exclude name="org/zlibrary/core/xmlconfig/**"/>
<exclude name="org/zlibrary/ui/swing/**"/>
</wtkbuild> </wtkbuild>
</target> </target>

View file

@ -1,6 +1,8 @@
package org.zlibrary.ui.j2me.library; package org.zlibrary.ui.j2me.library;
import java.io.InputStream; import java.io.InputStream;
import javax.microedition.io.Connector;
import javax.microedition.io.file.*;
import javax.microedition.midlet.MIDlet; import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Display;
@ -25,6 +27,15 @@ final class ZLJ2MELibrary extends ZLibrary {
protected InputStream getFileInputStream(String fileName) { protected InputStream getFileInputStream(String fileName) {
// TODO: implement // TODO: implement
/*
try {
FileConnection connection = (FileConnection)Connector.open("file:///SDCard/test.fb2", Connector.READ);
if ((connection != null) && connection.exists()) {
return connection.openInputStream();
}
} catch (Exception e) {
}
*/
return null; return null;
} }

View file

@ -2,7 +2,7 @@
<project name="FBReaderJ" default="package"> <project name="FBReaderJ" default="package">
<property name="sdk-folder" value="/home/geometer/src/android_sdk_linux_m3-rc37a" /> <property name="sdk-folder" value="/home/geometer/src/android_sdk_linux_m3-rc37a" />
<property name="android-tools" value="/home/geometer/src/android_sdk_linux_m3-rc37a/tools" /> <property name="android-tools" value="${sdk-folder}/tools" />
<property name="project-dir" value="/home/geometer/src/projects/FBReaderJ" /> <property name="project-dir" value="/home/geometer/src/projects/FBReaderJ" />
<!-- <!--
@ -17,11 +17,8 @@
<property name="outdir" value="../../bin" /> <property name="outdir" value="../../bin" />
<property name="cachedir" value="../../depcache" /> <property name="cachedir" value="../../depcache" />
<!-- No user servicable parts below. -->
<!-- Input directories --> <!-- Input directories -->
<property name="resource-dir" value="res" /> <property name="resource-dir" value="res" />
<property name="asset-dir" value="assets" />
<property name="src.path" value="../../src:src" /> <property name="src.path" value="../../src:src" />
<!-- Output directories --> <!-- Output directories -->
@ -73,8 +70,6 @@
<target name="depend" depends="dirs, resource-src"> <target name="depend" depends="dirs, resource-src">
<depend srcdir="${src.path}" destdir="${outdir-classes}" cache="${cachedir}" closure="yes"> <depend srcdir="${src.path}" destdir="${outdir-classes}" cache="${cachedir}" closure="yes">
<exclude name="org/zlibrary/core/xml/sax/**"/> <exclude name="org/zlibrary/core/xml/sax/**"/>
<exclude name="org/zlibrary/core/xmlconfig/**"/>
<exclude name="org/zlibrary/ui/swing/**"/>
</depend> </depend>
</target> </target>
@ -82,8 +77,6 @@
<target name="compile" depends="depend"> <target name="compile" depends="depend">
<javac target="1.5" srcdir="${src.path}" destdir="${outdir-classes}" bootclasspath="${android-jar}"> <javac target="1.5" srcdir="${src.path}" destdir="${outdir-classes}" bootclasspath="${android-jar}">
<exclude name = "org/zlibrary/core/xml/sax/**"/> <exclude name = "org/zlibrary/core/xml/sax/**"/>
<exclude name="org/zlibrary/core/xmlconfig/**"/>
<exclude name = "org/zlibrary/ui/swing/**"/>
</javac> </javac>
</target> </target>
@ -99,27 +92,7 @@
</exec> </exec>
</target> </target>
<!-- Put the project's resources into the output package file. --> <target name="package-res">
<target name="package-res-and-assets">
<echo>Packaging resources and assets...</echo>
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-f" />
<arg value="-c" />
<arg value="-M" />
<arg value="AndroidManifest.xml" />
<arg value="-S" />
<arg value="${resource-dir}" />
<arg value="-A" />
<arg value="${asset-dir}" />
<arg value="-I" />
<arg value="${android-jar}" />
<arg value="${out-package}" />
</exec>
</target>
<!-- Same as package-res-and-assets, but without "-A ${asset-dir}" -->
<target name="package-res-no-assets">
<echo>Packaging resources...</echo> <echo>Packaging resources...</echo>
<exec executable="${aapt}" failonerror="true"> <exec executable="${aapt}" failonerror="true">
<arg value="package" /> <arg value="package" />
@ -136,17 +109,6 @@
</exec> </exec>
</target> </target>
<!-- Invoke the proper target depending on whether or not
an assets directory is present. -->
<!-- TODO: find a nicer way to include the "-A ${asset-dir}" argument
only when the assets dir exists. -->
<target name="package-res">
<available file="${asset-dir}" type="dir"
property="res-target" value="and-assets" />
<property name="res-target" value="no-assets" />
<antcall target="package-res-${res-target}" />
</target>
<!-- Put the project's .class files into the output package file. --> <!-- Put the project's .class files into the output package file. -->
<target name="package-java" depends="compile, package-res"> <target name="package-java" depends="compile, package-res">
<echo>Packaging java...</echo> <echo>Packaging java...</echo>