Re-build the jar files from the source code.
This commit is contained in:
parent
36b66a8796
commit
c6b02b10fe
|
@ -1,11 +0,0 @@
|
||||||
default: t_libopenjpip t_util
|
|
||||||
|
|
||||||
t_libopenjpip:
|
|
||||||
make -C libopenjpip -f Makefile.nix
|
|
||||||
|
|
||||||
t_util:
|
|
||||||
make -C util -f Makefile.nix
|
|
||||||
|
|
||||||
clean:
|
|
||||||
make clean -C libopenjpip -f Makefile.nix
|
|
||||||
make clean -C util -f Makefile.nix
|
|
|
@ -1,10 +0,0 @@
|
||||||
default: local server
|
|
||||||
|
|
||||||
local:
|
|
||||||
make -f comMakefile.mk
|
|
||||||
|
|
||||||
server:
|
|
||||||
rm *.o && make jpipserver=yes -f comMakefile.mk
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.a *.o *~
|
|
|
@ -45,3 +45,83 @@ FOREACH(exe ${EXES})
|
||||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||||
)
|
)
|
||||||
ENDFOREACH(exe)
|
ENDFOREACH(exe)
|
||||||
|
|
||||||
|
# Build the two java clients:
|
||||||
|
FIND_PACKAGE(Java 1.5 REQUIRED) # javac, jar
|
||||||
|
|
||||||
|
# 1. opj_viewer
|
||||||
|
# build dep list:
|
||||||
|
file(GLOB java1_srcs "opj_viewer/src/*.java")
|
||||||
|
|
||||||
|
# make sure target javac dir exists:
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/classes1)
|
||||||
|
# Build java
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
OUTPUT ${LIBRARY_OUTPUT_PATH}/opj_viewer.jar
|
||||||
|
COMMAND ${Java_JAVAC_EXECUTABLE}
|
||||||
|
${java1_srcs} -d ${CMAKE_CURRENT_BINARY_DIR}/classes1
|
||||||
|
COMMAND ${Java_JAR_EXECUTABLE} cfm ${LIBRARY_OUTPUT_PATH}/opj_viewer.jar
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/dist/manifest.txt -C
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/classes1 .
|
||||||
|
DEPENDS ${java1_srcs}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/dist/manifest.txt
|
||||||
|
COMMENT "javac *.java; jar cvf -> opj_viewer.jar"
|
||||||
|
)
|
||||||
|
|
||||||
|
# name the target
|
||||||
|
ADD_CUSTOM_TARGET(OPJViewerJar ALL
|
||||||
|
DEPENDS ${LIBRARY_OUTPUT_PATH}/opj_viewer.jar
|
||||||
|
COMMENT "building opj_viewer.jar"
|
||||||
|
)
|
||||||
|
|
||||||
|
# 2. opj_viewer_xerces
|
||||||
|
# search for package org.apache.xerces.parsers
|
||||||
|
find_file(APACHE_XERCES_JAR
|
||||||
|
NAMES xerces-j2.jar xercesImpl.jar
|
||||||
|
PATHS /usr/share/java/
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
mark_as_advanced(APACHE_XERCES_JAR)
|
||||||
|
|
||||||
|
if(EXISTS ${APACHE_XERCES_JAR})
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer_xerces/dist/manifest.txt.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/opj_viewer_xerces/dist/manifest.txt
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
# build dep list:
|
||||||
|
file(GLOB java2_srcs "opj_viewer_xerces/src/*.java")
|
||||||
|
|
||||||
|
# Need some common files:
|
||||||
|
list(APPEND java2_srcs
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/ImageManager.java
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/ImgdecClient.java
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/JPIPHttpClient.java
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/MML.java
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/PnmImage.java
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/RegimViewer.java
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer/src/ResizeListener.java
|
||||||
|
)
|
||||||
|
|
||||||
|
# make sure target javac dir exists:
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/classes2)
|
||||||
|
# Build java
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
OUTPUT ${LIBRARY_OUTPUT_PATH}/opj_viewer_xerces.jar
|
||||||
|
COMMAND ${Java_JAVAC_EXECUTABLE}
|
||||||
|
-classpath ${APACHE_XERCES_JAR}
|
||||||
|
${java2_srcs} -d ${CMAKE_CURRENT_BINARY_DIR}/classes2
|
||||||
|
COMMAND ${Java_JAR_EXECUTABLE} cfm ${LIBRARY_OUTPUT_PATH}/opj_viewer_xerces.jar
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/opj_viewer_xerces/dist/manifest.txt
|
||||||
|
-C ${CMAKE_CURRENT_BINARY_DIR}/classes2 .
|
||||||
|
DEPENDS ${java2_srcs}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_viewer_xerces/dist/manifest.txt.in
|
||||||
|
COMMENT "javac *.java; jar cvf -> opj_viewer_xerces.jar"
|
||||||
|
)
|
||||||
|
|
||||||
|
# name the target
|
||||||
|
ADD_CUSTOM_TARGET(OPJViewerXercesJar ALL
|
||||||
|
DEPENDS ${LIBRARY_OUTPUT_PATH}/opj_viewer_xerces.jar
|
||||||
|
COMMENT "building opj_viewer_xerces.jar"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
JPIPLIBDIR = ../libopenjpip
|
|
||||||
|
|
||||||
SLIBFNAME = $(JPIPLIBDIR)/libopenjpip_server.a
|
|
||||||
SCFLAGS = -O3 -Wall -m32 -I$(JPIPLIBDIR) -DSERVER -DQUIT_SIGNAL=\"quitJPIP\"
|
|
||||||
SLDFLAGS = -L$(JPIPLIBDIR) -lm -lfcgi -lcurl -lpthread -lopenjpip_server
|
|
||||||
|
|
||||||
J2KINCDIR = ../../../libopenjpeg
|
|
||||||
J2KLIBDIR = $(J2KINCDIR)/.libs
|
|
||||||
LIBFNAME = $(JPIPLIBDIR)/libopenjpip_local.a $(J2KLIBDIR)/libopenjpeg.a
|
|
||||||
CFLAGS = -O3 -Wall -I$(JPIPLIBDIR)
|
|
||||||
LDFLAGS = -L$(JPIPLIBDIR) -L$(J2KLIBDIR) -lm -lopenjpip_local
|
|
||||||
|
|
||||||
ALL = opj_server opj_dec_server jpip_to_jp2 jpip_to_j2k test_index addXMLinJP2
|
|
||||||
|
|
||||||
all: $(ALL)
|
|
||||||
|
|
||||||
opj_server: opj_server.c $(SLIBFNAME)
|
|
||||||
$(CC) $(SCFLAGS) $< $(SLDFLAGS) $(SLIBFNAME) -o $@
|
|
||||||
|
|
||||||
opj_dec_server: opj_dec_server.c $(LIBFNAME)
|
|
||||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LIBFNAME) -o $@
|
|
||||||
|
|
||||||
jpip_to_jp2: jpip_to_jp2.c $(LIBFNAME)
|
|
||||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LIBFNAME) -o $@
|
|
||||||
|
|
||||||
jpip_to_j2k: jpip_to_j2k.c $(LIBFNAME)
|
|
||||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LIBFNAME) -o $@
|
|
||||||
|
|
||||||
test_index: test_index.c $(LIBFNAME)
|
|
||||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LIBFNAME) -o $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(ALL) *.o *~
|
|
|
@ -1,35 +0,0 @@
|
||||||
<project name="opj_viewer" default="dist" basedir=".">
|
|
||||||
<description>OpenJPIP client image viewer</description>
|
|
||||||
<property name="src" location="src" />
|
|
||||||
<property name="build" location="build"/>
|
|
||||||
<property name="dist" location="dist" />
|
|
||||||
|
|
||||||
<target name="init">
|
|
||||||
<tstamp/>
|
|
||||||
<mkdir dir="${build}"/>
|
|
||||||
</target>
|
|
||||||
<target name="compile" depends="init">
|
|
||||||
<javac srcdir="${src}" destdir="${build}"/>
|
|
||||||
</target>
|
|
||||||
<target name="dist" depends="compile">
|
|
||||||
<mkdir dir="${dist}"/>
|
|
||||||
<jar jarfile="${dist}/opj_viewer-${DSTAMP}.jar"
|
|
||||||
basedir="${build}" manifest="${dist}/manifest.txt"/>
|
|
||||||
<exec dir="${dist}" executable="ln">
|
|
||||||
<arg line="-sf opj_viewer-${DSTAMP}.jar opj_viewer.jar"/>
|
|
||||||
</exec>
|
|
||||||
</target>
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${build}"/>
|
|
||||||
<delete dir="${dist}"/>
|
|
||||||
</target>
|
|
||||||
<target name="test" depends="dist">
|
|
||||||
<exec executable="appletviewer"><arg line="dist.html"/></exec>
|
|
||||||
</target>
|
|
||||||
<target name="build_test" depends="compile">
|
|
||||||
<exec executable="appletviewer"><arg line="compile.html"/></exec>
|
|
||||||
</target>
|
|
||||||
<target name="build_testj" depends="compile">
|
|
||||||
<exec executable="java"><arg line="-classpath build ImageWindow girl"/></exec>
|
|
||||||
</target>
|
|
||||||
</project>
|
|
|
@ -1,35 +0,0 @@
|
||||||
<project name="opj_viewer_xerces" default="dist" basedir=".">
|
|
||||||
<description>OpenJPIP client image viewer</description>
|
|
||||||
<property name="src" location="src" />
|
|
||||||
<property name="build" location="build"/>
|
|
||||||
<property name="dist" location="dist" />
|
|
||||||
|
|
||||||
<target name="init">
|
|
||||||
<tstamp/>
|
|
||||||
<mkdir dir="${build}"/>
|
|
||||||
</target>
|
|
||||||
<target name="compile" depends="init">
|
|
||||||
<javac srcdir="${src}" destdir="${build}"/>
|
|
||||||
</target>
|
|
||||||
<target name="dist" depends="compile">
|
|
||||||
<mkdir dir="${dist}"/>
|
|
||||||
<jar jarfile="${dist}/opj_viewer_xerces-${DSTAMP}.jar"
|
|
||||||
basedir="${build}" manifest="${dist}/manifest.txt"/>
|
|
||||||
<exec dir="${dist}" executable="ln">
|
|
||||||
<arg line="-sf opj_viewer_xerces-${DSTAMP}.jar opj_viewer_xerces.jar"/>
|
|
||||||
</exec>
|
|
||||||
</target>
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${build}"/>
|
|
||||||
<delete dir="${dist}"/>
|
|
||||||
</target>
|
|
||||||
<target name="test" depends="dist">
|
|
||||||
<exec executable="appletviewer"><arg line="dist.html"/></exec>
|
|
||||||
</target>
|
|
||||||
<target name="build_test" depends="compile">
|
|
||||||
<exec executable="appletviewer"><arg line="compile.html"/></exec>
|
|
||||||
</target>
|
|
||||||
<target name="build_testj" depends="compile">
|
|
||||||
<exec executable="java"><arg line="-classpath build ImageWindow girl"/></exec>
|
|
||||||
</target>
|
|
||||||
</project>
|
|
|
@ -2,4 +2,4 @@ Manifest-Version: 1.0
|
||||||
Ant-Version: Apache Ant 1.7.0
|
Ant-Version: Apache Ant 1.7.0
|
||||||
Created-By: Kaori Hagihara
|
Created-By: Kaori Hagihara
|
||||||
Main-Class: ImageWindow
|
Main-Class: ImageWindow
|
||||||
Class-Path: /usr/share/java/xerces-j2.jar
|
Class-Path: @APACHE_XERCES_JAR@
|
Loading…
Reference in New Issue