summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-03-30 17:49:04 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-03-31 13:00:41 +0200
commitd68576c3785572c1f5d41f83015b8fe6bbcbe9e8 (patch)
tree431a86edfac640864ba7f406611e8fe9929908cd
parent32cdb2246eeb9e8109a712ec2a5dd2938e30e9b6 (diff)
downloadmupdf-d68576c3785572c1f5d41f83015b8fe6bbcbe9e8.tar.xz
Reorganize java and android source.
platform/java and platform/android are reorganized: platform/java The new JNI Java classes, mupdf_native.{c,h}, Makefile and Makejar. platform/java/example The example desktop viewer classes. platform/android/viewer The original demo viewer. ndk-build is used to build libmupdf_java.so, making reference to mupdf_native.{c,h} in platform/java.
-rw-r--r--Makerules4
-rw-r--r--platform/android/build.gradle89
-rw-r--r--platform/android/build.sh1
-rw-r--r--platform/android/local.properties.sample8
-rw-r--r--platform/android/src/com/artifex/mupdf/fitz/AndroidDrawDevice.java22
-rw-r--r--platform/android/viewer/.gitignore8
-rw-r--r--platform/android/viewer/AndroidManifest.xml (renamed from platform/android/AndroidManifest.xml)0
-rw-r--r--platform/android/viewer/ClassStructure.txt (renamed from platform/android/ClassStructure.txt)0
-rw-r--r--platform/android/viewer/Icons.txt (renamed from platform/android/Icons.txt)0
-rw-r--r--platform/android/viewer/Makefile (renamed from platform/android/Makefile)1
-rw-r--r--platform/android/viewer/ReadMe.txt (renamed from platform/android/ReadMe.txt)14
-rw-r--r--platform/android/viewer/build.xml (renamed from platform/android/build.xml)18
-rw-r--r--platform/android/viewer/jni/Android.mk (renamed from platform/android/jni/Android.mk)5
-rw-r--r--platform/android/viewer/jni/Application.mk (renamed from platform/android/jni/Application.mk)0
-rw-r--r--platform/android/viewer/jni/Core.mk (renamed from platform/android/jni/Core.mk)51
-rw-r--r--platform/android/viewer/jni/ThirdParty.mk (renamed from platform/android/jni/ThirdParty.mk)24
-rw-r--r--platform/android/viewer/jni/mupdf.c (renamed from platform/android/jni/mupdf.c)0
-rw-r--r--platform/android/viewer/local.properties.sample5
-rw-r--r--platform/android/viewer/project.properties (renamed from platform/android/project.properties)0
-rw-r--r--platform/android/viewer/res/animator/info.xml (renamed from platform/android/res/animator/info.xml)0
-rw-r--r--platform/android/viewer/res/drawable-hdpi/icon.png (renamed from platform/android/res/drawable-hdpi/icon.png)bin4791 -> 4791 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_annot.png (renamed from platform/android/res/drawable-ldpi/ic_annot.png)bin311 -> 311 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_annotation.png (renamed from platform/android/res/drawable-ldpi/ic_annotation.png)bin480 -> 480 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_arrow_left.png (renamed from platform/android/res/drawable-ldpi/ic_arrow_left.png)bin204 -> 204 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_arrow_right.png (renamed from platform/android/res/drawable-ldpi/ic_arrow_right.png)bin208 -> 208 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_cancel.png (renamed from platform/android/res/drawable-ldpi/ic_cancel.png)bin204 -> 204 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_check.png (renamed from platform/android/res/drawable-ldpi/ic_check.png)bin213 -> 213 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_clipboard.png (renamed from platform/android/res/drawable-ldpi/ic_clipboard.png)bin1309 -> 1309 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_dir.png (renamed from platform/android/res/drawable-ldpi/ic_dir.png)bin157 -> 157 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_doc.png (renamed from platform/android/res/drawable-ldpi/ic_doc.png)bin1262 -> 1262 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_highlight.png (renamed from platform/android/res/drawable-ldpi/ic_highlight.png)bin378 -> 378 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_link.png (renamed from platform/android/res/drawable-ldpi/ic_link.png)bin342 -> 342 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_list.png (renamed from platform/android/res/drawable-ldpi/ic_list.png)bin2821 -> 2821 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_magnifying_glass.png (renamed from platform/android/res/drawable-ldpi/ic_magnifying_glass.png)bin323 -> 323 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_more.png (renamed from platform/android/res/drawable-ldpi/ic_more.png)bin533 -> 533 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_pen.png (renamed from platform/android/res/drawable-ldpi/ic_pen.png)bin257 -> 257 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_print.png (renamed from platform/android/res/drawable-ldpi/ic_print.png)bin1248 -> 1248 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_proof.png (renamed from platform/android/res/drawable-ldpi/ic_proof.png)bin1229 -> 1229 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_reflow.png (renamed from platform/android/res/drawable-ldpi/ic_reflow.png)bin220 -> 220 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_select.png (renamed from platform/android/res/drawable-ldpi/ic_select.png)bin247 -> 247 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_share.png (renamed from platform/android/res/drawable-ldpi/ic_share.png)bin313 -> 313 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_strike.png (renamed from platform/android/res/drawable-ldpi/ic_strike.png)bin449 -> 449 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_trash.png (renamed from platform/android/res/drawable-ldpi/ic_trash.png)bin246 -> 246 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_underline.png (renamed from platform/android/res/drawable-ldpi/ic_underline.png)bin403 -> 403 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/ic_updir.png (renamed from platform/android/res/drawable-ldpi/ic_updir.png)bin268 -> 268 bytes
-rw-r--r--platform/android/viewer/res/drawable-ldpi/icon.png (renamed from platform/android/res/drawable-ldpi/icon.png)bin2158 -> 2158 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_annot.png (renamed from platform/android/res/drawable-mdpi/ic_annot.png)bin418 -> 418 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_annotation.png (renamed from platform/android/res/drawable-mdpi/ic_annotation.png)bin601 -> 601 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_arrow_left.png (renamed from platform/android/res/drawable-mdpi/ic_arrow_left.png)bin225 -> 225 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_arrow_right.png (renamed from platform/android/res/drawable-mdpi/ic_arrow_right.png)bin233 -> 233 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_arrow_up.png (renamed from platform/android/res/drawable-mdpi/ic_arrow_up.png)bin297 -> 297 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_cancel.png (renamed from platform/android/res/drawable-mdpi/ic_cancel.png)bin224 -> 224 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_check.png (renamed from platform/android/res/drawable-mdpi/ic_check.png)bin251 -> 251 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_clipboard.png (renamed from platform/android/res/drawable-mdpi/ic_clipboard.png)bin1345 -> 1345 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_dir.png (renamed from platform/android/res/drawable-mdpi/ic_dir.png)bin165 -> 165 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_doc.png (renamed from platform/android/res/drawable-mdpi/ic_doc.png)bin1277 -> 1277 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_highlight.png (renamed from platform/android/res/drawable-mdpi/ic_highlight.png)bin524 -> 524 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_link.png (renamed from platform/android/res/drawable-mdpi/ic_link.png)bin374 -> 374 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_list.png (renamed from platform/android/res/drawable-mdpi/ic_list.png)bin2791 -> 2791 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_magnifying_glass.png (renamed from platform/android/res/drawable-mdpi/ic_magnifying_glass.png)bin386 -> 386 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_more.png (renamed from platform/android/res/drawable-mdpi/ic_more.png)bin671 -> 671 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_pen.png (renamed from platform/android/res/drawable-mdpi/ic_pen.png)bin282 -> 282 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_print.png (renamed from platform/android/res/drawable-mdpi/ic_print.png)bin1250 -> 1250 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_proof.png (renamed from platform/android/res/drawable-mdpi/ic_proof.png)bin2267 -> 2267 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_reflow.png (renamed from platform/android/res/drawable-mdpi/ic_reflow.png)bin234 -> 234 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_select.png (renamed from platform/android/res/drawable-mdpi/ic_select.png)bin280 -> 280 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_sep.png (renamed from platform/android/res/drawable-mdpi/ic_sep.png)bin1098 -> 1098 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_share.png (renamed from platform/android/res/drawable-mdpi/ic_share.png)bin361 -> 361 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_strike.png (renamed from platform/android/res/drawable-mdpi/ic_strike.png)bin622 -> 622 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_trash.png (renamed from platform/android/res/drawable-mdpi/ic_trash.png)bin291 -> 291 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/ic_underline.png (renamed from platform/android/res/drawable-mdpi/ic_underline.png)bin565 -> 565 bytes
-rw-r--r--platform/android/viewer/res/drawable-mdpi/icon.png (renamed from platform/android/res/drawable-mdpi/icon.png)bin3009 -> 3009 bytes
-rw-r--r--platform/android/viewer/res/drawable-xhdpi/icon.png (renamed from platform/android/res/drawable-xhdpi/icon.png)bin6413 -> 6413 bytes
-rw-r--r--platform/android/viewer/res/drawable/busy.xml (renamed from platform/android/res/drawable/busy.xml)0
-rw-r--r--platform/android/viewer/res/drawable/button.xml (renamed from platform/android/res/drawable/button.xml)0
-rw-r--r--platform/android/viewer/res/drawable/darkdenim3.png (renamed from platform/android/res/drawable/darkdenim3.png)bin22532 -> 22532 bytes
-rw-r--r--platform/android/viewer/res/drawable/page_num.xml (renamed from platform/android/res/drawable/page_num.xml)0
-rw-r--r--platform/android/viewer/res/drawable/search.xml (renamed from platform/android/res/drawable/search.xml)0
-rw-r--r--platform/android/viewer/res/drawable/seek_progress.xml (renamed from platform/android/res/drawable/seek_progress.xml)0
-rw-r--r--platform/android/viewer/res/drawable/seek_thumb.xml (renamed from platform/android/res/drawable/seek_thumb.xml)0
-rw-r--r--platform/android/viewer/res/drawable/tiled_background.xml (renamed from platform/android/res/drawable/tiled_background.xml)0
-rw-r--r--platform/android/viewer/res/layout/buttons.xml (renamed from platform/android/res/layout/buttons.xml)0
-rw-r--r--platform/android/viewer/res/layout/main.xml (renamed from platform/android/res/layout/main.xml)0
-rw-r--r--platform/android/viewer/res/layout/outline_entry.xml (renamed from platform/android/res/layout/outline_entry.xml)0
-rw-r--r--platform/android/viewer/res/layout/picker_entry.xml (renamed from platform/android/res/layout/picker_entry.xml)0
-rw-r--r--platform/android/viewer/res/layout/print_dialog.xml (renamed from platform/android/res/layout/print_dialog.xml)0
-rw-r--r--platform/android/viewer/res/layout/textentry.xml (renamed from platform/android/res/layout/textentry.xml)0
-rw-r--r--platform/android/viewer/res/values-ar/strings.xml (renamed from platform/android/res/values-ar/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-ca/strings.xml (renamed from platform/android/res/values-ca/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-cs/strings.xml (renamed from platform/android/res/values-cs/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-da/strings.xml (renamed from platform/android/res/values-da/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-de/strings.xml (renamed from platform/android/res/values-de/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-el/strings.xml (renamed from platform/android/res/values-el/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-es/strings.xml (renamed from platform/android/res/values-es/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-et/strings.xml (renamed from platform/android/res/values-et/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-fi/strings.xml (renamed from platform/android/res/values-fi/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-fr/strings.xml (renamed from platform/android/res/values-fr/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-hi/strings.xml (renamed from platform/android/res/values-hi/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-hu/strings.xml (renamed from platform/android/res/values-hu/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-in/strings.xml (renamed from platform/android/res/values-in/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-it/strings.xml (renamed from platform/android/res/values-it/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-iw/strings.xml (renamed from platform/android/res/values-iw/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-ja/strings.xml (renamed from platform/android/res/values-ja/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-ko/strings.xml (renamed from platform/android/res/values-ko/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-lt/strings.xml (renamed from platform/android/res/values-lt/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-ms/strings.xml (renamed from platform/android/res/values-ms/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-nl/strings.xml (renamed from platform/android/res/values-nl/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-no/strings.xml (renamed from platform/android/res/values-no/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-pl/strings.xml (renamed from platform/android/res/values-pl/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-pt/strings.xml (renamed from platform/android/res/values-pt/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-ru/strings.xml (renamed from platform/android/res/values-ru/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-sk/strings.xml (renamed from platform/android/res/values-sk/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-sv/strings.xml (renamed from platform/android/res/values-sv/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-th/strings.xml (renamed from platform/android/res/values-th/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-tl/strings.xml (renamed from platform/android/res/values-tl/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-tr/strings.xml (renamed from platform/android/res/values-tr/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-zh-rTW/strings.xml (renamed from platform/android/res/values-zh-rTW/strings.xml)0
-rw-r--r--platform/android/viewer/res/values-zh/strings.xml (renamed from platform/android/res/values-zh/strings.xml)0
-rw-r--r--platform/android/viewer/res/values/colors.xml (renamed from platform/android/res/values/colors.xml)0
-rw-r--r--platform/android/viewer/res/values/strings.xml (renamed from platform/android/res/values/strings.xml)0
-rw-r--r--platform/android/viewer/res/values/styles.xml (renamed from platform/android/res/values/styles.xml)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/Annotation.java (renamed from platform/android/src/com/artifex/mupdfdemo/Annotation.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/ArrayDeque.java (renamed from platform/android/src/com/artifex/mupdfdemo/ArrayDeque.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/AsyncTask.java (renamed from platform/android/src/com/artifex/mupdfdemo/AsyncTask.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/CancellableAsyncTask.java (renamed from platform/android/src/com/artifex/mupdfdemo/CancellableAsyncTask.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/CancellableTaskDefinition.java (renamed from platform/android/src/com/artifex/mupdfdemo/CancellableTaskDefinition.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java (renamed from platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java (renamed from platform/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFItem.java (renamed from platform/android/src/com/artifex/mupdfdemo/ChoosePDFItem.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/Deque.java (renamed from platform/android/src/com/artifex/mupdfdemo/Deque.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/FilePicker.java (renamed from platform/android/src/com/artifex/mupdfdemo/FilePicker.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfo.java (renamed from platform/android/src/com/artifex/mupdfdemo/LinkInfo.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoExternal.java (renamed from platform/android/src/com/artifex/mupdfdemo/LinkInfoExternal.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoInternal.java (renamed from platform/android/src/com/artifex/mupdfdemo/LinkInfoInternal.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoRemote.java (renamed from platform/android/src/com/artifex/mupdfdemo/LinkInfoRemote.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoVisitor.java (renamed from platform/android/src/com/artifex/mupdfdemo/LinkInfoVisitor.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFActivity.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFAlert.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFAlert.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFAlertInternal.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFAlertInternal.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFCancellableTaskDefinition.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFCancellableTaskDefinition.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFCore.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFPageAdapter.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFPageAdapter.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFPageView.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReaderView.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReflowView.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFReflowView.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFView.java (renamed from platform/android/src/com/artifex/mupdfdemo/MuPDFView.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/OutlineActivity.java (renamed from platform/android/src/com/artifex/mupdfdemo/OutlineActivity.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/OutlineActivityData.java (renamed from platform/android/src/com/artifex/mupdfdemo/OutlineActivityData.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/OutlineAdapter.java (renamed from platform/android/src/com/artifex/mupdfdemo/OutlineAdapter.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/OutlineItem.java (renamed from platform/android/src/com/artifex/mupdfdemo/OutlineItem.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/PageView.java (renamed from platform/android/src/com/artifex/mupdfdemo/PageView.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/PrintDialogActivity.java (renamed from platform/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/ReaderView.java (renamed from platform/android/src/com/artifex/mupdfdemo/ReaderView.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/SafeAnimatorInflater.java (renamed from platform/android/src/com/artifex/mupdfdemo/SafeAnimatorInflater.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/SearchTask.java (renamed from platform/android/src/com/artifex/mupdfdemo/SearchTask.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/SearchTaskResult.java (renamed from platform/android/src/com/artifex/mupdfdemo/SearchTaskResult.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/Separation.java (renamed from platform/android/src/com/artifex/mupdfdemo/Separation.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/Stepper.java (renamed from platform/android/src/com/artifex/mupdfdemo/Stepper.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/TextChar.java (renamed from platform/android/src/com/artifex/mupdfdemo/TextChar.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/TextWord.java (renamed from platform/android/src/com/artifex/mupdfdemo/TextWord.java)0
-rw-r--r--platform/android/viewer/src/com/artifex/mupdfdemo/WidgetType.java (renamed from platform/android/src/com/artifex/mupdfdemo/WidgetType.java)0
-rw-r--r--platform/java/Makefile70
-rw-r--r--platform/java/Makejar2
-rw-r--r--platform/java/example/PageCanvas.java (renamed from platform/java/PageCanvas.java)2
-rw-r--r--platform/java/example/TraceDevice.java (renamed from platform/java/TraceDevice.java)2
-rw-r--r--platform/java/example/Viewer.java (renamed from platform/java/Viewer.java)103
-rw-r--r--platform/java/mupdf_native.c4
168 files changed, 210 insertions, 223 deletions
diff --git a/Makerules b/Makerules
index 6fda2f6a..a8257e80 100644
--- a/Makerules
+++ b/Makerules
@@ -67,8 +67,8 @@ SYS_CURL_DEPS = -lpthread
SYS_X11_CFLAGS = -I/usr/X11R6/include
SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
-SYS_FREETYPE_CFLAGS = -I/usr/X11R6/include/freetype2
-SYS_FREETYPE_LIBS = -lfreetype
+SYS_FREETYPE_CFLAGS = $(shell freetype-config --cflags)
+SYS_FREETYPE_LIBS = $(shell freetype-config --libs)
SYS_OPENJPEG_LIBS = -lopenjpeg
SYS_JBIG2DEC_LIBS = -ljbig2dec
SYS_JPEG_LIBS = -ljpeg
diff --git a/platform/android/build.gradle b/platform/android/build.gradle
deleted file mode 100644
index 7c1a1ed5..00000000
--- a/platform/android/build.gradle
+++ /dev/null
@@ -1,89 +0,0 @@
-import org.apache.tools.ant.taskdefs.condition.Os
-
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
- }
-}
-
-allprojects {
- repositories {
- jcenter()
- }
-}
-
-apply plugin: 'com.android.application'
-
-dependencies {
- compile fileTree(dir: 'libs', include: '*.so')
-}
-
-android {
-
- compileSdkVersion 17
- buildToolsVersion '21.1.2'
-
- /* this stops gradle from making it's own Android.mk file */
- sourceSets.main.jni.srcDirs = []
-
- sourceSets {
- main {
- manifest {
- srcFile 'AndroidManifest.xml'
- }
- java {
- srcDir 'src'
- exclude 'com/artifex/mupdf/fitz/AndroidDrawDevice.java'
- }
- res {
- srcDir 'res'
- }
- assets {
- srcDir 'assets'
- }
- resources {
- srcDir 'src'
- }
- jniLibs {
- srcDir 'libs'
- }
- }
- }
-
- /* This is important, it will run lint checks but won't abort build */
- lintOptions {
- abortOnError false
- }
-
-}
-
-/* This defines the path to Android's ndk-build. */
-def ndkBuildPath = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder().absolutePath + File.separator + 'ndk-build'
-if (Os.isFamily(Os.FAMILY_WINDOWS)) {
- ndkBuildPath +='.cmd'
-}
-
-/* This task builds the native part */
-task buildNative(type: Exec,description: 'Compile JNI source via NDK') {
- println('executing buildNative')
- commandLine ndkBuildPath, '-C', file('.').absolutePath, ' SUPPORT_GPROOF=1'
- //'NDK_PROJECT_PATH=build','APP_BUILD_SCRIPT=src/main/jni/Android.mk'//force using appropriate Makefile
-}
-
-/* This task cleans the native part */
-task cleanNative(type: Exec, description: 'Clean JNI object files') {
- println('executing cleanNative')
- commandLine ndkBuildPath, '-C', file('.').absolutePath, 'clean'
-}
-
-/* cleaning should also include cleaning native */
-clean.dependsOn 'cleanNative'
-
-/* building should include native */
-tasks.withType(JavaCompile){
- compileTask -> compileTask.dependsOn buildNative
-}
-
diff --git a/platform/android/build.sh b/platform/android/build.sh
deleted file mode 100644
index 36ad883f..00000000
--- a/platform/android/build.sh
+++ /dev/null
@@ -1 +0,0 @@
-ndk-build && ant.bat install
diff --git a/platform/android/local.properties.sample b/platform/android/local.properties.sample
deleted file mode 100644
index 557fbc14..00000000
--- a/platform/android/local.properties.sample
+++ /dev/null
@@ -1,8 +0,0 @@
-# Uncomment and edit the appropriate line below.
-# Resave this file as local.properties.
-
-# For MacOS/Linux you want a line such as:
-#sdk.dir=/Library/android-sdk-mac_x86
-
-# For Windows/Cygwin you want something like the following:
-#sdk.dir=C:\\Program Files (x86)\\Android\\android-sdk
diff --git a/platform/android/src/com/artifex/mupdf/fitz/AndroidDrawDevice.java b/platform/android/src/com/artifex/mupdf/fitz/AndroidDrawDevice.java
deleted file mode 100644
index 4a8daaa7..00000000
--- a/platform/android/src/com/artifex/mupdf/fitz/AndroidDrawDevice.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.artifex.mupdf.fitz;
-
-import android.graphics.Bitmap;
-
-public final class AndroidDrawDevice extends NativeDevice
-{
- // NOT static.
- private native long newNative(Bitmap bitmap, int pageX0, int pageY0, int pageX1, int pageY1, int patchX0, int patchY0, int patchX1, int patchY1);
-
- // Construction
- public AndroidDrawDevice(Bitmap bitmap, int pageX0, int pageY0, int pageX1, int pageY1, int patchX0, int patchY0, int patchX1, int patchY1)
- {
- super(0);
- pointer = newNative(bitmap, pageX0, pageY0, pageX1, pageY1, patchX0, patchY0, patchX1, patchY1);
- }
-
- public AndroidDrawDevice(Bitmap bitmap, RectI page, RectI patch)
- {
- super(0);
- pointer = newNative(bitmap, page.x0, page.y0, page.x1, page.y1, patch.x0, patch.y0, patch.x1, patch.y1);
- }
-}
diff --git a/platform/android/viewer/.gitignore b/platform/android/viewer/.gitignore
new file mode 100644
index 00000000..644037fa
--- /dev/null
+++ b/platform/android/viewer/.gitignore
@@ -0,0 +1,8 @@
+.gradle
+/local.properties
+.idea
+.DS_Store
+/build
+/captures
+*.iml
+obj
diff --git a/platform/android/AndroidManifest.xml b/platform/android/viewer/AndroidManifest.xml
index 29c20f84..29c20f84 100644
--- a/platform/android/AndroidManifest.xml
+++ b/platform/android/viewer/AndroidManifest.xml
diff --git a/platform/android/ClassStructure.txt b/platform/android/viewer/ClassStructure.txt
index 39939674..39939674 100644
--- a/platform/android/ClassStructure.txt
+++ b/platform/android/viewer/ClassStructure.txt
diff --git a/platform/android/Icons.txt b/platform/android/viewer/Icons.txt
index 9d0082bf..9d0082bf 100644
--- a/platform/android/Icons.txt
+++ b/platform/android/viewer/Icons.txt
diff --git a/platform/android/Makefile b/platform/android/viewer/Makefile
index 68c8d5b3..9d061919 100644
--- a/platform/android/Makefile
+++ b/platform/android/viewer/Makefile
@@ -1,4 +1,3 @@
default:
- $(MAKE) -C ../java -f Makejar
ndk-build
ant debug
diff --git a/platform/android/ReadMe.txt b/platform/android/viewer/ReadMe.txt
index ab0e4ef9..f1c0c48c 100644
--- a/platform/android/ReadMe.txt
+++ b/platform/android/viewer/ReadMe.txt
@@ -1,4 +1,4 @@
-To build/debug android build.
+To build/debug android viewer.
1) Download the android sdk, and install it. These instructions have been
written with r14 (the latest version at time of writing) of the SDK in mind;
@@ -91,7 +91,7 @@ directory.
See <http://ant.apache.org/>. Ensure that ANT_HOME is set to point to
the top level directory, and that ANT_HOME/bin is on the PATH.
-8) Now we are ready to build mupdf for Android. Check out a copy of MuPDF
+8) Now we are ready to build mupdf viewer for Android. Check out a copy of MuPDF
(but you've done that already, cos you're reading this, right?).
9) You will also need a copy of mupdf's thirdparty libraries. If you are
@@ -112,7 +112,7 @@ compact and usable form.
Unfortunately, the android SDK does not provide a compiler for the host
machine, so we cannot run this step automatically as part of the android
-build. You will need to generate it by running a different build, such
+viewer build. You will need to generate it by running a different build, such
as the windows or linux native builds.
We do not make a snapshot of the generated directory available to
@@ -124,13 +124,13 @@ build.
On windows (where you are using cygwin), or on linux/macos, this can be
as simple as running 'make generate' in the top level directory.
-11) Change into mupdf's android directory. Copy the
-android/local.properties.sample file to be android/local.properties and
+11) Change into mupdf's android/viewer directory. Copy the
+android/viewer/local.properties.sample file to be android/viewer/local.properties and
change the sdk path there as appropriate. This should be the only bit of
localisation you need to do.
-12) Change into the android directory (note, the android directory, NOT
-the android/jni directory!), and execute (in a Cygwin window on Windows!):
+12) Change into the android/viewer directory (note, the android/viewer directory, NOT
+the android/viewer/jni directory!), and execute (in a Cygwin window on Windows!):
ndk-build
diff --git a/platform/android/build.xml b/platform/android/viewer/build.xml
index 1d6e5f10..7cb2cdf8 100644
--- a/platform/android/build.xml
+++ b/platform/android/viewer/build.xml
@@ -39,24 +39,6 @@
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
- <!-- This somewhat bulky and unpleasant piece of code is lifted
- from stackoverflow, and serves to add the
- platform/java/libmupdf.jar file to the produced .apk -->
- <target name="-pre-compile">
-
- <echo>ORIGINAL jars.path : ${toString:project.all.jars.path}</echo>
- <path id="project.all.jars.path.hacked">
- <path path="${toString:project.all.jars.path}"/>
- <path path="../java/libmupdf.jar"/>
- </path>
-
- <path id="project.all.jars.path">
- <path path="${toString:project.all.jars.path.hacked}"/>
- </path>
- <echo>HACKED jars.path : ${toString:project.all.jars.path}</echo>
-
- </target>
-
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
diff --git a/platform/android/jni/Android.mk b/platform/android/viewer/jni/Android.mk
index f9be3dde..1351680f 100644
--- a/platform/android/jni/Android.mk
+++ b/platform/android/viewer/jni/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH := $(call my-dir)
TOP_LOCAL_PATH := $(LOCAL_PATH)
-MUPDF_ROOT := ../..
+MUPDF_ROOT := ../../..
ifdef NDK_PROFILER
include android-ndk-profiler.mk
@@ -20,8 +20,7 @@ LOCAL_C_INCLUDES := \
$(MUPDF_ROOT)/platform/java
LOCAL_CFLAGS := -DHAVE_ANDROID
LOCAL_MODULE := mupdf_java
-LOCAL_SRC_FILES := mupdf.c \
- $(MUPDF_ROOT)/java/mupdf_native.c
+LOCAL_SRC_FILES := mupdf.c
LOCAL_STATIC_LIBRARIES := mupdfcore mupdfthirdparty
ifdef NDK_PROFILER
LOCAL_CFLAGS += -pg -DNDK_PROFILER
diff --git a/platform/android/jni/Application.mk b/platform/android/viewer/jni/Application.mk
index 4cedaf8d..4cedaf8d 100644
--- a/platform/android/jni/Application.mk
+++ b/platform/android/viewer/jni/Application.mk
diff --git a/platform/android/jni/Core.mk b/platform/android/viewer/jni/Core.mk
index 6dcb8f1b..76241841 100644
--- a/platform/android/jni/Core.mk
+++ b/platform/android/viewer/jni/Core.mk
@@ -9,9 +9,9 @@ endif
include $(CLEAR_VARS)
-MY_ROOT := ../..
+MY_ROOT := ../../..
-LOCAL_CFLAGS += -Wall
+LOCAL_CFLAGS += -Wall -Wno-maybe-uninitialized
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -DARCH_ARM -DARCH_THUMB -DARCH_ARM_CAN_LOAD_UNALIGNED
@@ -31,31 +31,31 @@ LOCAL_CFLAGS += -DHAVE_OPENSSL
endif
LOCAL_C_INCLUDES := \
- ../../thirdparty/harfbuzz/src \
- ../../thirdparty/jbig2dec \
- ../../thirdparty/openjpeg/libopenjpeg \
- ../../thirdparty/jpeg \
- ../../thirdparty/mujs \
- ../../thirdparty/zlib \
- ../../thirdparty/freetype/include \
- ../../source/fitz \
- ../../source/pdf \
- ../../source/xps \
- ../../source/cbz \
- ../../source/img \
- ../../source/tiff \
- ../../scripts/freetype \
- ../../scripts/jpeg \
- ../../scripts/openjpeg \
- ../../generated \
- ../../resources \
- ../../include \
- ../..
+ $(MY_ROOT)/thirdparty/harfbuzz/src \
+ $(MY_ROOT)/thirdparty/jbig2dec \
+ $(MY_ROOT)/thirdparty/openjpeg/libopenjpeg \
+ $(MY_ROOT)/thirdparty/jpeg \
+ $(MY_ROOT)/thirdparty/mujs \
+ $(MY_ROOT)/thirdparty/zlib \
+ $(MY_ROOT)/thirdparty/freetype/include \
+ $(MY_ROOT)/source/fitz \
+ $(MY_ROOT)/source/pdf \
+ $(MY_ROOT)/source/xps \
+ $(MY_ROOT)/source/cbz \
+ $(MY_ROOT)/source/img \
+ $(MY_ROOT)/source/tiff \
+ $(MY_ROOT)/scripts/freetype \
+ $(MY_ROOT)/scripts/jpeg \
+ $(MY_ROOT)/scripts/openjpeg \
+ $(MY_ROOT)/generated \
+ $(MY_ROOT)/resources \
+ $(MY_ROOT)/include \
+ $(MY_ROOT)
ifdef V8_BUILD
-LOCAL_C_INCLUDES += ../../thirdparty/$(V8)/include
+LOCAL_C_INCLUDES += $(MY_ROOT)/thirdparty/$(V8)/include
endif
ifdef SSL_BUILD
-LOCAL_C_INCLUDES += ../../thirdparty/openssl/include
+LOCAL_C_INCLUDES += $(MY_ROOT)/thirdparty/openssl/include
endif
LOCAL_MODULE := mupdfcore
@@ -65,7 +65,8 @@ LOCAL_SRC_FILES := \
$(wildcard $(MY_ROOT)/source/xps/*.c) \
$(wildcard $(MY_ROOT)/source/cbz/*.c) \
$(wildcard $(MY_ROOT)/source/gprf/*.c) \
- $(wildcard $(MY_ROOT)/source/html/*.c)
+ $(wildcard $(MY_ROOT)/source/html/*.c) \
+ $(wildcard $(MY_ROOT)/generated/*.c)
LOCAL_SRC_FILES += \
$(MY_ROOT)/source/pdf/js/pdf-js.c \
diff --git a/platform/android/jni/ThirdParty.mk b/platform/android/viewer/jni/ThirdParty.mk
index d7140dfa..f8965ed9 100644
--- a/platform/android/jni/ThirdParty.mk
+++ b/platform/android/viewer/jni/ThirdParty.mk
@@ -2,20 +2,20 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-MY_ROOT := ../..
+MY_ROOT := ../../..
LOCAL_C_INCLUDES := \
- ../../include/ \
- ../../thirdparty/harfbuzz/src \
- ../../thirdparty/jbig2dec \
- ../../thirdparty/openjpeg/libopenjpeg \
- ../../thirdparty/jpeg \
- ../../thirdparty/mujs \
- ../../thirdparty/zlib \
- ../../thirdparty/freetype/include \
- ../../scripts/freetype \
- ../../scripts/jpeg \
- ../../scripts/openjpeg
+ $(MY_ROOT)/include/ \
+ $(MY_ROOT)/thirdparty/harfbuzz/src \
+ $(MY_ROOT)/thirdparty/jbig2dec \
+ $(MY_ROOT)/thirdparty/openjpeg/libopenjpeg \
+ $(MY_ROOT)/thirdparty/jpeg \
+ $(MY_ROOT)/thirdparty/mujs \
+ $(MY_ROOT)/thirdparty/zlib \
+ $(MY_ROOT)/thirdparty/freetype/include \
+ $(MY_ROOT)/scripts/freetype \
+ $(MY_ROOT)/scripts/jpeg \
+ $(MY_ROOT)/scripts/openjpeg
LOCAL_CFLAGS := \
-DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DHAVE_STDINT_H \
diff --git a/platform/android/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c
index bc23b9ca..bc23b9ca 100644
--- a/platform/android/jni/mupdf.c
+++ b/platform/android/viewer/jni/mupdf.c
diff --git a/platform/android/viewer/local.properties.sample b/platform/android/viewer/local.properties.sample
new file mode 100644
index 00000000..bc40e6ef
--- /dev/null
+++ b/platform/android/viewer/local.properties.sample
@@ -0,0 +1,5 @@
+# Uncomment and edit the appropriate line below.
+# Resave this file as local.properties.
+
+sdk.dir=/path/to/android/sdk
+ndk.dir=/path/to/android/ndk
diff --git a/platform/android/project.properties b/platform/android/viewer/project.properties
index 895c9ce2..895c9ce2 100644
--- a/platform/android/project.properties
+++ b/platform/android/viewer/project.properties
diff --git a/platform/android/res/animator/info.xml b/platform/android/viewer/res/animator/info.xml
index 9085a9ee..9085a9ee 100644
--- a/platform/android/res/animator/info.xml
+++ b/platform/android/viewer/res/animator/info.xml
diff --git a/platform/android/res/drawable-hdpi/icon.png b/platform/android/viewer/res/drawable-hdpi/icon.png
index 4f47347d..4f47347d 100644
--- a/platform/android/res/drawable-hdpi/icon.png
+++ b/platform/android/viewer/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_annot.png b/platform/android/viewer/res/drawable-ldpi/ic_annot.png
index c4f1df07..c4f1df07 100644
--- a/platform/android/res/drawable-ldpi/ic_annot.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_annot.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_annotation.png b/platform/android/viewer/res/drawable-ldpi/ic_annotation.png
index 1f4e6d48..1f4e6d48 100644
--- a/platform/android/res/drawable-ldpi/ic_annotation.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_annotation.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_arrow_left.png b/platform/android/viewer/res/drawable-ldpi/ic_arrow_left.png
index d49c7438..d49c7438 100644
--- a/platform/android/res/drawable-ldpi/ic_arrow_left.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_arrow_left.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_arrow_right.png b/platform/android/viewer/res/drawable-ldpi/ic_arrow_right.png
index e76d0cb0..e76d0cb0 100644
--- a/platform/android/res/drawable-ldpi/ic_arrow_right.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_arrow_right.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_cancel.png b/platform/android/viewer/res/drawable-ldpi/ic_cancel.png
index 6912e1ed..6912e1ed 100644
--- a/platform/android/res/drawable-ldpi/ic_cancel.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_cancel.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_check.png b/platform/android/viewer/res/drawable-ldpi/ic_check.png
index fb789c8d..fb789c8d 100644
--- a/platform/android/res/drawable-ldpi/ic_check.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_check.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_clipboard.png b/platform/android/viewer/res/drawable-ldpi/ic_clipboard.png
index 3023c6eb..3023c6eb 100644
--- a/platform/android/res/drawable-ldpi/ic_clipboard.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_clipboard.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_dir.png b/platform/android/viewer/res/drawable-ldpi/ic_dir.png
index 2236f2f8..2236f2f8 100644
--- a/platform/android/res/drawable-ldpi/ic_dir.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_dir.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_doc.png b/platform/android/viewer/res/drawable-ldpi/ic_doc.png
index 407ed5d4..407ed5d4 100644
--- a/platform/android/res/drawable-ldpi/ic_doc.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_doc.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_highlight.png b/platform/android/viewer/res/drawable-ldpi/ic_highlight.png
index 3d6d29b9..3d6d29b9 100644
--- a/platform/android/res/drawable-ldpi/ic_highlight.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_highlight.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_link.png b/platform/android/viewer/res/drawable-ldpi/ic_link.png
index a447b87d..a447b87d 100644
--- a/platform/android/res/drawable-ldpi/ic_link.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_link.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_list.png b/platform/android/viewer/res/drawable-ldpi/ic_list.png
index 4a2dde6d..4a2dde6d 100644
--- a/platform/android/res/drawable-ldpi/ic_list.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_list.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_magnifying_glass.png b/platform/android/viewer/res/drawable-ldpi/ic_magnifying_glass.png
index a3c8f598..a3c8f598 100644
--- a/platform/android/res/drawable-ldpi/ic_magnifying_glass.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_magnifying_glass.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_more.png b/platform/android/viewer/res/drawable-ldpi/ic_more.png
index 68988a56..68988a56 100644
--- a/platform/android/res/drawable-ldpi/ic_more.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_more.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_pen.png b/platform/android/viewer/res/drawable-ldpi/ic_pen.png
index 7b7de296..7b7de296 100644
--- a/platform/android/res/drawable-ldpi/ic_pen.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_pen.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_print.png b/platform/android/viewer/res/drawable-ldpi/ic_print.png
index f191fc85..f191fc85 100644
--- a/platform/android/res/drawable-ldpi/ic_print.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_print.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_proof.png b/platform/android/viewer/res/drawable-ldpi/ic_proof.png
index fee26a7b..fee26a7b 100644
--- a/platform/android/res/drawable-ldpi/ic_proof.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_proof.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_reflow.png b/platform/android/viewer/res/drawable-ldpi/ic_reflow.png
index e9e8b052..e9e8b052 100644
--- a/platform/android/res/drawable-ldpi/ic_reflow.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_reflow.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_select.png b/platform/android/viewer/res/drawable-ldpi/ic_select.png
index 81af6738..81af6738 100644
--- a/platform/android/res/drawable-ldpi/ic_select.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_select.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_share.png b/platform/android/viewer/res/drawable-ldpi/ic_share.png
index 05fbe31a..05fbe31a 100644
--- a/platform/android/res/drawable-ldpi/ic_share.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_share.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_strike.png b/platform/android/viewer/res/drawable-ldpi/ic_strike.png
index fc39409f..fc39409f 100644
--- a/platform/android/res/drawable-ldpi/ic_strike.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_strike.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_trash.png b/platform/android/viewer/res/drawable-ldpi/ic_trash.png
index 465d1245..465d1245 100644
--- a/platform/android/res/drawable-ldpi/ic_trash.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_trash.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_underline.png b/platform/android/viewer/res/drawable-ldpi/ic_underline.png
index 0a5be3d4..0a5be3d4 100644
--- a/platform/android/res/drawable-ldpi/ic_underline.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_underline.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/ic_updir.png b/platform/android/viewer/res/drawable-ldpi/ic_updir.png
index b923e429..b923e429 100644
--- a/platform/android/res/drawable-ldpi/ic_updir.png
+++ b/platform/android/viewer/res/drawable-ldpi/ic_updir.png
Binary files differ
diff --git a/platform/android/res/drawable-ldpi/icon.png b/platform/android/viewer/res/drawable-ldpi/icon.png
index 82655e72..82655e72 100644
--- a/platform/android/res/drawable-ldpi/icon.png
+++ b/platform/android/viewer/res/drawable-ldpi/icon.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_annot.png b/platform/android/viewer/res/drawable-mdpi/ic_annot.png
index 0b4bfd92..0b4bfd92 100644
--- a/platform/android/res/drawable-mdpi/ic_annot.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_annot.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_annotation.png b/platform/android/viewer/res/drawable-mdpi/ic_annotation.png
index 6f81c4a0..6f81c4a0 100644
--- a/platform/android/res/drawable-mdpi/ic_annotation.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_annotation.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_arrow_left.png b/platform/android/viewer/res/drawable-mdpi/ic_arrow_left.png
index 16a31b21..16a31b21 100644
--- a/platform/android/res/drawable-mdpi/ic_arrow_left.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_arrow_left.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_arrow_right.png b/platform/android/viewer/res/drawable-mdpi/ic_arrow_right.png
index cc34067e..cc34067e 100644
--- a/platform/android/res/drawable-mdpi/ic_arrow_right.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_arrow_right.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_arrow_up.png b/platform/android/viewer/res/drawable-mdpi/ic_arrow_up.png
index de2726ce..de2726ce 100644
--- a/platform/android/res/drawable-mdpi/ic_arrow_up.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_arrow_up.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_cancel.png b/platform/android/viewer/res/drawable-mdpi/ic_cancel.png
index 0b794b4d..0b794b4d 100644
--- a/platform/android/res/drawable-mdpi/ic_cancel.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_cancel.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_check.png b/platform/android/viewer/res/drawable-mdpi/ic_check.png
index 527aaeb9..527aaeb9 100644
--- a/platform/android/res/drawable-mdpi/ic_check.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_check.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_clipboard.png b/platform/android/viewer/res/drawable-mdpi/ic_clipboard.png
index c05deffd..c05deffd 100644
--- a/platform/android/res/drawable-mdpi/ic_clipboard.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_clipboard.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_dir.png b/platform/android/viewer/res/drawable-mdpi/ic_dir.png
index e15200c5..e15200c5 100644
--- a/platform/android/res/drawable-mdpi/ic_dir.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_dir.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_doc.png b/platform/android/viewer/res/drawable-mdpi/ic_doc.png
index 1eb722be..1eb722be 100644
--- a/platform/android/res/drawable-mdpi/ic_doc.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_doc.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_highlight.png b/platform/android/viewer/res/drawable-mdpi/ic_highlight.png
index 2a8fe4db..2a8fe4db 100644
--- a/platform/android/res/drawable-mdpi/ic_highlight.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_highlight.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_link.png b/platform/android/viewer/res/drawable-mdpi/ic_link.png
index 7f7ac170..7f7ac170 100644
--- a/platform/android/res/drawable-mdpi/ic_link.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_link.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_list.png b/platform/android/viewer/res/drawable-mdpi/ic_list.png
index e4f3164c..e4f3164c 100644
--- a/platform/android/res/drawable-mdpi/ic_list.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_list.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_magnifying_glass.png b/platform/android/viewer/res/drawable-mdpi/ic_magnifying_glass.png
index 389cebd5..389cebd5 100644
--- a/platform/android/res/drawable-mdpi/ic_magnifying_glass.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_magnifying_glass.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_more.png b/platform/android/viewer/res/drawable-mdpi/ic_more.png
index 2b662ab3..2b662ab3 100644
--- a/platform/android/res/drawable-mdpi/ic_more.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_more.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_pen.png b/platform/android/viewer/res/drawable-mdpi/ic_pen.png
index db805373..db805373 100644
--- a/platform/android/res/drawable-mdpi/ic_pen.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_pen.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_print.png b/platform/android/viewer/res/drawable-mdpi/ic_print.png
index 58105463..58105463 100644
--- a/platform/android/res/drawable-mdpi/ic_print.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_print.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_proof.png b/platform/android/viewer/res/drawable-mdpi/ic_proof.png
index cbda8721..cbda8721 100644
--- a/platform/android/res/drawable-mdpi/ic_proof.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_proof.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_reflow.png b/platform/android/viewer/res/drawable-mdpi/ic_reflow.png
index 84bd5418..84bd5418 100644
--- a/platform/android/res/drawable-mdpi/ic_reflow.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_reflow.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_select.png b/platform/android/viewer/res/drawable-mdpi/ic_select.png
index 9eaf6924..9eaf6924 100644
--- a/platform/android/res/drawable-mdpi/ic_select.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_select.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_sep.png b/platform/android/viewer/res/drawable-mdpi/ic_sep.png
index 2167be2e..2167be2e 100644
--- a/platform/android/res/drawable-mdpi/ic_sep.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_sep.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_share.png b/platform/android/viewer/res/drawable-mdpi/ic_share.png
index cae51b69..cae51b69 100644
--- a/platform/android/res/drawable-mdpi/ic_share.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_share.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_strike.png b/platform/android/viewer/res/drawable-mdpi/ic_strike.png
index b15e9324..b15e9324 100644
--- a/platform/android/res/drawable-mdpi/ic_strike.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_strike.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_trash.png b/platform/android/viewer/res/drawable-mdpi/ic_trash.png
index 3006fec3..3006fec3 100644
--- a/platform/android/res/drawable-mdpi/ic_trash.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_trash.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/ic_underline.png b/platform/android/viewer/res/drawable-mdpi/ic_underline.png
index 5d4dd5a4..5d4dd5a4 100644
--- a/platform/android/res/drawable-mdpi/ic_underline.png
+++ b/platform/android/viewer/res/drawable-mdpi/ic_underline.png
Binary files differ
diff --git a/platform/android/res/drawable-mdpi/icon.png b/platform/android/viewer/res/drawable-mdpi/icon.png
index e05de27c..e05de27c 100644
--- a/platform/android/res/drawable-mdpi/icon.png
+++ b/platform/android/viewer/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/platform/android/res/drawable-xhdpi/icon.png b/platform/android/viewer/res/drawable-xhdpi/icon.png
index 0995b78e..0995b78e 100644
--- a/platform/android/res/drawable-xhdpi/icon.png
+++ b/platform/android/viewer/res/drawable-xhdpi/icon.png
Binary files differ
diff --git a/platform/android/res/drawable/busy.xml b/platform/android/viewer/res/drawable/busy.xml
index f7f42a44..f7f42a44 100644
--- a/platform/android/res/drawable/busy.xml
+++ b/platform/android/viewer/res/drawable/busy.xml
diff --git a/platform/android/res/drawable/button.xml b/platform/android/viewer/res/drawable/button.xml
index 0a9bcd51..0a9bcd51 100644
--- a/platform/android/res/drawable/button.xml
+++ b/platform/android/viewer/res/drawable/button.xml
diff --git a/platform/android/res/drawable/darkdenim3.png b/platform/android/viewer/res/drawable/darkdenim3.png
index be532f6d..be532f6d 100644
--- a/platform/android/res/drawable/darkdenim3.png
+++ b/platform/android/viewer/res/drawable/darkdenim3.png
Binary files differ
diff --git a/platform/android/res/drawable/page_num.xml b/platform/android/viewer/res/drawable/page_num.xml
index 8d50df85..8d50df85 100644
--- a/platform/android/res/drawable/page_num.xml
+++ b/platform/android/viewer/res/drawable/page_num.xml
diff --git a/platform/android/res/drawable/search.xml b/platform/android/viewer/res/drawable/search.xml
index 4fc58830..4fc58830 100644
--- a/platform/android/res/drawable/search.xml
+++ b/platform/android/viewer/res/drawable/search.xml
diff --git a/platform/android/res/drawable/seek_progress.xml b/platform/android/viewer/res/drawable/seek_progress.xml
index 328139c2..328139c2 100644
--- a/platform/android/res/drawable/seek_progress.xml
+++ b/platform/android/viewer/res/drawable/seek_progress.xml
diff --git a/platform/android/res/drawable/seek_thumb.xml b/platform/android/viewer/res/drawable/seek_thumb.xml
index e3a9bad4..e3a9bad4 100644
--- a/platform/android/res/drawable/seek_thumb.xml
+++ b/platform/android/viewer/res/drawable/seek_thumb.xml
diff --git a/platform/android/res/drawable/tiled_background.xml b/platform/android/viewer/res/drawable/tiled_background.xml
index 60e08f3c..60e08f3c 100644
--- a/platform/android/res/drawable/tiled_background.xml
+++ b/platform/android/viewer/res/drawable/tiled_background.xml
diff --git a/platform/android/res/layout/buttons.xml b/platform/android/viewer/res/layout/buttons.xml
index 6c1620ba..6c1620ba 100644
--- a/platform/android/res/layout/buttons.xml
+++ b/platform/android/viewer/res/layout/buttons.xml
diff --git a/platform/android/res/layout/main.xml b/platform/android/viewer/res/layout/main.xml
index 50b4746b..50b4746b 100644
--- a/platform/android/res/layout/main.xml
+++ b/platform/android/viewer/res/layout/main.xml
diff --git a/platform/android/res/layout/outline_entry.xml b/platform/android/viewer/res/layout/outline_entry.xml
index ea7912e4..ea7912e4 100644
--- a/platform/android/res/layout/outline_entry.xml
+++ b/platform/android/viewer/res/layout/outline_entry.xml
diff --git a/platform/android/res/layout/picker_entry.xml b/platform/android/viewer/res/layout/picker_entry.xml
index 673a4724..673a4724 100644
--- a/platform/android/res/layout/picker_entry.xml
+++ b/platform/android/viewer/res/layout/picker_entry.xml
diff --git a/platform/android/res/layout/print_dialog.xml b/platform/android/viewer/res/layout/print_dialog.xml
index 1d54d22f..1d54d22f 100644
--- a/platform/android/res/layout/print_dialog.xml
+++ b/platform/android/viewer/res/layout/print_dialog.xml
diff --git a/platform/android/res/layout/textentry.xml b/platform/android/viewer/res/layout/textentry.xml
index 08823df8..08823df8 100644
--- a/platform/android/res/layout/textentry.xml
+++ b/platform/android/viewer/res/layout/textentry.xml
diff --git a/platform/android/res/values-ar/strings.xml b/platform/android/viewer/res/values-ar/strings.xml
index f16d5ba9..f16d5ba9 100644
--- a/platform/android/res/values-ar/strings.xml
+++ b/platform/android/viewer/res/values-ar/strings.xml
diff --git a/platform/android/res/values-ca/strings.xml b/platform/android/viewer/res/values-ca/strings.xml
index ef72886e..ef72886e 100644
--- a/platform/android/res/values-ca/strings.xml
+++ b/platform/android/viewer/res/values-ca/strings.xml
diff --git a/platform/android/res/values-cs/strings.xml b/platform/android/viewer/res/values-cs/strings.xml
index 6c870391..6c870391 100644
--- a/platform/android/res/values-cs/strings.xml
+++ b/platform/android/viewer/res/values-cs/strings.xml
diff --git a/platform/android/res/values-da/strings.xml b/platform/android/viewer/res/values-da/strings.xml
index b7de1fdc..b7de1fdc 100644
--- a/platform/android/res/values-da/strings.xml
+++ b/platform/android/viewer/res/values-da/strings.xml
diff --git a/platform/android/res/values-de/strings.xml b/platform/android/viewer/res/values-de/strings.xml
index 2e69d369..2e69d369 100644
--- a/platform/android/res/values-de/strings.xml
+++ b/platform/android/viewer/res/values-de/strings.xml
diff --git a/platform/android/res/values-el/strings.xml b/platform/android/viewer/res/values-el/strings.xml
index f994f287..f994f287 100644
--- a/platform/android/res/values-el/strings.xml
+++ b/platform/android/viewer/res/values-el/strings.xml
diff --git a/platform/android/res/values-es/strings.xml b/platform/android/viewer/res/values-es/strings.xml
index 0e28a909..0e28a909 100644
--- a/platform/android/res/values-es/strings.xml
+++ b/platform/android/viewer/res/values-es/strings.xml
diff --git a/platform/android/res/values-et/strings.xml b/platform/android/viewer/res/values-et/strings.xml
index fddd25a8..fddd25a8 100644
--- a/platform/android/res/values-et/strings.xml
+++ b/platform/android/viewer/res/values-et/strings.xml
diff --git a/platform/android/res/values-fi/strings.xml b/platform/android/viewer/res/values-fi/strings.xml
index ae13e724..ae13e724 100644
--- a/platform/android/res/values-fi/strings.xml
+++ b/platform/android/viewer/res/values-fi/strings.xml
diff --git a/platform/android/res/values-fr/strings.xml b/platform/android/viewer/res/values-fr/strings.xml
index 967707b9..967707b9 100644
--- a/platform/android/res/values-fr/strings.xml
+++ b/platform/android/viewer/res/values-fr/strings.xml
diff --git a/platform/android/res/values-hi/strings.xml b/platform/android/viewer/res/values-hi/strings.xml
index 4d09a972..4d09a972 100644
--- a/platform/android/res/values-hi/strings.xml
+++ b/platform/android/viewer/res/values-hi/strings.xml
diff --git a/platform/android/res/values-hu/strings.xml b/platform/android/viewer/res/values-hu/strings.xml
index 1533b65a..1533b65a 100644
--- a/platform/android/res/values-hu/strings.xml
+++ b/platform/android/viewer/res/values-hu/strings.xml
diff --git a/platform/android/res/values-in/strings.xml b/platform/android/viewer/res/values-in/strings.xml
index f90d1b3b..f90d1b3b 100644
--- a/platform/android/res/values-in/strings.xml
+++ b/platform/android/viewer/res/values-in/strings.xml
diff --git a/platform/android/res/values-it/strings.xml b/platform/android/viewer/res/values-it/strings.xml
index 25cf56dd..25cf56dd 100644
--- a/platform/android/res/values-it/strings.xml
+++ b/platform/android/viewer/res/values-it/strings.xml
diff --git a/platform/android/res/values-iw/strings.xml b/platform/android/viewer/res/values-iw/strings.xml
index d259ae76..d259ae76 100644
--- a/platform/android/res/values-iw/strings.xml
+++ b/platform/android/viewer/res/values-iw/strings.xml
diff --git a/platform/android/res/values-ja/strings.xml b/platform/android/viewer/res/values-ja/strings.xml
index 8ceb5e09..8ceb5e09 100644
--- a/platform/android/res/values-ja/strings.xml
+++ b/platform/android/viewer/res/values-ja/strings.xml
diff --git a/platform/android/res/values-ko/strings.xml b/platform/android/viewer/res/values-ko/strings.xml
index b52a2f5a..b52a2f5a 100644
--- a/platform/android/res/values-ko/strings.xml
+++ b/platform/android/viewer/res/values-ko/strings.xml
diff --git a/platform/android/res/values-lt/strings.xml b/platform/android/viewer/res/values-lt/strings.xml
index f66ba305..f66ba305 100644
--- a/platform/android/res/values-lt/strings.xml
+++ b/platform/android/viewer/res/values-lt/strings.xml
diff --git a/platform/android/res/values-ms/strings.xml b/platform/android/viewer/res/values-ms/strings.xml
index 64541e6f..64541e6f 100644
--- a/platform/android/res/values-ms/strings.xml
+++ b/platform/android/viewer/res/values-ms/strings.xml
diff --git a/platform/android/res/values-nl/strings.xml b/platform/android/viewer/res/values-nl/strings.xml
index 21945c86..21945c86 100644
--- a/platform/android/res/values-nl/strings.xml
+++ b/platform/android/viewer/res/values-nl/strings.xml
diff --git a/platform/android/res/values-no/strings.xml b/platform/android/viewer/res/values-no/strings.xml
index 31bd6bf0..31bd6bf0 100644
--- a/platform/android/res/values-no/strings.xml
+++ b/platform/android/viewer/res/values-no/strings.xml
diff --git a/platform/android/res/values-pl/strings.xml b/platform/android/viewer/res/values-pl/strings.xml
index 42511e42..42511e42 100644
--- a/platform/android/res/values-pl/strings.xml
+++ b/platform/android/viewer/res/values-pl/strings.xml
diff --git a/platform/android/res/values-pt/strings.xml b/platform/android/viewer/res/values-pt/strings.xml
index 15f86283..15f86283 100644
--- a/platform/android/res/values-pt/strings.xml
+++ b/platform/android/viewer/res/values-pt/strings.xml
diff --git a/platform/android/res/values-ru/strings.xml b/platform/android/viewer/res/values-ru/strings.xml
index 7cc35187..7cc35187 100644
--- a/platform/android/res/values-ru/strings.xml
+++ b/platform/android/viewer/res/values-ru/strings.xml
diff --git a/platform/android/res/values-sk/strings.xml b/platform/android/viewer/res/values-sk/strings.xml
index e11737ef..e11737ef 100644
--- a/platform/android/res/values-sk/strings.xml
+++ b/platform/android/viewer/res/values-sk/strings.xml
diff --git a/platform/android/res/values-sv/strings.xml b/platform/android/viewer/res/values-sv/strings.xml
index 61d14d05..61d14d05 100644
--- a/platform/android/res/values-sv/strings.xml
+++ b/platform/android/viewer/res/values-sv/strings.xml
diff --git a/platform/android/res/values-th/strings.xml b/platform/android/viewer/res/values-th/strings.xml
index e6827125..e6827125 100644
--- a/platform/android/res/values-th/strings.xml
+++ b/platform/android/viewer/res/values-th/strings.xml
diff --git a/platform/android/res/values-tl/strings.xml b/platform/android/viewer/res/values-tl/strings.xml
index 39611fcb..39611fcb 100644
--- a/platform/android/res/values-tl/strings.xml
+++ b/platform/android/viewer/res/values-tl/strings.xml
diff --git a/platform/android/res/values-tr/strings.xml b/platform/android/viewer/res/values-tr/strings.xml
index c64ab7ce..c64ab7ce 100644
--- a/platform/android/res/values-tr/strings.xml
+++ b/platform/android/viewer/res/values-tr/strings.xml
diff --git a/platform/android/res/values-zh-rTW/strings.xml b/platform/android/viewer/res/values-zh-rTW/strings.xml
index 4cd89709..4cd89709 100644
--- a/platform/android/res/values-zh-rTW/strings.xml
+++ b/platform/android/viewer/res/values-zh-rTW/strings.xml
diff --git a/platform/android/res/values-zh/strings.xml b/platform/android/viewer/res/values-zh/strings.xml
index 60fcbb82..60fcbb82 100644
--- a/platform/android/res/values-zh/strings.xml
+++ b/platform/android/viewer/res/values-zh/strings.xml
diff --git a/platform/android/res/values/colors.xml b/platform/android/viewer/res/values/colors.xml
index ecd1519d..ecd1519d 100644
--- a/platform/android/res/values/colors.xml
+++ b/platform/android/viewer/res/values/colors.xml
diff --git a/platform/android/res/values/strings.xml b/platform/android/viewer/res/values/strings.xml
index 269b47ee..269b47ee 100644
--- a/platform/android/res/values/strings.xml
+++ b/platform/android/viewer/res/values/strings.xml
diff --git a/platform/android/res/values/styles.xml b/platform/android/viewer/res/values/styles.xml
index ade851dd..ade851dd 100644
--- a/platform/android/res/values/styles.xml
+++ b/platform/android/viewer/res/values/styles.xml
diff --git a/platform/android/src/com/artifex/mupdfdemo/Annotation.java b/platform/android/viewer/src/com/artifex/mupdfdemo/Annotation.java
index cf915524..cf915524 100644
--- a/platform/android/src/com/artifex/mupdfdemo/Annotation.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/Annotation.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/ArrayDeque.java b/platform/android/viewer/src/com/artifex/mupdfdemo/ArrayDeque.java
index 4f06ea41..4f06ea41 100644
--- a/platform/android/src/com/artifex/mupdfdemo/ArrayDeque.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/ArrayDeque.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/AsyncTask.java b/platform/android/viewer/src/com/artifex/mupdfdemo/AsyncTask.java
index b370794c..b370794c 100644
--- a/platform/android/src/com/artifex/mupdfdemo/AsyncTask.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/AsyncTask.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/CancellableAsyncTask.java b/platform/android/viewer/src/com/artifex/mupdfdemo/CancellableAsyncTask.java
index fcb1b744..fcb1b744 100644
--- a/platform/android/src/com/artifex/mupdfdemo/CancellableAsyncTask.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/CancellableAsyncTask.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/CancellableTaskDefinition.java b/platform/android/viewer/src/com/artifex/mupdfdemo/CancellableTaskDefinition.java
index 62b04f30..62b04f30 100644
--- a/platform/android/src/com/artifex/mupdfdemo/CancellableTaskDefinition.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/CancellableTaskDefinition.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java
index f6068bac..f6068bac 100644
--- a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFActivity.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java
index 0b3c6418..0b3c6418 100644
--- a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFItem.java b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFItem.java
index de6e1d52..de6e1d52 100644
--- a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFItem.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/ChoosePDFItem.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/Deque.java b/platform/android/viewer/src/com/artifex/mupdfdemo/Deque.java
index 4bb176b2..4bb176b2 100644
--- a/platform/android/src/com/artifex/mupdfdemo/Deque.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/Deque.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/FilePicker.java b/platform/android/viewer/src/com/artifex/mupdfdemo/FilePicker.java
index d1953531..d1953531 100644
--- a/platform/android/src/com/artifex/mupdfdemo/FilePicker.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/FilePicker.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/LinkInfo.java b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfo.java
index 5aeaccbe..5aeaccbe 100644
--- a/platform/android/src/com/artifex/mupdfdemo/LinkInfo.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfo.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/LinkInfoExternal.java b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoExternal.java
index 574b6264..574b6264 100644
--- a/platform/android/src/com/artifex/mupdfdemo/LinkInfoExternal.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoExternal.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/LinkInfoInternal.java b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoInternal.java
index 761bf87a..761bf87a 100644
--- a/platform/android/src/com/artifex/mupdfdemo/LinkInfoInternal.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoInternal.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/LinkInfoRemote.java b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoRemote.java
index 731e6408..731e6408 100644
--- a/platform/android/src/com/artifex/mupdfdemo/LinkInfoRemote.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoRemote.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/LinkInfoVisitor.java b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoVisitor.java
index ecd093e4..ecd093e4 100644
--- a/platform/android/src/com/artifex/mupdfdemo/LinkInfoVisitor.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/LinkInfoVisitor.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFActivity.java
index 91b1e8fe..91b1e8fe 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFActivity.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFAlert.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFAlert.java
index 76ed3a65..76ed3a65 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFAlert.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFAlert.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFAlertInternal.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFAlertInternal.java
index 5d65768f..5d65768f 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFAlertInternal.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFAlertInternal.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFCancellableTaskDefinition.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFCancellableTaskDefinition.java
index b95d8e93..b95d8e93 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFCancellableTaskDefinition.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFCancellableTaskDefinition.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFCore.java
index 80174416..80174416 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFCore.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFCore.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFPageAdapter.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFPageAdapter.java
index abdac845..abdac845 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFPageAdapter.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFPageAdapter.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFPageView.java
index ff6b6bbb..ff6b6bbb 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFPageView.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReaderView.java
index f2d7f8fe..f2d7f8fe 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReaderView.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java
index 48625a7e..48625a7e 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReflowAdapter.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFReflowView.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReflowView.java
index 7d41a9b9..7d41a9b9 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFReflowView.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFReflowView.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFView.java b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFView.java
index ec3d3d9a..ec3d3d9a 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFView.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/MuPDFView.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/OutlineActivity.java b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineActivity.java
index 52b0d410..52b0d410 100644
--- a/platform/android/src/com/artifex/mupdfdemo/OutlineActivity.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineActivity.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/OutlineActivityData.java b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineActivityData.java
index a703e61e..a703e61e 100644
--- a/platform/android/src/com/artifex/mupdfdemo/OutlineActivityData.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineActivityData.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/OutlineAdapter.java b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineAdapter.java
index 4251ed8e..4251ed8e 100644
--- a/platform/android/src/com/artifex/mupdfdemo/OutlineAdapter.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineAdapter.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/OutlineItem.java b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineItem.java
index 7730991e..7730991e 100644
--- a/platform/android/src/com/artifex/mupdfdemo/OutlineItem.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/OutlineItem.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/PageView.java b/platform/android/viewer/src/com/artifex/mupdfdemo/PageView.java
index 2ee407cb..2ee407cb 100644
--- a/platform/android/src/com/artifex/mupdfdemo/PageView.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/PageView.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java b/platform/android/viewer/src/com/artifex/mupdfdemo/PrintDialogActivity.java
index d96322d5..d96322d5 100644
--- a/platform/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/PrintDialogActivity.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/ReaderView.java b/platform/android/viewer/src/com/artifex/mupdfdemo/ReaderView.java
index 65d8f665..65d8f665 100644
--- a/platform/android/src/com/artifex/mupdfdemo/ReaderView.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/ReaderView.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/SafeAnimatorInflater.java b/platform/android/viewer/src/com/artifex/mupdfdemo/SafeAnimatorInflater.java
index 7f715bb4..7f715bb4 100644
--- a/platform/android/src/com/artifex/mupdfdemo/SafeAnimatorInflater.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/SafeAnimatorInflater.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/SearchTask.java b/platform/android/viewer/src/com/artifex/mupdfdemo/SearchTask.java
index d3969f10..d3969f10 100644
--- a/platform/android/src/com/artifex/mupdfdemo/SearchTask.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/SearchTask.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/SearchTaskResult.java b/platform/android/viewer/src/com/artifex/mupdfdemo/SearchTaskResult.java
index 8fa3c3a2..8fa3c3a2 100644
--- a/platform/android/src/com/artifex/mupdfdemo/SearchTaskResult.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/SearchTaskResult.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/Separation.java b/platform/android/viewer/src/com/artifex/mupdfdemo/Separation.java
index eadda4ba..eadda4ba 100644
--- a/platform/android/src/com/artifex/mupdfdemo/Separation.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/Separation.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/Stepper.java b/platform/android/viewer/src/com/artifex/mupdfdemo/Stepper.java
index d22240ef..d22240ef 100644
--- a/platform/android/src/com/artifex/mupdfdemo/Stepper.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/Stepper.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/TextChar.java b/platform/android/viewer/src/com/artifex/mupdfdemo/TextChar.java
index aebf519f..aebf519f 100644
--- a/platform/android/src/com/artifex/mupdfdemo/TextChar.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/TextChar.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/TextWord.java b/platform/android/viewer/src/com/artifex/mupdfdemo/TextWord.java
index d9672573..d9672573 100644
--- a/platform/android/src/com/artifex/mupdfdemo/TextWord.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/TextWord.java
diff --git a/platform/android/src/com/artifex/mupdfdemo/WidgetType.java b/platform/android/viewer/src/com/artifex/mupdfdemo/WidgetType.java
index 882a38f2..882a38f2 100644
--- a/platform/android/src/com/artifex/mupdfdemo/WidgetType.java
+++ b/platform/android/viewer/src/com/artifex/mupdfdemo/WidgetType.java
diff --git a/platform/java/Makefile b/platform/java/Makefile
index 3e7df255..fc889c1a 100644
--- a/platform/java/Makefile
+++ b/platform/java/Makefile
@@ -1,22 +1,44 @@
-default: libmupdf_java.so libmupdf.jar
+OS ?= $(shell uname)
-MUPDF_CORE = ../../build/java/libmupdf.a ../../build/java/libmupdfthird.a
+ifeq "$(OS)" "Darwin"
+MUPDF_JAVA := libmupdf_java.jnilib
+JAVA_CFLAGS := \
+ -I /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include \
+ -I /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/darwin
+else
+MUPDF_JAVA := libmupdf_java.so
+JAVA_CFLAGS := \
+ -I /usr/lib/jvm/java-7-openjdk-i386/include \
+ -I /usr/lib/jvm/java-7-openjdk-i386/include/linux \
+ -I /usr/lib/jvm/java-7-openjdk-amd64/include \
+ -I /usr/lib/jvm/java-7-openjdk-amd64/include/linux
+JAVA_LIBS := \
+ $(shell pkg-config --cflags freetype2) -lz
+endif
+
+default: $(MUPDF_JAVA) libmupdf.jar
+
+MUPDF_CORE := ../../build/java/libmupdf.a ../../build/java/libmupdfthird.a
+ifeq "$(OS)" "Linux"
+$(MUPDF_CORE) :
+ $(MAKE) -C ../.. OUT=build/java XCFLAGS=-fPIC FREETYPE_DIR=/foo ZLIB_DIR=/foo build=release libs
+else
+$(MUPDF_CORE) :
+ $(MAKE) -C ../.. OUT=build/java XCFLAGS=-fPIC build=release libs
+endif
LIBRARY_JAVA_SOURCES := $(sort $(wildcard com/artifex/mupdf/fitz/*.java))
LIBRARY_JAVA_OBJECTS := $(LIBRARY_JAVA_SOURCES:%.java=%.class)
LIBRARY_JAVA_CLASSES := $(subst com/artifex/mupdf/fitz/,com.artifex.mupdf.fitz.,$(LIBRARY_JAVA_SOURCES:%.java=%))
-VIEWER_JAVA_SOURCES := $(sort $(wildcard *.java))
-VIEWER_JAVA_OBJECTS := $(VIEWER_JAVA_SOURCES:%.java=%.class)
+$(LIBRARY_JAVA_OBJECTS) : $(LIBRARY_JAVA_SOURCES)
+ javac -source 1.7 -target 1.7 $^
-$(MUPDF_CORE) :
- $(MAKE) -C ../.. OUT=build/java XCFLAGS=-fPIC \
- FREETYPE_DIR=/use/system/library \
- ZLIB_DIR=/use/system/library \
- build=release libs
+EXAMPLE_JAVA_SOURCES := $(sort $(wildcard example/*.java))
+EXAMPLE_JAVA_OBJECTS := $(EXAMPLE_JAVA_SOURCES:%.java=%.class)
-$(LIBRARY_JAVA_OBJECTS) : $(LIBRARY_JAVA_SOURCES)
- javac $^
+$(EXAMPLE_JAVA_OBJECTS) : $(EXAMPLE_JAVA_SOURCES)
+ javac -source 1.7 -target 1.7 $^
libmupdf.jar : $(LIBRARY_JAVA_OBJECTS)
rm -f $@
@@ -27,30 +49,22 @@ mupdf_native.h : $(LIBRARY_JAVA_OBJECTS)
javah -o $@ $(LIBRARY_JAVA_CLASSES)
mupdf_native.o : mupdf_native.c mupdf_native.h
- $(CC) -g -fPIC -Wall -Wextra -Wno-unused-parameter \
- -I /usr/lib/jvm/java-7-openjdk-i386/include \
- -I /usr/lib/jvm/java-7-openjdk-i386/include/linux \
- -I /usr/lib/jvm/java-7-openjdk-amd64/include \
- -I /usr/lib/jvm/java-7-openjdk-amd64/include/linux \
- -I ../../include \
- -o $@ -c $<
-
-libmupdf_java.so : mupdf_native.o $(MUPDF_CORE)
- $(CC) -shared -o $@ $^ -lfreetype -lz
+ $(CC) -g -o $@ -c $< -fPIC -Wall -Wextra -Wno-unused-parameter -I ../../include \
+ $(JAVA_CFLAGS)
-$(VIEWER_JAVA_OBJECTS) : $(VIEWER_JAVA_SOURCES)
- javac $^
+$(MUPDF_JAVA) : mupdf_native.o $(MUPDF_CORE)
+ $(CC) -shared -o $(MUPDF_JAVA) $^ $(JAVA_LIBS)
-viewer: libmupdf_java.so $(LIBRARY_JAVA_OBJECTS) $(VIEWER_JAVA_OBJECTS)
- LD_LIBRARY_PATH=. java Viewer
+viewer: $(MUPDF_JAVA) $(EXAMPLE_JAVA_OBJECTS)
+ LD_LIBRARY_PATH=. java example.Viewer
clean:
rm -f com/artifex/mupdf/fitz/*.class
- rm -f *.class
+ rm -f example/*.class
rm -f mupdf_native.o
- rm -f libmupdf_java.so
+ rm -f $(MUPDF_JAVA)
nuke: clean
- $(MAKE) -C ../.. build=release OUT=build/java clean
+ $(MAKE) -C ../.. OUT=build/java clean
.NOTPARALLEL : # disable -j option (it breaks since javac compiles all class files in one command)
diff --git a/platform/java/Makejar b/platform/java/Makejar
index 7ab3e40f..3f98127a 100644
--- a/platform/java/Makejar
+++ b/platform/java/Makejar
@@ -1,3 +1,3 @@
default:
- javac com/artifex/mupdf/fitz/*.java
+ javac -source 1.7 -target 1.7 com/artifex/mupdf/fitz/*.java
jar cf libmupdf.jar com/artifex/mupdf/fitz/*.class
diff --git a/platform/java/PageCanvas.java b/platform/java/example/PageCanvas.java
index bf20afa8..9de1abdb 100644
--- a/platform/java/PageCanvas.java
+++ b/platform/java/example/PageCanvas.java
@@ -1,3 +1,5 @@
+package example;
+
import com.artifex.mupdf.fitz.*;
import java.awt.*;
import java.awt.image.*;
diff --git a/platform/java/TraceDevice.java b/platform/java/example/TraceDevice.java
index 36ed6cd3..49c97532 100644
--- a/platform/java/TraceDevice.java
+++ b/platform/java/example/TraceDevice.java
@@ -1,3 +1,5 @@
+package example;
+
import com.artifex.mupdf.fitz.*;
public class TraceDevice extends Device implements PathWalker, TextWalker
diff --git a/platform/java/Viewer.java b/platform/java/example/Viewer.java
index a118e3d4..91b0fa1d 100644
--- a/platform/java/Viewer.java
+++ b/platform/java/example/Viewer.java
@@ -1,5 +1,9 @@
+package example;
+
import com.artifex.mupdf.fitz.*;
+import java.io.File;
+
import java.awt.Frame;
import java.awt.Label;
import java.awt.Button;
@@ -11,6 +15,10 @@ import java.awt.event.WindowListener;
import java.awt.event.WindowEvent;
import java.awt.event.ActionEvent;
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileFilter;
+import javax.swing.JOptionPane;
+
public class Viewer extends Frame implements WindowListener, ActionListener
{
protected Document doc;
@@ -100,9 +108,96 @@ public class Viewer extends Frame implements WindowListener, ActionListener
public void windowOpened(WindowEvent event) { }
public void windowClosed(WindowEvent event) { }
- public static void main(String[] args) {
- Document doc = new Document("pdfref17.pdf");
- Viewer app = new Viewer(doc);
- app.setVisible(true);
+ public static void main(String[] args)
+ {
+ JFileChooser fileChooser = new JFileChooser();
+ fileChooser.setDialogTitle("Choose a file to open");
+ fileChooser.setFileFilter(new FileFilter()
+ {
+ public String getDescription()
+ {
+ return "Supported files (*.pdf, *,xps, *.jpg, *.jpeg, *.png, *.epub, *.cbz, *.cbr)";
+ }
+
+ public boolean accept(File f)
+ {
+ if (f.isDirectory())
+ return true;
+
+ String filename = f.getName().toLowerCase();
+ if (filename.endsWith(".pdf"))
+ return true;
+ if (filename.endsWith(".xps"))
+ return true;
+ if (filename.endsWith(".jpg"))
+ return true;
+ if (filename.endsWith(".jpeg"))
+ return true;
+ if (filename.endsWith(".png"))
+ return true;
+ if (filename.endsWith(".epub"))
+ return true;
+ if (filename.endsWith(".cbz"))
+ return true;
+ if (filename.endsWith(".cbr"))
+ return true;
+
+ return false;
+ }
+ });
+
+ while (true)
+ {
+ try
+ {
+ // get a file to open
+ int result = fileChooser.showOpenDialog(null);
+ if (result == JFileChooser.APPROVE_OPTION)
+ {
+ // user selects a file
+ File selectedFile = fileChooser.getSelectedFile();
+ if (selectedFile != null)
+ {
+ Document doc = new Document(selectedFile.getAbsolutePath());
+ if (doc != null)
+ {
+ Viewer app = new Viewer(doc);
+ if (app != null)
+ {
+ app.setVisible(true);
+ return;
+ }
+ else
+ {
+ infoBox("Cannot create Viewer for "+selectedFile.getAbsolutePath(),"Error");
+ }
+ }
+ else
+ {
+ infoBox("Cannot open "+selectedFile.getAbsolutePath(),"Error");
+ }
+ }
+ else
+ {
+ infoBox("Selected file not found.","Error");
+ }
+ }
+ else
+ {
+ infoBox("File selection cancelled.","Error");
+ return;
+ }
+
+ }
+ catch (Exception e)
+ {
+ infoBox("Exception: "+e.getMessage(),"Error");
+ }
+ }
+ }
+
+ private static void infoBox(String infoMessage, String titleBar)
+ {
+ JOptionPane.showMessageDialog(null, infoMessage, "InfoBox: " + titleBar, JOptionPane.INFORMATION_MESSAGE);
}
}
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c
index 38bd077b..55cb428f 100644
--- a/platform/java/mupdf_native.c
+++ b/platform/java/mupdf_native.c
@@ -2191,8 +2191,8 @@ FUN(Font_newNative)(JNIEnv *env, jobject self, jstring jname, jint index)
fz_try(ctx)
{
- unsigned char *data;
- unsigned int size;
+ const char *data;
+ int size;
data = fz_lookup_base14_font(ctx, name, &size);
if (data)
font = fz_new_font_from_memory(ctx, name, data, size, index, 0);