summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorEthan Vrhel <ethanvrhel@gmail.com>2021-08-14 14:40:47 -0700
committerEthan Vrhel <ethanvrhel@gmail.com>2021-08-17 15:07:43 -0700
commitf5161bb1d84a62bd5e49debec5629caa9cebe4fd (patch)
tree1eb632beb7fb3589964bdcb4ef1414dff1d9d281 /demos
parentcd76df4b13e93d409f3e7718f16b39ded7ab7d90 (diff)
downloadghostpdl-f5161bb1d84a62bd5e49debec5629caa9cebe4fd.tar.gz
Updated READMEs
Diffstat (limited to 'demos')
-rw-r--r--demos/java/README.txt2
-rw-r--r--demos/java/gsjava/README.txt13
-rw-r--r--demos/java/gsviewer/README.txt26
-rw-r--r--demos/java/jni/gs_jni/README.txt19
4 files changed, 44 insertions, 16 deletions
diff --git a/demos/java/README.txt b/demos/java/README.txt
index da1b9ea75..4781bb099 100644
--- a/demos/java/README.txt
+++ b/demos/java/README.txt
@@ -5,4 +5,4 @@ inside the installation folder is added to the PATH environment
variable. This exposes command line programs to build Java
applications.
-On Linux, OpenJDK 8 is used.
+On Linux and Mac, OpenJDK 8 is used.
diff --git a/demos/java/gsjava/README.txt b/demos/java/gsjava/README.txt
index 285e6bb9d..d41d68284 100644
--- a/demos/java/gsjava/README.txt
+++ b/demos/java/gsjava/README.txt
@@ -65,11 +65,12 @@ public static void main(String[] args) {
GSAPI.gsapi_delete_instance(instance);
}
-To build the library, build.sh can be used on Linux, build_darwin.sh can
-be used on Mac OS X, and build.bat on Windows.
+To build the library, build_linux.sh can be used on Linux,
+build_darwin.sh can be used on Mac, and build_win32.bat on Windows.
-All of these scripts do not compile Ghostscript. However, build.sh will
-compile the C++ library unlike build.bat.
+All of these scripts do not compile Ghostscript. However,
+build_linux.sh and build_darwin.sh will compile the C++
+library unlike build_win32.bat.
Viewer:
@@ -84,11 +85,11 @@ a PDF document to be opened.
When the document is first loaded, every page is rendered at
a low resolution. These will be displayed as thumbnails on the
-left side. All loadingg is done in the com.artifex.gsjava.Document
+left side. All loading is done in the com.artifex.gsjava.Document
class. As the user changes the position of the viewport, the
viewer will dynamically load high resolution images based on
what page the user is viewing. This is done in the
com.artifex.gsviewer.ViewerController.SmartLoader class. This
also handles rendering zoomed images if necessary. Only pages
which need to be loaded at a high resolution are loaded, and
-zoomed pages are unloaded when no longer necessary to save memory.
+zoomed pages are unloaded when no longer necessary to save memory. \ No newline at end of file
diff --git a/demos/java/gsviewer/README.txt b/demos/java/gsviewer/README.txt
index 5f021f9c8..c3663cf97 100644
--- a/demos/java/gsviewer/README.txt
+++ b/demos/java/gsviewer/README.txt
@@ -33,23 +33,37 @@ editing the "accessibility.properties" file. This is located at:
/etc/java-8-openjdk/accessibility.properties
-Additionally, to start the application, start.sh should be executed as it
+Additionally, to start the application, start_linux.sh should be executed as it
sets up the shared library paths.
+-= MAC =-
+
+Same as Linux, except with .dylib extensions on all shared objects.
+
+start_darwin.sh should be used to start the application.
+
+
Building:
-= WINDOWS =-
Ensure both gs_jni.dll, gpdldll64.dll, and gsjava.jar have been built. Then,
-run the build.bat script. To run, open gsviewer.jar either through File
+run the build_win32.bat script. To run, open gsviewer.jar either through File
Explorer or in the command line through the following command:
java -jar gsviewer.jar
-= LINUX =-
-Ensure Ghoscript has been built.
-Run the build.sh script. This automatically will build the
-gs_jni.co, gsjava.jar, and copy the files to the needed
-directories. gsviewer.jar will be outputted in this directory. \ No newline at end of file
+Ensure Ghostscript has been built.
+Run the build_linux.sh script. This will automatically build
+gs_jni.so, gsjava.jar, and copy the files to the needed
+directories. gsviewer.jar will be outputted in this directory.
+
+-= MAC =-
+
+Ensure Ghostscript has been built.
+Run the build_darwin.sh script. This will automatically build
+gs_jni.dylib, gsjava.jar, and copy the files to the needed
+directories. gsviewer.jar will be outputed in this directory.
diff --git a/demos/java/jni/gs_jni/README.txt b/demos/java/jni/gs_jni/README.txt
index 7942ebbdb..b31399e95 100644
--- a/demos/java/jni/gs_jni/README.txt
+++ b/demos/java/jni/gs_jni/README.txt
@@ -25,15 +25,23 @@ jni_md.h:
C:\Program Files\Java\<JDK Install>\include\win32\jni_md.h
-For Linux (using OpenJDK):
+For Linux:
jni.h:
/lib/jvm/<JDK Install>/include/jni.h
jni_md.h:
-/lib/jvm/<JDK Install>/include/jni_md.h
+/lib/jvm/<JDK Install>/include/linux/jni_md.h
+For Mac:
+
+jni.h:
+/Library/Java/JavaVirtualMachines/<JDK Install>/Contents/Home/include/jni.h
+
+jni_md.h:
+/Library/Java/JavaVirtualMachines/<JDK Install>/Contents/Home/include/darwin/jni_md.h
+
So, a setup fully capable of building for any system should have an
include directory resembling this, where each copy of jni_md.h comes
from its respective system:
@@ -41,6 +49,7 @@ from its respective system:
* jni.h
* win32\jni_md.h
* linux/jni_md.h
+* darwin/jni_md.h
To build on Windows,
Ensure Ghostscript has already been built, and then open
@@ -52,7 +61,11 @@ can be placed in the working directory, next to gsjava.jar (see
To build on Linux,
Ensure Ghostscript has already been built, and then run
-the build.sh script.
+the build_linux.sh script.
+
+To build on Mac,
+Ensure Ghostscript has already been builtm and then run
+the build_darwin.sh script.
Notes on function implementations and a brief introduction on
how to use the JNI: