Building CavePainting: Difference between revisions

From VrlWiki
Jump to navigation Jump to search
Created page with "Note:Replace $G with the absolute directory path of your sandbox. Although $G is recognized by the cd command, it cannot be used in include statements in c++ source files. #Ga..."
 
Setting Up and Checking Everything Out: sourceforge restructuring
 
(145 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Note:Replace $G with the absolute directory path of your sandbox. Although $G is recognized by the cd command, it cannot be used in include statements in c++ source files.
Currently, this has only been tested and shown to work on the CCV test curved wall at 94 Waterman.
#Gather Required Packages
#*vrg3d
#*cvs: common, import, project
#*build utility, gg
#*import/vrpn_7.28_gcc_64
#*import/g3d_8.01_64
#*sdl.rpm
#*project/kuchora/cavepainting
#Follow [[Set_up_your_environment_for_diffusion_MRI_processing]] tutorial
#Change all include vrg3d header file statements in $G/common/kuchora to correct filepath*
#Change all include MMotion header file statements in $G/common/kuchora to correct filepath*
#Make in $G/common/kuchora
#Make install in $G/common/kuchora
#Make in $G/common/MMotion
#Make install in $G/common/MMotion
#In $G/project/kuchora/cavepainting/main.cpp
#*change #include <kuchora/Kuchora.H> to #include <$G/common/kuchora/Kuchora.H>
#In $G/common/kuchora/AnnotationModel.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/TextInputWidget.H
#*change #include <kuchora/EventMgr.H> to #include <$G/common/kuchora/include/kuchora/EventMgr.H>
#*change #include <kuchora/GfxMgr.H> to #include <$G/common/kuchora/include/kuchora/GfxMgr.H>
#In $G/common/kuchora/BrushState.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/CavePaintingCursors.H
#*change #include <kuchora/GfxMgr.H> to #include <$G/common/kuchora/include/kuchora/GfxMgr.H>
#In $G/common/kuchora/PointModel.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/FishtankDepthCues.H
#*change #include <kuchora/GfxMgr.H> to #include <$G/common/kuchora/include/kuchora/GfxMgr.H>
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/TriStripModel.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/WorkingLimits.H
#*change #include <kuchora/GfxMgr.H> to #include <$G/common/kuchora/include/kuchora/GfxMgr.H>
#In $G/common/kuchora/HCIMgr.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/ForceNetInterface.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/Selection.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/Markers.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/AnnotationModel.H
#*change #include <kuchora/MoveMarkersHCI.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>
#In $G/common/kuchora/Shadows.H
#*change #include <kuchora/KuchoraBase.H> to #include <$G/common/kuchora/include/kuchora/KuchoraBase.H>


  *Will be expanded upon
== Setting Up and Checking Everything Out ==
 
#cd $G
#*Before performing this step define $G as your sandbox directory and define CVSROOT as your username@ssh.cs.brown.edu:/research/graphics/cvsroot/
#**An example can be found at [[Set_up_your_environment_for_diffusion_MRI_processing#Set_up_your_environment]]
#**The file which you must edit may vary on different operating systems
#cvs co common
#cvs co project
#cvs co import
#mkdir install_linux
#cd $G/import
#svn co https://svn.code.sf.net/p/vrg3d/code/ vrg3d
 
== Installing [[VRPN]] ==
 
#cd $G/import/vrpn/kit
#unzip vrpn_07_26.zip
#cd $G/import/vrpn/kit/quat
#make
#*Before performing this step
#**Edit the Makefile
#***Uncomment the line corresponding to your machine's architecture
#***Change INSTALL_DIR on line 31 from /usr/local to $G/install_linux
#make install
#cd $G/import/vrpn/kit/vrpn
#make
#*Before performing this step
#**Edit the Makefile
#***Uncomment the line corresponding to your machine's architecture
#***Change INSTALL_DIR on line 52 from /usr/local to $G/install_linux
#make install
#cd $G/import/vrpn/kit/vrpn/server_src
#make
#*Before performing this step
#**Edit the Makefile
#***Uncomment the line corresponding to your machine's architecture
#***Change INSTALL_DIR on line 29 from /usr/local to $G/install_linux
#make install
 
== Installing [[G3D]] ==
 
#cd $G/import/g3d/kit
#unzip G3D-8.01-src_cvs.zip
#cd $G/import/g3d/kit/G3D
#./buildg3d <nowiki>--</nowiki>install update
#*Before performing this step
#**Edit buildg3d
#***Change installDir on line 105 from '/usr/local' to '$G/install_linux'
#****Actually type in the directory path of $G for this
#***Comment out line 362 "<nowiki>if osx or (ice.utils.shell("locate libzip.a") == ''):</nowiki>"
#***Remove one indent from line 363
#*If you encounter an error related to usleep, a discussion of this bug can be found [https://groups.google.com/forum/#!topic/g3d-users/BwslmuzAs44 here]
#./buildg3d <nowiki>--</nowiki>install lib
 
== Configuring [[VRG3D]] ==
[http://vis.cs.brown.edu/resources/doc/VRG3D/index.html VRG3D Documentation]
#cd $G/import/vrg3d/vrg3d
#python configure.py -vrpn $G/install_linux -g3d $G/install_linux -vrg3d $G/install_linux
#*If working on a 64 bit system, edit configure.py and make the following replacements before running this command
#**lib/libSDL to lib64/libSDL
#**lib/libGLU to lib64/libGLU
#***If you're on the Brown CS system, you may have to substitute /lib with /lib/x86_64-linux-gnu
#make allclean
#make all
#make install
 
== Installing [[MMotion]] ==
 
#cd $G/common/MMotion
#make
#*If you get an error with this command edit the $G/common/build/make/compile.gcc.local.make
#**Comment out $(GCC2_SUFFIX) on lines 50 - 53
#**Comment out $(GCC3_SUFFIX) on lines 64 - 67
#**Comment out $(GCC4_SUFFIX) on lines 90 - 93
#**Comment out $(GCCX_SUFFIX) on lines 104 - 107
#*If the environment variable GARCH is not set, set it, or you will be prompted to do so
#make install
 
== Installing Common [[Kuchora]] Packages ==
 
#cd $G/common/kuchora
#make
#*Before performing this step the second time
#**Edit $G/common/kuchora/base/KuchoraBaseApp.H and make the following replacements before running this command:
#***"_camera" to "_cameras[0]" on line 42
#make install
 
== Installing [[CavePainting]] ==
 
#cd $G/project/kuchora/cavepainting
#make
#*If you get an error about missing -lGLG3D
#**Change "$(G_IMPORT)/g3d/g3d_8_$(G_COMPILER)" in $G/common/build/make/g3d.make on line 20 and "$(G_IMPORT)/g3d/g3d_8.01_$(G_COMPILER)_64" on line 17 to "$(G)/install_linux"
#*If you get an error about missing -lvrg3d:
#**Substitute lib64 with lib on line 18 of $G/common/build/make/vrg3d.make.  The sed command 's/lib64/lib/g' should fix this.
#make install
 
== Allowing [[CavePainting]] to be Executed ==
 
#cd $G/project/kuchora/cavepainting
#chmod 775 run
 
== Moving Files and Creating Symbolic Links to Work With Directory Structure ==
 
#mkdir $G/project/kuchora/apps/
#cd $G/project/kuchora/apps/
#mv $G/project/kuchora/cavepainting/ $G/project/kuchora/apps/cavepainting
#cd $G/project/kuchora/
#ln -s $G/project/kuchora/apps/cavepainting/ cavepainting
#cd $G/project/kuchora/
#ln -s $G/common/kuchora/data/ kdata
#mkdir $G/lib/
#mkdir $G/lib/kuchora/
#cd $G/lib/kuchora/
#ln -s $G/project/kuchora/kdata/images/ images
#cd $G/lib/kuchora/
#ln -s $G/project/kuchora/kdata/fonts/ fonts
 
== Running [[CavePainting]] in Desktop Mode ==
 
[[Image:Screenshot from 2012-07-10 11_25_58.png|right|thumb|CavePainting Running in Desktop Mode]]
#cd $G/project/kuchora/apps/cavepainting
#./run desktop
 
[[Category:CavePainting]][[Category:Software]][[Category:Art and Visualization]][[Category:CavePainting HOWTO]]

Latest revision as of 03:31, 17 December 2013

Currently, this has only been tested and shown to work on the CCV test curved wall at 94 Waterman.

Setting Up and Checking Everything Out

  1. cd $G
  2. cvs co common
  3. cvs co project
  4. cvs co import
  5. mkdir install_linux
  6. cd $G/import
  7. svn co https://svn.code.sf.net/p/vrg3d/code/ vrg3d

Installing VRPN

  1. cd $G/import/vrpn/kit
  2. unzip vrpn_07_26.zip
  3. cd $G/import/vrpn/kit/quat
  4. make
    • Before performing this step
      • Edit the Makefile
        • Uncomment the line corresponding to your machine's architecture
        • Change INSTALL_DIR on line 31 from /usr/local to $G/install_linux
  5. make install
  6. cd $G/import/vrpn/kit/vrpn
  7. make
    • Before performing this step
      • Edit the Makefile
        • Uncomment the line corresponding to your machine's architecture
        • Change INSTALL_DIR on line 52 from /usr/local to $G/install_linux
  8. make install
  9. cd $G/import/vrpn/kit/vrpn/server_src
  10. make
    • Before performing this step
      • Edit the Makefile
        • Uncomment the line corresponding to your machine's architecture
        • Change INSTALL_DIR on line 29 from /usr/local to $G/install_linux
  11. make install

Installing G3D

  1. cd $G/import/g3d/kit
  2. unzip G3D-8.01-src_cvs.zip
  3. cd $G/import/g3d/kit/G3D
  4. ./buildg3d --install update
    • Before performing this step
      • Edit buildg3d
        • Change installDir on line 105 from '/usr/local' to '$G/install_linux'
          • Actually type in the directory path of $G for this
        • Comment out line 362 "if osx or (ice.utils.shell("locate libzip.a") == ''):"
        • Remove one indent from line 363
    • If you encounter an error related to usleep, a discussion of this bug can be found here
  5. ./buildg3d --install lib

Configuring VRG3D

VRG3D Documentation

  1. cd $G/import/vrg3d/vrg3d
  2. python configure.py -vrpn $G/install_linux -g3d $G/install_linux -vrg3d $G/install_linux
    • If working on a 64 bit system, edit configure.py and make the following replacements before running this command
      • lib/libSDL to lib64/libSDL
      • lib/libGLU to lib64/libGLU
        • If you're on the Brown CS system, you may have to substitute /lib with /lib/x86_64-linux-gnu
  3. make allclean
  4. make all
  5. make install

Installing MMotion

  1. cd $G/common/MMotion
  2. make
    • If you get an error with this command edit the $G/common/build/make/compile.gcc.local.make
      • Comment out $(GCC2_SUFFIX) on lines 50 - 53
      • Comment out $(GCC3_SUFFIX) on lines 64 - 67
      • Comment out $(GCC4_SUFFIX) on lines 90 - 93
      • Comment out $(GCCX_SUFFIX) on lines 104 - 107
    • If the environment variable GARCH is not set, set it, or you will be prompted to do so
  3. make install

Installing Common Kuchora Packages

  1. cd $G/common/kuchora
  2. make
    • Before performing this step the second time
      • Edit $G/common/kuchora/base/KuchoraBaseApp.H and make the following replacements before running this command:
        • "_camera" to "_cameras[0]" on line 42
  3. make install

Installing CavePainting

  1. cd $G/project/kuchora/cavepainting
  2. make
    • If you get an error about missing -lGLG3D
      • Change "$(G_IMPORT)/g3d/g3d_8_$(G_COMPILER)" in $G/common/build/make/g3d.make on line 20 and "$(G_IMPORT)/g3d/g3d_8.01_$(G_COMPILER)_64" on line 17 to "$(G)/install_linux"
    • If you get an error about missing -lvrg3d:
      • Substitute lib64 with lib on line 18 of $G/common/build/make/vrg3d.make. The sed command 's/lib64/lib/g' should fix this.
  3. make install

Allowing CavePainting to be Executed

  1. cd $G/project/kuchora/cavepainting
  2. chmod 775 run

Moving Files and Creating Symbolic Links to Work With Directory Structure

  1. mkdir $G/project/kuchora/apps/
  2. cd $G/project/kuchora/apps/
  3. mv $G/project/kuchora/cavepainting/ $G/project/kuchora/apps/cavepainting
  4. cd $G/project/kuchora/
  5. ln -s $G/project/kuchora/apps/cavepainting/ cavepainting
  6. cd $G/project/kuchora/
  7. ln -s $G/common/kuchora/data/ kdata
  8. mkdir $G/lib/
  9. mkdir $G/lib/kuchora/
  10. cd $G/lib/kuchora/
  11. ln -s $G/project/kuchora/kdata/images/ images
  12. cd $G/lib/kuchora/
  13. ln -s $G/project/kuchora/kdata/fonts/ fonts

Running CavePainting in Desktop Mode

Error creating thumbnail: /bin/bash: line 1: /usr/bin/convert: No such file or directory Error code: 127
CavePainting Running in Desktop Mode
  1. cd $G/project/kuchora/apps/cavepainting
  2. ./run desktop