[artoolkit-commits] SF.net SVN: artoolkit: [279] trunk/artoolkit
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: <phi...@us...> - 2008-02-18 23:50:16
|
Revision: 279 http://artoolkit.svn.sourceforge.net/artoolkit/?rev=279&view=rev Author: philip_lamb Date: 2008-02-18 15:50:16 -0800 (Mon, 18 Feb 2008) Log Message: ----------- - Pulldowns from ARToolKit4: Add Linux/Unix scripts to set ARTOOLKIT_2_ROOT env variable. Add share/artoolkit-config script to ease linking to ARToolKit in third-party binaries. Remove Xmu and add pthread to link libs on Linux. - Correct version number in config.h.in. - Add share directory in Xcode project files list. Modified Paths: -------------- trunk/artoolkit/ARToolKit.xcodeproj/project.pbxproj trunk/artoolkit/Configure trunk/artoolkit/Makefile.in trunk/artoolkit/include/AR/config.h.in Added Paths: ----------- trunk/artoolkit/share/artoolkit-config.in trunk/artoolkit/share/artoolkit-setenv trunk/artoolkit/share/artoolkit-unsetenv Modified: trunk/artoolkit/ARToolKit.xcodeproj/project.pbxproj =================================================================== --- trunk/artoolkit/ARToolKit.xcodeproj/project.pbxproj 2008-02-17 22:34:52 UTC (rev 278) +++ trunk/artoolkit/ARToolKit.xcodeproj/project.pbxproj 2008-02-18 23:50:16 UTC (rev 279) @@ -1424,6 +1424,13 @@ 4A934D80086A2DB700DF2FAC /* libARvrml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libARvrml.a; sourceTree = "<group>"; }; 4A99C6520A59DCC3001B4C35 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Makefile.in; sourceTree = "<group>"; }; 4A99C6530A59DCC3001B4C35 /* video.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = video.c; sourceTree = "<group>"; }; + 4A9F9ABD0D6A4E7B00C7456B /* artoolkit-config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "artoolkit-config"; sourceTree = "<group>"; }; + 4A9F9ABE0D6A4E7B00C7456B /* artoolkit-config.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "artoolkit-config.in"; sourceTree = "<group>"; }; + 4A9F9ABF0D6A4E7B00C7456B /* artoolkit-setenv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "artoolkit-setenv"; sourceTree = "<group>"; }; + 4A9F9AC00D6A4E7B00C7456B /* artoolkit-unsetenv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "artoolkit-unsetenv"; sourceTree = "<group>"; }; + 4A9F9AC10D6A4E7B00C7456B /* globals.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = globals.lua; sourceTree = "<group>"; }; + 4A9F9AC20D6A4E7B00C7456B /* modules.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = modules.lua; sourceTree = "<group>"; }; + 4A9F9AC30D6A4E7B00C7456B /* premake.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = premake.lua; sourceTree = "<group>"; }; 4AAB8C740728934300708844 /* ARToolKit.dsw */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; lineEnding = 2; path = ARToolKit.dsw; sourceTree = "<group>"; }; 4AAB8C750728934300708844 /* ARToolKit.sln */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ARToolKit.sln; sourceTree = "<group>"; }; 4AAB8C760728937100708844 /* libARvideo.dsp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = libARvideo.dsp; sourceTree = "<group>"; }; @@ -1948,6 +1955,7 @@ 4A427C06048431FA00B56093 /* patterns */, 4A427C10048431FA00B56093 /* util */, 4A461B5C04843FAA00B56093 /* bin */, + 4A9F9ABC0D6A4E7B00C7456B /* share */, 4A3F1552064A0C7C0042B0D7 /* External Libraries & Frameworks */, 4AE2305E0659B7D10047D402 /* Products */, ); @@ -2469,6 +2477,20 @@ path = VideoGStreamer; sourceTree = "<group>"; }; + 4A9F9ABC0D6A4E7B00C7456B /* share */ = { + isa = PBXGroup; + children = ( + 4A9F9ABD0D6A4E7B00C7456B /* artoolkit-config */, + 4A9F9ABE0D6A4E7B00C7456B /* artoolkit-config.in */, + 4A9F9ABF0D6A4E7B00C7456B /* artoolkit-setenv */, + 4A9F9AC00D6A4E7B00C7456B /* artoolkit-unsetenv */, + 4A9F9AC10D6A4E7B00C7456B /* globals.lua */, + 4A9F9AC20D6A4E7B00C7456B /* modules.lua */, + 4A9F9AC30D6A4E7B00C7456B /* premake.lua */, + ); + path = share; + sourceTree = "<group>"; + }; 4AC3C076075188AB0073D2C6 /* graphicsTest */ = { isa = PBXGroup; children = ( Modified: trunk/artoolkit/Configure =================================================================== --- trunk/artoolkit/Configure 2008-02-17 22:34:52 UTC (rev 278) +++ trunk/artoolkit/Configure 2008-02-18 23:50:16 UTC (rev 279) @@ -1,32 +1,51 @@ #!/bin/sh -# ARToolKit Configure for Linux Video Devices +# ARToolKit Configure for Linux/Unix Video Devices # ##################################################### MDIR=". \ lib/SRC \ - lib/SRC/AR lib/SRC/ARMulti lib/SRC/Gl \ - lib/SRC/VideoLinux1394Cam lib/SRC/VideoLinuxDV \ - lib/SRC/VideoLinuxV4L lib/SRC/VideoSGI \ + lib/SRC/AR \ + lib/SRC/ARMulti \ + lib/SRC/Gl \ + lib/SRC/VideoLinux1394Cam \ + lib/SRC/VideoLinuxDV \ + lib/SRC/VideoLinuxV4L \ + lib/SRC/VideoSGI \ lib/SRC/VideoMacOSX \ lib/SRC/VideoGStreamer \ lib/SRC/ARvrml \ util \ - util/calib_camera2 util/calib_cparam util/calib_distortion \ - util/mk_patt util/graphicsTest util/videoTest \ + util/calib_camera2 \ + util/calib_cparam \ + util/calib_distortion \ + util/mk_patt \ + util/graphicsTest \ + util/videoTest \ examples \ - examples/collide examples/exview \ - examples/loadMultiple examples/modeTest examples/multi examples/optical \ - examples/paddle examples/paddleDemo examples/paddleInteraction examples/range \ - examples/relation examples/simple examples/simple2 examples/simpleLite \ - examples/twoView examples/simpleVRML \ + examples/collide \ + examples/exview \ + examples/loadMultiple \ + examples/modeTest \ + examples/multi \ + examples/optical \ + examples/paddle \ + examples/paddleDemo \ + examples/paddleInteraction \ + examples/range \ + examples/relation \ + examples/simple \ + examples/simple2 \ + examples/simpleLite \ + examples/twoView \ + examples/simpleVRML \ " SED=/tmp/SED.$$ trap "rm -f $SED; exit 0" 0 1 2 3 15 +VERSION=`grep -E 'AR_HEADER_VERSION_STRING[[:space:]]+"[0-9]+\.[0-9]+(\.[0-9]+)*"' include/AR/config.h.in | grep -Eo "[0-9]+\.[0-9]+(\.[0-9]+)*"` - E=`uname` if [ "$E" = "Linux" ] then @@ -42,7 +61,7 @@ then echo echo "Color conversion should use x86 assembly (choose 'n' for 64bit systems)?" - echo -n "Enter : " + echo -n "Enter : " read ANS if [ "$ANS" = "y" ] then @@ -59,13 +78,13 @@ LDFLAG="-L/usr/X11R6/lib" ARFLAG="rs" RANLIB="" - LIBS="-lglut -lGLU -lGL -lXi -lXmu -lX11 -lm" + LIBS="-lglut -lGLU -lGL -lXi -lX11 -lm -lpthread" CONFIG="AR_INPUT_V4L" elif [ "$ANS" = "2" ] then echo - echo "Color conversion should use x86 assembly (not working for 64bit)?" - echo -n "Enter : " + echo "Color conversion should use x86 assembly (Answer n if compiling for 64 bit)?" + echo -n "Enter : " read ANS if [ "$ANS" = "y" ] then @@ -82,16 +101,16 @@ LDFLAG="-L/usr/X11R6/lib" ARFLAG="rs" RANLIB="" - LIBS="-lglut -lGLU -lGL -lXi -lXmu -lX11 -lm -ljpeg" + LIBS="-lglut -lGLU -lGL -lXi -lX11 -lm -lpthread -ljpeg" CONFIG="AR_INPUT_V4L" elif [ "$ANS" = "3" ] then VIDEO_DRIVER="VideoLinuxDV" - CFLAG="-O -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include" - LDFLAG="-L/usr/X11R6/lib -L/usr/local/lib" + CFLAG="-O -I/usr/X11R6/include" + LDFLAG="-L/usr/X11R6/lib" ARFLAG="rs" RANLIB="" - LIBS="-lraw1394 -ldv -lpthread -lglut -lGLU -lGL -lXi -lXmu -lX11 -lm" + LIBS="-lglut -lGLU -lGL -lXi -lX11 -lm -lpthread -lraw1394 -ldv" CONFIG="AR_INPUT_DV" elif [ "$ANS" = "4" ] then @@ -100,20 +119,21 @@ LDFLAG="-L/usr/X11R6/lib" ARFLAG="rs" RANLIB="" - LIBS="-lglut -lGLU -lGL -lXi -lXmu -lX11 -lm -lraw1394 -ldc1394_control" + LIBS="-lglut -lGLU -lGL -lXi -lX11 -lm -lpthread -lraw1394 -ldc1394_control" CONFIG="AR_INPUT_1394CAM" elif [ "$ANS" = "5" ] then VIDEO_DRIVER="VideoGStreamer" - GST_INCLUDE=`pkg-config --cflags gstreamer-0.10` - GST_LIBS=`pkg-config --libs gstreamer-0.10` - - CFLAG="-O $GST_INCLUDE -I/usr/X11R6/include -fPIC" - LDFLAG="$GST_LIBS -L/usr/X11R6/lib -L/usr/local/lib" + CFLAG="-O -I/usr/X11R6/include -fPIC" + LDFLAG="-L/usr/X11R6/lib" ARFLAG="rs" RANLIB="" - LIBS="-lpthread -lglut -lGLU -lGL -lXi -lX11 -lm" + LIBS="-lglut -lGLU -lGL -lXi -lX11 -lm -lpthread" CONFIG="AR_INPUT_GSTREAMER" + GST_CFLAGS=`pkg-config --cflags gstreamer-0.10` + GST_LIBS=`pkg-config --libs gstreamer-0.10` + CFLAG="$CFLAG $GST_CFLAGS" + LIBS="$LIBS $GST_LIBS" else echo "Please enter 1,2,3,4 or 5." exit 0 @@ -155,7 +175,7 @@ LDFLAG="" ARFLAG="-r" RANLIB="ranlib \$\@" - LIBS="-framework Carbon -framework QuickTime -framework GLUT -framework OpenGL -framework AppKit -framework Foundation -lobjc" + LIBS="-framework Carbon -framework QuickTime -framework GLUT -framework OpenGL -framework Cocoa" echo "Does your Mac have fast texture mapping hardware? (y or n)" echo -n "Enter : " @@ -192,6 +212,12 @@ exit 0 fi +# +# Output step 1. +# Create Makefiles, setting symbols, and selecting directories for compilation. +# + +# Prefix any slashes with '\' for sed. echo $VIDEO_DRIVER | sed -e 's/\//\\\//g' >$SED VIDEO_DRIVER=`cat $SED` echo $CFLAG | sed -e 's/\//\\\//g' >$SED @@ -223,7 +249,15 @@ echo " create $i/Makefile" sed -f $SED <$i/Makefile.in > $i/Makefile done +echo " create share/artoolkit-config" +sed -f $SED <share/artoolkit-config.in > share/artoolkit-config +chmod ugo+rx share/artoolkit-config +# +# Output step 2. +# Record configuration in config.h. +# + if [ "$NVEXT" = "y" ] then cat > $SED <<EOF Modified: trunk/artoolkit/Makefile.in =================================================================== --- trunk/artoolkit/Makefile.in 2008-02-17 22:34:52 UTC (rev 278) +++ trunk/artoolkit/Makefile.in 2008-02-18 23:50:16 UTC (rev 279) @@ -14,3 +14,4 @@ (cd examples; make -f Makefile allclean) rm -f Makefile rm -f include/AR/config.h + rm -f share/artoolkit-config Modified: trunk/artoolkit/include/AR/config.h.in =================================================================== --- trunk/artoolkit/include/AR/config.h.in 2008-02-17 22:34:52 UTC (rev 278) +++ trunk/artoolkit/include/AR/config.h.in 2008-02-18 23:50:16 UTC (rev 279) @@ -19,7 +19,7 @@ // The TINY version number defines bug-fixes to existing // functionality. Range: [0-99]. -#define AR_HEADER_VERSION_TINY 0 +#define AR_HEADER_VERSION_TINY 1 // The BUILD version number will always be zero in releases, // but may be non-zero in internal builds or in version-control @@ -28,7 +28,7 @@ // The string representation below must match the major, minor // and tiny release numbers. -#define AR_HEADER_VERSION_STRING "2.72.0" +#define AR_HEADER_VERSION_STRING "2.72.1" // The macros below are convenience macros to enable use // of certain ARToolKit header functionality by the release Added: trunk/artoolkit/share/artoolkit-config.in =================================================================== --- trunk/artoolkit/share/artoolkit-config.in (rev 0) +++ trunk/artoolkit/share/artoolkit-config.in 2008-02-18 23:50:16 UTC (rev 279) @@ -0,0 +1,100 @@ +#! /bin/sh + +prefix="${ARTOOLKIT_2_ROOT}" +exec_prefix="${prefix}" +includedir="${prefix}/include" +libdir="${exec_prefix}/lib" +version=@VERSION@ +cflags="@CFLAG@" +ldflags="@LDFLAG@" +libs="@LIBS@" + +usage() +{ + cat <<EOF +Usage: artoolkit-config [OPTION] + +Known values for OPTION are: + + --prefix=DIR change artoolkit prefix [default $prefix] + --exec-prefix=DIR change artoolkit exec prefix [default $exec_prefix] + --libs print all library linking information + --libs-only-l print only -l library linking information + --cflags print pre-processor and compiler flags + --help display this help and exit + --version output version information +EOF + + exit $1 +} + +if test $# -eq 0; then + usage 1 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case "$1" in + --prefix=*) + prefix=$optarg + includedir=$prefix/include + libdir=$prefix/lib + ;; + + --prefix) + echo $prefix + ;; + + --exec-prefix=*) + exec_prefix=$optarg + libdir=$exec_prefix/lib + ;; + + --exec-prefix) + echo $exec_prefix + ;; + + --version) + echo $version + exit 0 + ;; + + --help) + usage 0 + ;; + + --cflags) + echo $cflags + ;; + + --libs-only-l) + echo $libs + ;; + + --libs) + if [ "`uname`" = "Linux" ] + then + if [ "-L${libdir}" = "-L/usr/lib64" ] + then + echo "$ldflags $libs" + else + echo "-L${libdir} $ldflags $libs" + fi + else + echo "-L${libdir} $ldflags $libs" + fi + ;; + + *) + usage + exit 1 + ;; + esac + shift +done + +exit 0 Added: trunk/artoolkit/share/artoolkit-setenv =================================================================== --- trunk/artoolkit/share/artoolkit-setenv (rev 0) +++ trunk/artoolkit/share/artoolkit-setenv 2008-02-18 23:50:16 UTC (rev 279) @@ -0,0 +1,15 @@ +#! /bin/sh + +# Assume we're in the share dir. +ARTOOLKIT_2_ROOT=`echo $0 | sed "s/\/share\/.*//"` +if [ "`echo ${ARTOOLKIT_2_ROOT} | cut -c 1`" != "/" ] +then + ARTOOLKIT_2_ROOT="`pwd`/${ARTOOLKIT_2_ROOT}" +fi + +echo "ARTOOLKIT_2_ROOT=${ARTOOLKIT_2_ROOT}; export ARTOOLKIT_2_ROOT" >> ~/.profile +echo "setenv ARTOOLKIT_2_ROOT ${ARTOOLKIT_2_ROOT}" >> ~/.cshrc +if [ "`uname`" = "Darwin" ] +then + defaults write ~/.MacOSX/environment ARTOOLKIT_2_ROOT -string "${ARTOOLKIT_2_ROOT}"; plutil -convert xml1 ~/.MacOSX/environment.plist +fi Property changes on: trunk/artoolkit/share/artoolkit-setenv ___________________________________________________________________ Name: svn:executable + * Added: trunk/artoolkit/share/artoolkit-unsetenv =================================================================== --- trunk/artoolkit/share/artoolkit-unsetenv (rev 0) +++ trunk/artoolkit/share/artoolkit-unsetenv 2008-02-18 23:50:16 UTC (rev 279) @@ -0,0 +1,7 @@ +#! /bin/sh +sed -i.bak '/ARTOOLKIT_2_ROOT=/d' ~/.profile +sed -i.bak '/setenv ARTOOLKIT_2_ROOT/d' ~/.cshrc +if [ "`uname`" = "Darwin" ] +then + defaults delete ~/.MacOSX/environment ARTOOLKIT_2_ROOT; plutil -convert xml1 ~/.MacOSX/environment.plist +fi Property changes on: trunk/artoolkit/share/artoolkit-unsetenv ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |