This is an automated email from the git hooks/post-receive script. pini pushed a commit to tag upstream/1.1.0_beta1 in repository sikuli.
commit c472a2a33d7766e1966d31e24e0857f8ba0a0011 Author: hankin <[email protected]> Date: Fri Dec 27 13:15:51 2013 +1100 Make the libVisionProxy.so in linux. --- Natives/pom.xml | 31 ++++++++ Natives/src/main/native/Vision/makeVisionProxy | 106 +++++++++++++++++++++++++ 2 files changed, 137 insertions(+) diff --git a/Natives/pom.xml b/Natives/pom.xml index e9cec47..fd97f8b 100644 --- a/Natives/pom.xml +++ b/Natives/pom.xml @@ -22,6 +22,37 @@ <artifactId>SikuliX-Natives</artifactId> <version>1.1.0</version> + <profiles> + <profile> + <id>Unix</id> + <activation> + <os> + <family>unix</family> + </os> + </activation> + <build> + <plugins> + <plugin> + <artifactId>exec-maven-plugin</artifactId> + <groupId>org.codehaus.mojo</groupId> + <executions> + <execution><!-- Run our version calculation script --> + <id>Make vision proxy</id> + <phase>generate-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>${basedir}/src/main/native/Vision/makeVisionProxy</executable> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <build> <defaultGoal>clean install</defaultGoal> </build> diff --git a/Natives/src/main/native/Vision/makeVisionProxy b/Natives/src/main/native/Vision/makeVisionProxy new file mode 100755 index 0000000..f14e664 --- /dev/null +++ b/Natives/src/main/native/Vision/makeVisionProxy @@ -0,0 +1,106 @@ +#!/bin/bash + +# trying to find the active JDK + +# this worked on Ubuntu 12 +for e in `whereis -b javac`; do +if [ "$e" == "javac:" ]; then + continue +else + jvc=$e + break +fi +done + +src=src/main/native/Vision +target=target/build +dist=target/dist + +jvcx= +while [ "$jvc" != "" ]; do +jvcx=$jvc +jvc=`readlink -n $jvc` +done + +JDK= +if [ "$jvcx" != "" ]; then + JDK=`dirname $jvcx` + JDK=`dirname $JDK` +fi + +# if JDK not found with the above eval +# JDK=...insert path to JDK... and uncomment + +if [ -e $JDK/include ]; then + # folder(s) containing the header files + includeParm="-I$JDK/include -I$JDK/include/linux -I/usr/include -I/usr/local/include" + echo --- The active JDK seems to be in $JDK +fi + +if [ "$includeParm" == "" ]; then + echo JDK could not be found - check and set path manually \(line 33\) +fi + +LIBS=/usr/lib +if [ -e $LIBS/libopencv_core.so ]; then + libFolderO=$LIBS + libFolderT=$LIBS + echo --- OpenCV libs seem to be in $LIBS +fi +LIBS=/usr/lib64 +if [ "libFolderO" == "" -a -e $LIBS/libopencv_core.so ]; then + libFolderO=$LIBS + libFolderT=$LIBS + echo --- OpenCV libs seem to be in $LIBS +fi +LIBS=/usr/local/lib +if [ "libFolderO" == "" -a -e $LIBS/libopencv_core.so ]; then + libFolderO=$LIBS + libFolderT=$LIBS + echo --- OpenCV libs seem to be in $LIBS +fi + +# if the openCV libs are not found with the above eval +# folder containing the OpenCV libs +# libFolderO=...insert path to folder... and uncomment +# folder containing the Tesseract lib +# libFolderT=...insert path to folder... and uncomment + +if [ "libFolderO" == "" ]; then + echo --- OpenCV libs could not be found - check and set paths manually \(line 66 and 68\) +fi + +if [ "$includeParm" != "" -a "libFolderO" != "" ]; then + mkdir -p "$target" + mkdir -p "$dist" + + echo compiling cvgui + g++ -c -O3 -fPIC -MMD -MP -MF $target/cvgui.o.d $includeParm -o $target/cvgui.o $src/cvgui.cpp + + echo compiling finder + g++ -c -O3 -fPIC -MMD -MP -MF $target/finder.o.d $includeParm -o $target/finder.o $src/finder.cpp + +# echo compiling imgdb +# g++ -c -O3 -fPIC -MMD -MP -MF $target/imgdb.o.d $includeParm -o $target/imgdb.o $src/imgdb.cpp + + echo compiling pyramid-template-matcher + g++ -c -O3 -fPIC -MMD -MP -MF $target/pyramid-template-matcher.o.d $includeParm -o $target/pyramid-template-matcher.o $src/pyramid-template-matcher.cpp + + echo compiling sikuli-debug + g++ -c -O3 -fPIC -MMD -MP -MF $target/sikuli-debug.o.d $includeParm -o $target/sikuli-debug.o $src/sikuli-debug.cpp + + echo compiling tessocr + g++ -c -O3 -fPIC -MMD -MP -MF $target/tessocr.o.d $includeParm -o $target/tessocr.o $src/tessocr.cpp + + echo compiling vision + g++ -c -O3 -fPIC -MMD -MP -MF $target/vision.o.d $includeParm -o $target/vision.o $src/vision.cpp + + echo compiling visionJAVA_wrap + g++ -c -O3 -fPIC -MMD -MP -MF $target/visionJAVA_wrap.o.d $includeParm -o $target/visionJAVA_wrap.o $src/visionJAVA_wrap.cxx + + echo linking libVisionProxy + g++ -shared -s -fPIC -dynamic -o $dist/libVisionProxy.so $target/cvgui.o $target/finder.o $target/pyramid-template-matcher.o $target/sikuli-debug.o $target/tessocr.o $target/vision.o $target/visionJAVA_wrap.o $libFolderT/libtesseract.so $libFolderO/libopencv_core.so $libFolderO/libopencv_highgui.so $libFolderO/libopencv_imgproc.so +else + echo --- Either JDK or OpenCV libs not found - check and repair as suggested +fi + -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

