Difference: GhostProof (11 vs. 12)

Revision 122016-03-03 - FredRossPerry

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

GhostProof

Line: 29 to 29
  Check out: android_mupdf_gs_so branch on robin's ghostscript repo
Changed:
<
<
Change directory into gs.
>
>
Change directory into gs.
 
Changed:
<
<
Copy Makefile.android as Makefile (important, as the so targets recursively invoke Makefile).
>
>
Copy Makefile.android as Makefile (important, as the so targets recursively invoke Makefile).
 
Changed:
<
<
Edit the paths in Makefile as appropriate for your ndk installation.
>
>
Edit the paths in Makefile as appropriate for your ndk installation.
 
Changed:
<
<
And then: make so (or make sodebug)
>
>
And then: make so= (or =make sodebug)
 
Changed:
<
<
This should produce a sobin/libgs.so (or sodebugbin/libgs.so).
>
>
This should produce a sobin/libgs.so (or sodebugbin/libgs.so).
 

Building MuPDF

Checkout MuPDF from robin's repo (master branch).

Changed:
<
<
Copy libgs.so from the previous stage to platform/android/jni/libgs.so
>
>
Copy libgs.so from the previous stage to platform/android/jni/libgs.so
 
Changed:
<
<
Do the usual android build, but add SUPPORT_GPROOF=1 to the end of the ndk-build line.
>
>
Do the usual android build, but add SUPPORT_GPROOF=1

to the end of the ndk-build line.

  That's it!
Added:
>
>

Using Android Studio

The Android project contains a Gradle build file that can be used with Android Studio. Note that this is simply a wrapper around the existing NDK makefiles, and they are still required.

First, get the source code and update the subprojects as you normally would.

Then, build the muPDF library with gproof support, like this:
make HAVE_X11=no XCFLAGS="-DSUPPORT_GPROOF"

The first time, launch Android Studio and import the platform/android folder. You'll be asked if you want to set up the gradle wrappers, choose OK to do this. Once this is done, Android Studio will remember this and all you need to do is open it next time.

You may see an error saying that your gradle version is too old. There is a link in the error window you can click to fix this automatically. It's just editing gradle-wrapper.properties with a link to the correct version.

Now, get or build a version of libgs.so that also has gproof support. See http://twiki.ghostscript.com/do/view/MuPDF/GhostProof for details. Copy this file into the JNI folder.

Edit local.properties and specify which version of the NDK to use. Newer versions will work, but version r8e will result in an app that works with our minimum platform.

Now build and run using Android Studio. You should be able to debug the Java code.

You can also do command-line builds using the gradle wrappers (gradlew and gradlew.bat), which are simply scripts that are used by Android Studio when it builds.

 

Using the App

Line: 181 to 203
 

Comments

Deleted:
<
<
<--/commentPlugin-->
 \ No newline at end of file
Added:
>
>

<--/commentPlugin-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 2014 Artifex Software Inc