#!/bin/sh # --------------------------------------------------------------------------------- # Instructions for installing pd-macambira # # INTRODUCTION # # These instructions are useful for installing the AirHackTable software and # other color- and video-based controllers from lab macambira. # # AUTHORS # # Ricardo Fabbri and Gilson Beck, labmacambira.sf.net # # SEE ALSO # wiki.nosdigitais.teia.org.br/AirHackTable # # --------------------------------------------------------------------------------- # --------------------------------------------------------------------------------- # Dependencies # # You may also try the instructions and other automated config scripts for # more complete dependencies installation at # # http://wiki.nosdigitais.teia.org.br/Configuring_Ubuntu_for_Programming # sudo apt-get install -y autoconf automake libtool libfftw3-dev libsndfile1-dev liblua5.1-0-dev tcl8.5-dev swig ladspa-sdk libspeex-dev libmp3lame-dev libgl1-mesa-dev mesa-utils libglu1-mesa libglu1-mesa-dev libgsl0-dev tcllib cheese libasound2-dev libv4l-dev # Pré requisite for the official pd extended repository. We'll use a github # mirror which is faster and tested by us, but may be slightly outdated as we # may forget to sync. # # sudo apt-get install git-svn #extra dependencies for the sound - if you want jack sudo apt-get install -y qjackctl # --------------------------------------------------------------------------------- # Repositories # # Desinstale tudo que for pacote pure-data do ubuntu # sudo apt-get install synaptic # synaptic mkdir pd-repos cd pd-repos pd_repos_dir=$PWD # ----------- # Clone the pd-extended *core* repo -- a patched up but still bare pd git clone git://pure-data.git.sourceforge.net/gitroot/pure-data/pd-extended.git # ----------- # Clone pd-svn -- a complete repository of all Pd contribs to make a full pd # extended, but still w/o Gem at this point # # Clone pd-svn converted into a Git from our own LabMacambira.sf.net fork, # which is set to track the official one. You can use the official one here if # you prefer, as indicated. # # official: # git svn clone https://pure-data.svn.sourceforge.net/svnroot/pure-data/trunk pd-svn # # ours (tracks official, but is faster, has a few optional extra branches): git clone git://github.com/rfabbri/pd-macambira.git # ----------- # Clone Gem # # official (enough for most color detection applications): #git clone git://pd-gem.git.sourceforge.net/gitroot/pd-gem/Gem gem.git # # For more experimental stuff we also have our own Gem fork - not currently needed # as most of our contribs have been accepted into the official. git clone git://github.com/rfabbri/Gem.git gem.git # ****** # --------------------------------------------------------------------------------- # Link up the repositories into a full-fledged bleeding-edge pd extended build # (pd-macambira) # cd pd-macambira/ mv pd pd-original ln -s ../pd-extended pd ln -s ../gem.git Gem cd externals ln -s ../../gem.git Gem cd .. # --------------------------------------------------------------------------------- # Build (this may take a couple of hours) # # inside pd-macambira # cd packages/linux_make # PS: do not forget a make clean in case you did an update or if you get an # error. Also try make install multiple times if you get any error. make install && make package # you can use something like -j 3 if you have 2 or more cores, for parallel # compilation # --------------------------------------------------------------------------------- # Install your new & all-powerful Pd sudo dpkg -i Pd-*.deb # --------------------------------------------------------------------------------- # Finally our other repos with Pd patches, samples, and stuff # --------------------------------------------------------------------------------- # chdir into pd-repos #cd ../../../ cd $pd_repos_dir # clone AirHackTable from our dev Fefo Gorodscy git clone git://github.com/wakku/Hacktable.git hacktable cd hacktable # ----------- # you can now run/test the color detection code by opening/testing the patches # pd-extended color-detection-demo.pd # # if this works then open/test color-detection-demo-blob.pd pd-extended color-detection-demo-blob.pd # Extra-official color detection - currently just use the official, it has our # contribs. This will only work if you clone Gem from us instead of the # official. # # cd gem.git # git checkout remotes/origin/hacktable # git checkout -b hacktable # ------- # Remaining repositories git clone git://github.com/rfabbri/pd-macambira-utils.git # repositorio with diverse stuff from gilson beck (code to modulate audio samples, # audio samples themselves, etc) # gilson becks original repo - no write access at the moment # git clone /~https://github.com/gilsonbeck/beck-repo.git # we currently use rfabbri's fork git clone git://github.com/rfabbri/beck-repo.git # --------------------------------------------------------------------------------- # Updating the code # Pull the changes from the remotes. do this for each repo you want to update # git pull # Repeat the above steps if you updated any pd-extended repo or Gem # cd .. # cd pd-macambira # cd packages/linux_make # make install && make package # uninstall all the previous .debs that you had installed. You can use synaptic # for this and search for 'pd-extended' # installl the new pd-extended # sudo dpkg -i Pd-*.deb # ----------- # Easily updating only Gem (faster than the above) # sudo mv /usr/lib/pd-extended/extra/Gem /usr/lib/pd-extended/extra/Gem-original # cd ~/pd-repos/pd-macambira/externals/build/lib/pd-extended/extra/Gem # sudo ln -s $PWD /usr/lib/pd-extended/extra/Gem # make # go to pd-repos/pd-macambira/externals # cd .. # make gem_install # you may have to add your user to the video group # sudo gpasswd -a [user] video # --------------------------------------------------------------------------------- # If you want to control a video-game using our color detection algorithm # sudo apt-get install libxrt-dev # cd $pd_repos_dir # cd pd-macambira/externals/aalex # make # If this fails, then you need to either install some libs, or else disable xmms # altogether from aalex. To do this you have to edit aalex's makefile and remove # everything that has xmms in it. The modifications look like: # ## -pd_linux: pcre.pd_linux xmms.pd_linux x11mouse.pd_linux x11key.pd_linux ## +pd_linux: pcre.pd_linux x11mouse.pd_linux x11key.pd_linux ## ## .SUFFIXES: .pd_linux ## ## @@ -23,11 +23,10 @@ LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ ## -Wno-unused -Wno-parentheses -Wno-switch -fPIC ## ## LINUXINCLUDE = -I../src -L/usr/lib/X11 -I/usr/include/X11 -L/usr/X11R6/lib -I../../pd/src ## -LINUXLINKS = -lX11 -lXtst -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -lxmms ## +LINUXLINKS = -lX11 -lXtst -ldl -lXi -lXext -lX11 -lm ## ## .c.pd_linux: ## - cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c \ ## - `xmms-config --cflags` ## + cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ## ld --export-dynamic -shared -o $*.pd_linux $*.o -lpcre -lc -lm\ ## # # Once compilation works (ie, you have produced the desired Pd objects inside # aalex), now add this directory to your ~/.pdrc. Just do something like # # echo "-path $PWD" >> ~/.pdrc