Commit de6aaff2 authored by Andrew Caudwell's avatar Andrew Caudwell

New upstream version 0.49

parent 1b4f0ff0
0.49:
* Fixed compatibility with GLM 0.9.9.0.
0.48:
* Can now generate logs from git sub module directories.
0.47:
* Fixed low mouse movement speed with some mice while repositioning camera.
......
......@@ -27,8 +27,6 @@ Optional:
SDL Image 2.0 needs to have been built with support PNG and JPEG images.
GLM is a header only library that you can get from http://glm.g-truc.net/ if your distribution does not include it.
2. Building
===========
......@@ -65,8 +63,8 @@ If you already have these fonts, you can configure Gource to use them with:
./configure --enable-ttf-font-dir=/path/to/freefont/
Gource includes a copy of the TinyXML library. To make Gource build against
the system library of TinyXML use:
Gource includes a copy of TinyXML. To build against the system version of the
library use:
./configure --with-tinyxml
......@@ -34,7 +34,7 @@ card to run.
3. Using Gource
===============
gource <options> <path>
gource [options] [path]
options:
......@@ -66,7 +66,7 @@ options:
--transparent
Make the background transparent. Only really useful for screenshots.
--start-date 'YYYY-MM-DD hh:mm:ss +tz'
--start-date "YYYY-MM-DD hh:mm:ss +tz"
Start with the first entry after the supplied date and optional time.
If a time zone offset isn't specified the local time zone is used.
......@@ -77,7 +77,7 @@ options:
"2012-06-30 12:00"
"2012-06-30 12:00:00 +12"
--stop-date 'YYYY-MM-DD hh:mm:ss +tz'
--stop-date "YYYY-MM-DD hh:mm:ss +tz"
Stop after the last entry prior to the supplied date and optional time.
Uses the same format as --start-date.
......@@ -188,17 +188,17 @@ options:
Show filename extensions only.
--file-filter REGEX
Filter out any files matching a specified regular expression.
Filter out file paths matching the specified regular expression.
--file-show-filter REGEX
Show only files matching this regular expression.
Show only file paths matching the specified regular expression.
--user-filter REGEX
Filter out any users matching a specified regular expression.
Filter usernames matching the specified regular expression.
--user-image-dir DIRECTORY
Directory containing .jpg or .png images of users
(eg 'Full Name.png') to use as avatars.
(eg "Full Name.png") to use as avatars.
--default-user-image IMAGE
Path of .jpg or .png to use as the default user image.
......@@ -264,7 +264,7 @@ options:
users - user avatars
usernames - names of users
Separate multiple elements with commas (eg 'mouse,progress')
Separate multiple elements with commas (eg "mouse,progress")
--hash-seed SEED
Change the seed of hash function.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
AC_PREREQ(2.61)
AC_INIT(Gource, 0.47, [acaudwell@gmail.com])
AC_INIT(Gource, 0.49, [acaudwell@gmail.com])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/main.h])
AM_INIT_AUTOMAKE([dist-bzip2 foreign subdir-objects])
......@@ -53,14 +53,13 @@ AX_BOOST_FILESYSTEM
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LIBS="$LIBS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB"
#GLM
AC_CHECK_HEADER([glm/glm.hpp],, AC_MSG_ERROR(GLM headers are required. Please see INSTALL))
#see if ttf-font-dir option is enabled
AC_ARG_ENABLE(ttf-font-dir,[AS_HELP_STRING([--enable-ttf-font-dir=DIR],[directory containing GNU FreeFont TTF fonts])],[gourcefontdir="$enableval"],[gourcefontdir=""])
AM_CONDITIONAL([FONTDIR], [test "x$gourcefontdir" != "x"])
AC_SUBST(gourcefontdir)
#GLM
AC_CHECK_HEADER([glm/glm.hpp],, AC_MSG_ERROR(GLM headers are required. Please see INSTALL))
#see if building against system TinyXML library
use_tinyxml_system_library=no
......
......@@ -3,7 +3,7 @@
Gource - a software version control visualization
.SH SYNOPSIS
\fIgource\fR
<options> <path>
[options] [path]
.SH DESCRIPTION
\fIgource\fR is an OpenGL-based 3D visualisation tool for source control repositories.
......@@ -36,7 +36,7 @@ Frameless window.
\fB\-\-transparent\fR
Make the background transparent. Only really useful for screenshots.
.TP
\fB\-\-start\-date 'YYYY\-MM\-DD hh:mm:ss +tz'\fR
\fB\-\-start\-date "YYYY\-MM\-DD hh:mm:ss +tz"\fR
Start with the first entry after the supplied date and optional time.
If a time zone offset isn't specified the local time zone is used.
......@@ -47,7 +47,7 @@ Example accepted formats:
"2012-06-30 12:00"
"2012-06-30 12:00:00 +12"
.TP
\fB\-\-stop\-date 'YYYY\-MM\-DD hh:mm:ss +tz'\fR
\fB\-\-stop\-date "YYYY\-MM\-DD hh:mm:ss +tz"\fR
Stop at the last entry prior to the supplied date and optional time.
Uses the same format as \-\-start\-date.
......@@ -155,16 +155,16 @@ Duration to keep filenames on screen (>= 2.0).
Show filename extensions only.
.TP
\fB\-\-file\-filter REGEX\fR
Filter out any files matching a specified regular expression.
Filter out file paths matching the specified regular expression.
.TP
\fB\-\-file\-show\-filter REGEX\fR
Show only files matching this regular expression.
Show only file paths matching the specified regular expression.
.TP
\fB\-\-user\-filter REGEX\fR
Filter out any usernames matching a specified regular expression.
Filter usernames matching the specified regular expression.
.TP
\fB\-\-user\-image\-dir DIRECTORY\fR
Directory containing .jpg or .png images of users (eg 'Full Name.png') to use as avatars.
Directory containing .jpg or .png images of users (eg "Full Name.png") to use as avatars.
.TP
\fB\-\-default\-user\-image IMAGE\fR
Path of .jpg to use as the default user image.
......@@ -226,7 +226,7 @@ Hide one or more display elements from the list below:
users \- user avatars
usernames \- names of users
Separate multiple elements with commas (eg 'mouse,progress')
Separate multiple elements with commas (eg "mouse,progress")
.TP
\fB\-\-hash\-seed SEED\fR
......
This diff is collapsed.
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
# https://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
# ===========================================================================
#
# SYNOPSIS
......@@ -31,7 +31,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 26
#serial 27
AC_DEFUN([AX_BOOST_FILESYSTEM],
[
......
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
# https://www.gnu.org/software/autoconf-archive/ax_boost_system.html
# ===========================================================================
#
# SYNOPSIS
......@@ -31,7 +31,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 17
#serial 19
AC_DEFUN([AX_BOOST_SYSTEM],
[
......@@ -68,9 +68,10 @@ AC_DEFUN([AX_BOOST_SYSTEM],
ax_cv_boost_system,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
CXXFLAGS=
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
[[boost::system::system_category]])],
[[boost::system::error_category *a = 0;]])],
ax_cv_boost_system=yes, ax_cv_boost_system=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
......
......@@ -63,19 +63,19 @@ FXGlyph::FXGlyph(FXGlyphSet* set, unsigned int chr) {
this->chr = chr;
this->ftglyph = 0;
FT_Face ftface = set->getFTFace();
FT_Face ft_face = set->getFTFace();
FT_UInt index = FT_Get_Char_Index( ftface, chr );
FT_UInt index = FT_Get_Char_Index( ft_face, chr );
//debugLog("FXGlyph %x %d %d", chr, chr, index);
if(FT_Load_Glyph( ftface, index, FT_LOAD_DEFAULT ))
throw FXFontException(ftface->family_name);
if(FT_Load_Glyph( ft_face, index, set->getFlags()))
throw FXFontException(ft_face->family_name);
if(FT_Get_Glyph( ftface->glyph, &ftglyph ))
throw FXFontException(ftface->family_name);
if(FT_Get_Glyph( ft_face->glyph, &ftglyph ))
throw FXFontException(ft_face->family_name);
FT_Glyph_Metrics *metrics = &ftface->glyph->metrics;
FT_Glyph_Metrics *metrics = &ft_face->glyph->metrics;
height = glm::ceil(metrics->height / 64.0);
FT_Glyph_To_Bitmap( &ftglyph, FT_RENDER_MODE_NORMAL, 0, 1 );
......@@ -84,7 +84,7 @@ FXGlyph::FXGlyph(FXGlyphSet* set, unsigned int chr) {
dims = vec2( glyph_bitmap->bitmap.width, glyph_bitmap->bitmap.rows) + vec2(2.0f, 2.0f);
corner = vec2( glyph_bitmap->left, -glyph_bitmap->top) + vec2(0.5, -0.5);
advance = vec2( ftface->glyph->advance.x >> 6, ftface->glyph->advance.y >> 6);
advance = vec2( ft_face->glyph->advance.x >> 6, ft_face->glyph->advance.y >> 6);
vertex_positions[0] = vec2(0.0f, 0.0f);
vertex_positions[1] = vec2(dims.x, 0.0f);
......@@ -204,12 +204,13 @@ void FXGlyphPage::updateTexture() {
//FXGlyphSet
FXGlyphSet::FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi) {
FXGlyphSet::FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi, FT_Int32 ft_flags) {
this->freetype = freetype;
this->fontfile = fontfile;
this->size = size;
this->dpi = dpi;
this->ftface = 0;
this->ft_flags = ft_flags;
this->ft_face = 0;
this->tab_width = 4.0f;
this->max_height = 0;
......@@ -218,7 +219,7 @@ FXGlyphSet::FXGlyphSet(FT_Library freetype, const std::string& fontfile, int siz
}
FXGlyphSet::~FXGlyphSet() {
if(ftface!=0) FT_Done_Face(ftface);
if(ft_face!=0) FT_Done_Face(ft_face);
for(std::vector<FXGlyphPage*>::iterator it = pages.begin(); it != pages.end(); it++) {
delete (*it);
......@@ -233,17 +234,17 @@ FXGlyphSet::~FXGlyphSet() {
void FXGlyphSet::init() {
if(FT_New_Face(freetype, fontfile.c_str(), 0, &ftface)) {
if(FT_New_Face(freetype, fontfile.c_str(), 0, &ft_face)) {
throw FXFontException(fontfile);
}
int ft_font_size = 64 * size;
FT_Set_Char_Size( ftface, ft_font_size, ft_font_size, dpi, dpi );
FT_Set_Char_Size( ft_face, ft_font_size, ft_font_size, dpi, dpi );
double em_size = 1.0 * ftface->units_per_EM;
double em_size = 1.0 * ft_face->units_per_EM;
unit_scale = vec2( ftface->size->metrics.x_ppem / em_size, ftface->size->metrics.y_ppem / em_size);
unit_scale = vec2( ft_face->size->metrics.x_ppem / em_size, ft_face->size->metrics.y_ppem / em_size);
precache("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;:'\",<.>/?-_=+!@#$%^&*()\\ ");
}
......@@ -313,7 +314,7 @@ FXGlyph* FXGlyphSet::getGlyph(unsigned int chr) {
}
float FXGlyphSet::getMaxWidth() const {
return ftface->size->metrics.max_advance / 64.0f;
return ft_face->size->metrics.max_advance / 64.0f;
}
float FXGlyphSet::getMaxHeight() const {
......@@ -632,7 +633,7 @@ void FXFontManager::purge() {
fonts.clear();
}
FXFont FXFontManager::grab(std::string font_file, int size, int dpi) {
FXFont FXFontManager::grab(std::string font_file, int size, int dpi, FT_Int32 ft_flags) {
if(font_dir.size()>0 && font_file[0] != '/') {
font_file = font_dir + font_file;
......@@ -652,7 +653,7 @@ FXFont FXFontManager::grab(std::string font_file, int size, int dpi) {
FXGlyphSet* glyphset;
if(ft_it == sizemap->end()) {
glyphset = new FXGlyphSet(library, font_file.c_str(), size, dpi);
glyphset = new FXGlyphSet(library, font_file.c_str(), size, dpi, ft_flags);
sizemap->insert(std::pair<int,FXGlyphSet*>(size,glyphset));
} else {
glyphset = ft_it->second;
......
......@@ -127,14 +127,14 @@ public:
class FXGlyphSet {
FT_Library freetype;
FT_Face ftface;
FT_Face ft_face;
FT_Int32 ft_flags;
std::string fontfile;
int max_height;
int size;
int dpi;
float tab_width;
vec2 unit_scale;
bool pre_caching;
std::vector<FXGlyphPage*> pages;
......@@ -144,12 +144,13 @@ class FXGlyphSet {
void init();
FXGlyph* getGlyph(unsigned int chr);
public:
FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi);
FXGlyphSet(FT_Library freetype, const std::string& fontfile, int size, int dpi, FT_Int32 ft_flags);
~FXGlyphSet();
void precache(const std::string& chars);
FT_Face getFTFace() const { return ftface; }
FT_Face getFTFace() const { return ft_face; }
FT_Int32 getFlags() const { return ft_flags; }
const std::string& getFontFile() const { return fontfile; }
......@@ -251,7 +252,7 @@ public:
void commitBuffer();
void drawBuffer();
FXFont grab(std::string font_file, int size, int dpi = 72);
FXFont grab(std::string font_file, int size, int dpi = 72, FT_Int32 ft_flags = FT_LOAD_DEFAULT);
};
extern FXFontManager fontmanager;
......
......@@ -30,7 +30,12 @@
#define GLM_FORCE_RADIANS
// the following are required for compatibility with GLM 0.9.9
#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/matrix_access.hpp>
......
......@@ -77,7 +77,7 @@ BaseLog* GitCommitLog::generateLog(const std::string& dir) {
std::string gitdir = dir + std::string("/.git");
struct stat dirinfo;
int stat_rc = stat(gitdir.c_str(), &dirinfo);
if(stat_rc!=0 || !(dirinfo.st_mode & S_IFDIR)) {
if(stat_rc!=0 || !(dirinfo.st_mode & S_IFDIR || dirinfo.st_mode & S_IFREG)) {
return 0;
}
......
......@@ -45,7 +45,7 @@ void GourceSettings::help(bool extended_help) {
printf("Gource v%s\n", GOURCE_VERSION);
printf("Usage: gource [OPTIONS] [PATH]\n");
printf("Usage: gource [options] [path]\n");
printf("\nOptions:\n");
printf(" -h, --help Help\n\n");
printf(" -WIDTHxHEIGHT, --viewport Set viewport size\n");
......@@ -130,8 +130,8 @@ if(extended_help) {
printf(" --transparent Make the background transparent\n\n");
printf(" --user-filter REGEX Ignore usernames matching this regex\n");
printf(" --file-filter REGEX Ignore files matching this regex\n");
printf(" --file-show-filter REGEX Show only files matching this regex\n\n");
printf(" --file-filter REGEX Ignore file paths matching this regex\n");
printf(" --file-show-filter REGEX Show only file paths matching this regex\n\n");
printf(" --user-friction SECONDS Change the rate users slow down (default: 0.67)\n");
printf(" --user-scale SCALE Change scale of users (default: 1.0)\n");
......@@ -780,6 +780,10 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc
if(!entry->hasValue()) conffile.entryException(entry, "specify caption file (filename)");
caption_file = entry->getString();
if(!boost::filesystem::exists(caption_file)) {
conffile.entryException(entry, "caption file not found");
}
}
if((entry = gource_settings->getEntry("caption-duration")) != 0) {
......
......@@ -18,7 +18,7 @@
#ifndef GOURCE_SETTINGS_H
#define GOURCE_SETTINGS_H
#define GOURCE_VERSION "0.47"
#define GOURCE_VERSION "0.49"
#include "core/texture.h"
#include "core/settings.h"
......
......@@ -168,7 +168,7 @@ bool RLogMill::findRepository(boost::filesystem::path& dir, std::string& log_for
while(is_directory(dir)) {
if(is_directory(dir / ".git")) log_format = "git";
if(is_directory(dir / ".git") || is_regular_file(dir / ".git")) log_format = "git";
else if(is_directory(dir / ".hg")) log_format = "hg";
else if(is_directory(dir / ".bzr")) log_format = "bzr";
else if(is_directory(dir / ".svn")) log_format = "svn";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment