Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
Created November 10, 2011 03:10
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save digitaljhelms/1354003 to your computer and use it in GitHub Desktop.
Save digitaljhelms/1354003 to your computer and use it in GitHub Desktop.
Installing and using Gource on Mac OS X (only tested on Snow Leopard)

Gource

Gource is a software version control visualization tool.

Software projects are displayed by Gource as an animated tree with the root directory of the project at its centre. Directories appear as branches with files as leaves. Developers can be seen working on the tree at the times they contributed to the project.

http://code.google.com/p/gource/

Installing Gource Manually (w/out MacPorts or Homebrew)

Install SDL

$ hg clone -u SDL-1.2 http://hg.libsdl.org/SDL SDL-1.2
$ cd SDL-1.2
$ ./autogen.sh
$ ./configure && make && sudo make install

Install SDL Image

$ hg clone -u release-1.2.10 http://hg.libsdl.org/SDL_image SDL_Image-1.2.10
$ cd SDL_Image-1.2.10
$ ./autogen.sh
$ ./configure && make && sudo make install

Install PCRE3

$ svn co svn://vcs.exim.org/pcre/code/trunk pcre
$ cd pcre
$ ./autogen.sh
$ ./configure && make && sudo make install

Install GLEW

Note: Installing from the public Git repository fails on OS X.

$ curl -L -O http://sourceforge.net/projects/glew/files/glew/1.7.0/glew-1.7.0.tgz
$ tar xvfz glew-1.7.0.tgz
$ rm glew-1.7.0.tgz
$ cd glew-1.7.0
$ make && sudo make install

Install Gource

$ git clone git://github.com/acaudwell/Gource.git
$ cd Gource
$ git co gource-0.37
$ git submodule init
$ git submodule update
$ autoreconf -f -i
$ ./configure && make && sudo make install

Usage

$ gource ./ -s 0.5 -b 000000 -1280x720

Optional Features/Installs

Install FFmpeg

This will enable outputting to video.

Yasm (requirement)

$ git clone git://github.com/yasm/yasm.git
$ cd yasm
$ git co v1.2.0
$ ./autogen.sh
$ ./configure && make && sudo make install

LAME (optional requirement)

Optional: This allows laying an audio track over the visualization.

$ curl -L -O http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.1.tar.gz
$ tar xvfz lame-3.99.1.tar.gz
$ rm lame-3.99.1.tar.gz
$ cd lame-3.99.1
$ ./configure && make && sudo make install

x264 (requirement)

$ curl -L -O ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
$ tar xvfj last_x264.tar.bz2
$ rm last_x264.tar.bz2
$ cd x264-snapshot-[datestamp]-[timestamp]
$ ./configure --enable-shared
$ make && sudo make install

Xvid (requirement)

$ curl -L -O http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
$ tar xvfz xvidcore-1.3.2.tar.gz
$ rm xvidcore-1.3.2.tar.gz
$ cd xvidcore/build/generic/
$ ./configure && make && sudo make install

FFmpeg

$ curl -L -O http://ffmpeg.org/releases/ffmpeg-0.8.6.tar.gz
$ tar xvfz ffmpeg-0.8.6.tar.gz
$ rm ffmpeg-0.8.6.tar.gz
$ cd ffmpeg-0.8.6
$ ./configure --enable-shared --enable-libmp3lame --enable-gpl --enable-libx264 --enable-libxvid
$ make && sudo make install

Note: If LAME was not installed, exclude the --enable-libmp3lame argument from the configure command.

Usage

The command below will create a video at 28fps using the x264 codec in an mp4 container with an audio track over the top -- the output will be the length of the video/audio track, whichever is longer.

$ gource ./ -s 0.5 -b 000000 -1280x720 --output-ppm-stream - | ffmpeg -y -b 3000K -r 28 -f image2pipe -vcodec ppm -i - -i audio.mp3 -vcodec libx264 -preset slow -crf 28 -threads 0 output.mp4

Note: If LAME was not installed, exclude the -i audio.mp3 argument/value from the piped ffmpeg command.

Gravatar Support

Gource supports user images; here is a Perl script that will pull images from Gravatar based on email addresses found in git-log: https://gist.github.com/1359047

Usage

$ gource --user-image-dir .git/avatar/
@johndpope
Copy link

brew install gource
works fine.

@fhorlaville
Copy link

@johndpope - some people don't use brew or macports, thank you very very much @digitaljhelms

@nelsnelson
Copy link

When installing GLEW, running sudo make install results in this:

install: mkdir /usr/include: Operation not permitted

Is there a way to specify the INSTALL_DIR, or something like that? And then also, to configure Gource to know where to look for the GLEW stuff?

Copy link

ghost commented Mar 27, 2016

For GLEW, I edited Makefile and changed GLEW_PREFIX and GLEW_DEST to

GLEW_PREFIX ?= /usr/local
GLEW_DEST ?= /usr/local

(line 43)

then ran sudo make install again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment