From acc9b43377f93302cc67b87a571788184cbf7393 Mon Sep 17 00:00:00 2001 From: Seth Berrier Date: Sat, 29 Apr 2017 12:42:35 -0500 Subject: [PATCH 01/38] New CL options to customize title independent of date - New CL option to set title size/color separate from date - New CL option to swap position of date and title - Tweaked the y position calc of top-center/bottom-left text - New CL options to adjust y position of date or title Changes to be committed: modified: src/gource.cpp modified: src/gource.h modified: src/gource_settings.cpp modified: src/gource_settings.h --- src/gource.cpp | 37 +++++++++++++++++--- src/gource.h | 3 +- src/gource_settings.cpp | 76 ++++++++++++++++++++++++++++++++++++++--- src/gource_settings.h | 10 +++++- 4 files changed, 116 insertions(+), 10 deletions(-) diff --git a/src/gource.cpp b/src/gource.cpp index 15303464..bdce9b0f 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -44,6 +44,19 @@ Gource::Gource(FrameExporter* exporter) { fontmedium.dropShadow(true); fontmedium.roundCoordinates(false); + int title_size = (gGourceSettings.title_font_size>0?gGourceSettings.title_font_size:gGourceSettings.font_size); + fonttitle = fontmanager.grab("FreeSans.ttf", title_size); + fonttitle.dropShadow(true); + fonttitle.roundCoordinates(false); + fonttitle.alignTop(false); + + // Fall back to generic font color if title font color was not set + if(gGourceSettings.title_font_colour.x < 0) { + gGourceSettings.title_font_colour = gGourceSettings.font_colour; + } + + title_x_offset = (int) fonttitle.getWidth(gGourceSettings.title) * 0.5; + fontcaption = fontmanager.grab("FreeSans.ttf", gGourceSettings.caption_size); fontcaption.dropShadow(true); fontcaption.roundCoordinates(false); @@ -2591,13 +2604,29 @@ void Gource::draw(float t, float dt) { fontmedium.setColour(vec4(gGourceSettings.font_colour, 1.0f)); if(!gGourceSettings.hide_date) { - fontmedium.draw(display.width/2 - date_x_offset, 20, displaydate); + int x, y; + if(gGourceSettings.swap_title_and_date) { + x = 10; + y = display.height + fontmedium.getDescender() - 10 - gGourceSettings.date_height_pad; + } else { + x = display.width/2 - date_x_offset; + y = fontmedium.getAscender() + 10 + gGourceSettings.date_height_pad; + } + fontmedium.draw(x, y, displaydate); } + fonttitle.setColour(vec4(gGourceSettings.title_font_colour, 1.0f)); + if(!gGourceSettings.title.empty()) { - fontmedium.alignTop(false); - fontmedium.draw(10, display.height - 10, gGourceSettings.title); - fontmedium.alignTop(true); + int x, y; + if(gGourceSettings.swap_title_and_date) { + x = display.width/2 - title_x_offset; + y = fonttitle.getAscender() + 10 + gGourceSettings.title_height_pad; + } else { + x = 10; + y = display.height + fonttitle.getDescender() - 10 - gGourceSettings.title_height_pad; + } + fonttitle.draw(x, y, gGourceSettings.title); } for(std::list::iterator it = active_captions.begin(); it!=active_captions.end(); it++) { diff --git a/src/gource.h b/src/gource.h index b5a5345b..646dffd4 100644 --- a/src/gource.h +++ b/src/gource.h @@ -117,6 +117,7 @@ class Gource : public SDLApp { std::string displaydate; int date_x_offset; + int title_x_offset; TextureResource* bloomtex; TextureResource* beamtex; @@ -132,7 +133,7 @@ class Gource : public SDLApp { TextBox textbox; - FXFont font, fontlarge, fontmedium, fontcaption; + FXFont font, fontlarge, fontmedium, fonttitle, fontcaption; bool first_read; bool paused; diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 2ff54a6f..27ff718b 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -114,6 +114,14 @@ if(extended_help) { printf(" --font-size SIZE Font size used by date and title\n"); printf(" --font-colour FFFFFF Font colour used by date and title in hex\n\n"); + printf(" --title-size SIZE Font size used by title (overrides font-size)\n"); + printf(" --title-colour FFFFFF Font colour used by title in hex (overrides font-colour)\n\n"); + + printf(" --date-height-pad SIZE Pad the date position in the y-dimension\n"); + printf(" --title-height-pad SIZE Pad the title position in the y-dimension\n\n"); + + printf(" --swap-title-and-date Exchange the posiiton of the title and date\n\n"); + printf(" --file-extensions Show filename extensions only\n\n"); printf(" --git-branch Get the git log of a particular branch\n\n"); @@ -247,6 +255,7 @@ GourceSettings::GourceSettings() { arg_types["key"] = "bool"; arg_types["ffp"] = "bool"; + arg_types["swap-title-and-date"] = "bool"; arg_types["disable-auto-rotate"] = "bool"; arg_types["disable-auto-skip"] = "bool"; @@ -268,9 +277,13 @@ GourceSettings::GourceSettings() { arg_types["padding"] = "float"; arg_types["time-scale"] = "float"; - arg_types["max-files"] = "int"; - arg_types["font-size"] = "int"; - arg_types["hash-seed"] = "int"; + arg_types["max-files"] = "int"; + arg_types["font-size"] = "int"; + arg_types["title-size"] = "int"; + arg_types["hash-seed"] = "int"; + + arg_types["date-height-pad"] = "int"; + arg_types["title-height-pad"] = "int"; arg_types["user-filter"] = "multi-value"; arg_types["follow-user"] = "multi-value"; @@ -307,6 +320,7 @@ GourceSettings::GourceSettings() { arg_types["camera-mode"] = "string"; arg_types["title"] = "string"; arg_types["font-colour"] = "string"; + arg_types["title-colour"] = "string"; arg_types["highlight-colour"] = "string"; arg_types["selection-colour"] = "string"; arg_types["dir-colour"] = "string"; @@ -398,6 +412,13 @@ void GourceSettings::setGourceDefaults() { highlight_colour = vec3(1.0f); selection_colour = vec3(1.0, 1.0, 0.3f); + title_font_size = -1; + title_font_colour = vec3(-1.0f); + swap_title_and_date = false; + + date_height_pad = 0; + title_height_pad = 0; + dir_name_depth = 0; elasticity = 0.0f; @@ -440,7 +461,7 @@ void GourceSettings::setGourceDefaults() { //delete file whitelists for(std::vector::iterator it = file_show_filters.begin(); it != file_show_filters.end(); it++) { delete (*it); - } + } file_show_filters.clear(); file_extensions = false; @@ -635,6 +656,10 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc date_format = entry->getString(); } + if(gource_settings->getBool("swap-title-and-date")) { + swap_title_and_date=true; + } + if(gource_settings->getBool("disable-auto-rotate")) { disable_auto_rotate=true; } @@ -900,6 +925,31 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc } } + if((entry = gource_settings->getEntry("title-size")) != 0) { + + if(!entry->hasValue()) conffile.entryException(entry, "specify title font size"); + + title_font_size = entry->getInt(); + + if(title_font_size<1 || title_font_size>100) { + conffile.invalidValueException(entry); + } + } + + if((entry = gource_settings->getEntry("date-height-pad")) != 0) { + + if(!entry->hasValue()) conffile.entryException(entry, "specify date height padding size"); + + date_height_pad = entry->getInt(); + } + + if((entry = gource_settings->getEntry("title-height-pad")) != 0) { + + if(!entry->hasValue()) conffile.entryException(entry, "specify title height padding size"); + + title_height_pad = entry->getInt(); + } + if((entry = gource_settings->getEntry("hash-seed")) != 0) { if(!entry->hasValue()) conffile.entryException(entry, "specify hash seed (integer)"); @@ -925,6 +975,24 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc } } + if((entry = gource_settings->getEntry("title-colour")) != 0) { + + if(!entry->hasValue()) conffile.entryException(entry, "specify title font colour (FFFFFF)"); + + int r,g,b; + + std::string colstring = entry->getString(); + + if(entry->isVec3()) { + title_font_colour = entry->getVec3(); + } else if(colstring.size()==6 && sscanf(colstring.c_str(), "%02x%02x%02x", &r, &g, &b) == 3) { + title_font_colour = vec3(r,g,b); + title_font_colour /= 255.0f; + } else { + conffile.invalidValueException(entry); + } + } + if((entry = gource_settings->getEntry("background-colour")) != 0) { if(!entry->hasValue()) conffile.entryException(entry, "specify background colour (FFFFFF)"); diff --git a/src/gource_settings.h b/src/gource_settings.h index 050166ae..0f515d89 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -102,6 +102,14 @@ class GourceSettings : public SDLAppSettings { int font_size; vec3 font_colour; + int title_font_size; + vec3 title_font_colour; + + int date_height_pad; + int title_height_pad; + + bool swap_title_and_date; + float elasticity; std::string git_branch; @@ -148,7 +156,7 @@ class GourceSettings : public SDLAppSettings { TextureResource* file_graphic; int log_level; - + GourceSettings(); void setGourceDefaults(); From 07250b9018259d7adba48afcaf6e1bfa52522044 Mon Sep 17 00:00:00 2001 From: Seth Berrier Date: Sat, 29 Apr 2017 13:19:20 -0500 Subject: [PATCH 02/38] Added CL option aliases for American spelling of color --- src/gource_settings.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 27ff718b..b967889c 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -214,6 +214,17 @@ GourceSettings::GourceSettings() { arg_aliases["disable-progress"] = "hide-progress"; arg_aliases["highlight-all-users"] = "highlight-users"; + //american spelling of colour (color) + arg_aliases["color-images"] = "colour-images"; + arg_aliases["background-color"] = "background-colour"; + arg_aliases["font-color"] = "font-colour"; + arg_aliases["title-color"] = "title-colour"; + arg_aliases["highlight-color"] = "highlight-colour"; + arg_aliases["selection-color"] = "selection-colour"; + arg_aliases["dir-color"] = "dir-colour"; + arg_aliases["caption-color"] = "caption-colour"; + arg_aliases["filename-color"] = "filename-colour"; + //command line only options conf_sections["help"] = "command-line"; conf_sections["extended-help"] = "command-line"; From c16ac0a7014a437b26d11bc58e7cb4f2ab6b6adf Mon Sep 17 00:00:00 2001 From: Seth Berrier Date: Sat, 29 Apr 2017 13:27:11 -0500 Subject: [PATCH 03/38] Updated README to document new command line options. --- README | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/README b/README index 6b68db81..15a7cb3e 100644 --- a/README +++ b/README @@ -110,7 +110,7 @@ options: -e, --elasticity FLOAT Elasticity of nodes. - -b, --background-colour FFFFFF + -b, --background, --background-colour, --background-color FFFFFF Background colour in hex. --background-image IMAGE @@ -128,9 +128,21 @@ options: --font-size SIZE Font size used by the date and title. - --font-colour FFFFFF + --title-size SIZE + Font size used by just the title. + + --font-colour, --font-color FFFFFF Font colour used by the date and title in hex. + --title-colour, --title-color FFFFFF + Font colour used by just the title in hex. + + --date-height-pad VALUE + Value to add to the y position of the date. + + --title-height-pad VALUE + Value to add to the y position of the title. + --key Show file extension key. @@ -160,16 +172,16 @@ options: --highlight-users Highlight the names of all users. - --highlight-colour FFFFFF + --highlight-colour, --highlight-color FFFFFF Font colour for highlighted users in hex. - --selection-colour FFFFFF + --selection-colour, --selection-color FFFFFF Font colour for selected users and files. - --filename-colour FFFFFF + --filename-colour, --filename-color FFFFFF Font colour for filenames. - --dir-colour FFFFFF + --dir-colour, --dir-color FFFFFF Font colour for directories. --dir-name-depth DEPTH @@ -197,7 +209,7 @@ options: --default-user-image IMAGE Path of .jpg or .png to use as the default user image. - --colour-images + --colour-images, --color-images Colourize user images. --crop AXIS @@ -269,7 +281,7 @@ options: --caption-size SIZE Caption size. - --caption-colour FFFFFF + --caption-colour, --caption-color FFFFFF Caption colour in hex. --caption-duration SECONDS From 9b6d252c08c94c44187b69a5eccbc52dce892218 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 13 Dec 2017 17:04:45 +1300 Subject: [PATCH 04/38] Added error message if the caption file isn't found. --- src/gource_settings.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index c9bae398..f43b5add 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -816,6 +816,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) { From cbd0a010f2a23ee45a1f68dac3e2976d2a632b39 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Fri, 9 Feb 2018 14:15:05 +1300 Subject: [PATCH 05/38] Fixed building with GLM 0.9.9. --- ChangeLog | 1 + src/core | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2c56a69c..b3b627d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 0.48: * Can now generate logs from git sub module directories. + * Fixed building with GLM 0.9.9. 0.47: * Fixed low mouse movement speed with some mice while repositioning camera. diff --git a/src/core b/src/core index 683d98ba..e4d42db0 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 683d98ba22965e45cb1c26329caee1eebcb3b7c4 +Subproject commit e4d42db04ffe44f15a1911d346cd30848439f8bc From c90512f67859dadec3dab456d29897d3507bfe73 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 13 Feb 2018 15:49:57 +1300 Subject: [PATCH 06/38] Clarify that file filters are apply to the full path of the file. --- README | 6 +++--- data/gource.1 | 6 +++--- src/gource_settings.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README b/README index 1c17771c..865bc080 100644 --- a/README +++ b/README @@ -200,13 +200,13 @@ 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 diff --git a/data/gource.1 b/data/gource.1 index 43c00a0c..8d5906df 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -155,13 +155,13 @@ 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. diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index f43b5add..6b647056 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -138,8 +138,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"); From c826856221be6209bbcd1c8874fc36803cdd150c Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 20 Feb 2018 17:29:11 +1300 Subject: [PATCH 07/38] Added error if you try to build with GLM 0.9.9. Unfortunately on further testing with GLM 0.9.9 (which is in alpha) it was found to be unstable due to a change to the library removing default constructors of vectors, resulting in uninitialized values being used. The current release of GLM 0.9.8 is fine. --- ChangeLog | 1 - src/core | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3b627d9..2c56a69c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,5 @@ 0.48: * Can now generate logs from git sub module directories. - * Fixed building with GLM 0.9.9. 0.47: * Fixed low mouse movement speed with some mice while repositioning camera. diff --git a/src/core b/src/core index e4d42db0..e08cb918 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit e4d42db04ffe44f15a1911d346cd30848439f8bc +Subproject commit e08cb918a97f6687d5b47ed9f71afbf6ceb45bc0 From 5035a61e10f6ab66415ffd288fe129f602ba0896 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 20 Mar 2018 17:27:51 +1300 Subject: [PATCH 08/38] Use built-in GLM version to fix compatibility issues (dependency removed). The current GLM 0.9.9 pre-release alpha contains a change removing the default initialization of vectors with no way of getting the old behavior. This issue is compounded by Debian (and now Ubuntu) packaging this version of GLM despite it being an alpha and not backwards compatible. I expect a lot of other software will be affected by this decision as well. For the time being I have decided to use a fixed version of GLM 0.9.8.5 including a fix to compile with minor versions of GCC >= 7.3 which has not been included in an official release yet. --- ChangeLog | 3 +++ INSTALL | 3 --- Makefile.am | 2 +- autogen.sh | 2 +- configure.ac | 5 +---- src/core | 2 +- src/gource_settings.h | 2 +- 7 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c56a69c..8f020f40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +0.49: + * Use built-in GLM version to fix compatibility issues (dependency removed). + 0.48: * Can now generate logs from git sub module directories. diff --git a/INSTALL b/INSTALL index 44fb9484..5c500517 100644 --- a/INSTALL +++ b/INSTALL @@ -17,7 +17,6 @@ Gource requires the following libraries to compile (package names may vary): PCRE (libpcre3-dev) Freetype 2 (libfreetype6-dev) GLEW (libglew-dev) - GLM >= 0.9.3 (libglm-dev) Boost Filesystem >= 1.46 (libboost-filesystem-dev) PNG >= 1.2 (libpng12-dev) @@ -27,8 +26,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 =========== diff --git a/Makefile.am b/Makefile.am index 100a5827..94b14e34 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,7 +55,7 @@ gource_SOURCES = \ src/user.cpp \ src/zoomcamera.cpp -AM_CPPFLAGS = -DSDLAPP_RESOURCE_DIR=\"$(pkgdatadir)\" +AM_CPPFLAGS = -I src/core/glm -DSDLAPP_RESOURCE_DIR=\"$(pkgdatadir)\" dist_pkgdata_DATA = data/beam.png data/bloom.tga data/bloom_alpha.tga data/file.png data/user.png data/gource.style diff --git a/autogen.sh b/autogen.sh index 3d0738a5..3b797f66 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,7 @@ if (autoreconf -f -i) ; then echo "Initializing submodules..." if (git submodule init) ; then echo "Updating submodules..." - if (git submodule update) ; then + if (git submodule update --recursive) ; then echo "Run './configure && make' to continue." else echo "Error: could not update submodules!" diff --git a/configure.ac b/configure.ac index 0f966ffd..8cb1e799 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.61) -AC_INIT(Gource, 0.48, [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,9 +53,6 @@ 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"]) diff --git a/src/core b/src/core index e08cb918..eff33395 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit e08cb918a97f6687d5b47ed9f71afbf6ceb45bc0 +Subproject commit eff33395b84ce6660f596b3f52549ae50969d4fc diff --git a/src/gource_settings.h b/src/gource_settings.h index 2fa75c38..b2378a85 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -18,7 +18,7 @@ #ifndef GOURCE_SETTINGS_H #define GOURCE_SETTINGS_H -#define GOURCE_VERSION "0.48" +#define GOURCE_VERSION "0.49" #include "core/texture.h" #include "core/settings.h" From 51da89112ef1011e27e73dc5fa9b28e5e2ef2b6e Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 21 Mar 2018 10:52:46 +1300 Subject: [PATCH 09/38] Re-add GLM check to look for src/core/glm/glm/glm.hpp. Add src/core/glm to tarball. --- configure.ac | 2 ++ dev/bin/build_tar.pl | 1 + 2 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 8cb1e799..13ceb341 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,8 @@ AC_ARG_ENABLE(ttf-font-dir,[AS_HELP_STRING([--enable-ttf-font-dir=DIR],[director AM_CONDITIONAL([FONTDIR], [test "x$gourcefontdir" != "x"]) AC_SUBST(gourcefontdir) +#GLM +AC_CHECK_FILE(src/core/glm/glm/glm.hpp,, AC_MSG_ERROR(src/core/glm submodule not found. Please re-install or run ./autogen.sh)) #see if building against system TinyXML library use_tinyxml_system_library=no diff --git a/dev/bin/build_tar.pl b/dev/bin/build_tar.pl index 1161f7a1..113e4e75 100755 --- a/dev/bin/build_tar.pl +++ b/dev/bin/build_tar.pl @@ -58,6 +58,7 @@ sub gource_version { qr{^/m4/.+\.m4$}, qr{^/configure(?:\.ac)?$}, qr{^/src/.+\.(?:cpp|h|cc|hh)$}, + qr{^/src/core/glm/.+$}, qr{^/data/file\.png$}, qr{^/data/user\.png$}, qr{^/data/beam\.png$}, From 43571a3bec226cf97b0dce13b6fd6e75e6e9ab7b Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 21 Mar 2018 23:12:19 +1300 Subject: [PATCH 10/38] Added --init to help make sure the glm submodule gets checked out. --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 3b797f66..5867a668 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,7 @@ if (autoreconf -f -i) ; then echo "Initializing submodules..." if (git submodule init) ; then echo "Updating submodules..." - if (git submodule update --recursive) ; then + if (git submodule update --init --recursive) ; then echo "Run './configure && make' to continue." else echo "Error: could not update submodules!" From 712fd4ed9090edbff0e93763878e46e68595cf67 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Thu, 22 Mar 2018 10:44:38 +1300 Subject: [PATCH 11/38] Use double rather than single quotes as they are more widely compatible. --- README | 8 ++++---- data/gource.1 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README b/README index 865bc080..2d44aa46 100644 --- a/README +++ b/README @@ -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. @@ -210,7 +210,7 @@ options: --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. @@ -276,7 +276,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. diff --git a/data/gource.1 b/data/gource.1 index 8d5906df..687377be 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -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. @@ -164,7 +164,7 @@ Show only file paths matching the 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 From 8c9159902c5909945cfe3dda39e3fdc4ff24226a Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Thu, 22 Mar 2018 11:14:39 +1300 Subject: [PATCH 12/38] Updated boost macros. --- m4/ax_boost_base.m4 | 247 +++++++++++++++++++++----------------- m4/ax_boost_filesystem.m4 | 4 +- m4/ax_boost_system.m4 | 7 +- 3 files changed, 144 insertions(+), 114 deletions(-) diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 8e6ee9a9..2bce5194 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html +# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html # =========================================================================== # # SYNOPSIS @@ -33,7 +33,15 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 23 +#serial 43 + +# example boost program (need to pass version) +m4_define([_AX_BOOST_BASE_PROGRAM], + [AC_LANG_PROGRAM([[ +#include +]],[[ +(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))])); +]])]) AC_DEFUN([AX_BOOST_BASE], [ @@ -44,101 +52,121 @@ AC_ARG_WITH([boost], or disable it (ARG=no) @<:@ARG=yes@:>@ ])], [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi + AS_CASE([$withval], + [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""], + [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""], + [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"]) ], [want_boost="yes"]) AC_ARG_WITH([boost-libdir], - AS_HELP_STRING([--with-boost-libdir=LIB_DIR], - [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), - [ - if test -d "$withval" - then - ac_boost_lib_path="$withval" - else - AC_MSG_ERROR(--with-boost-libdir expected directory name) - fi - ], - [ac_boost_lib_path=""] -) + [AS_HELP_STRING([--with-boost-libdir=LIB_DIR], + [Force given directory for boost libraries. + Note that this will override library path detection, + so use this parameter only if default library detection fails + and you know exactly where your boost libraries are located.])], + [ + AS_IF([test -d "$withval"], + [_AX_BOOST_BASE_boost_lib_path="$withval"], + [AC_MSG_ERROR([--with-boost-libdir expected directory name])]) + ], + [_AX_BOOST_BASE_boost_lib_path=""]) -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) +BOOST_LDFLAGS="" +BOOST_CPPFLAGS="" +AS_IF([test "x$want_boost" = "xyes"], + [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])]) +AC_SUBST(BOOST_CPPFLAGS) +AC_SUBST(BOOST_LDFLAGS) +]) + + +# convert a version string in $2 to numeric and affect to polymorphic var $1 +AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[ + AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"]) + _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'` + _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'` + AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"], + [AC_MSG_ERROR([You should at least specify libboost major version])]) + _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'` + AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"], + [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"]) + _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` + AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"], + [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"]) + _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor` + AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET) +]) + +dnl Run the detection of boost should be run only if $want_boost +AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[ + _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1]) succeeded=no + + AC_REQUIRE([AC_CANONICAL_HOST]) dnl On 64-bit systems check for system libraries in both lib64 and lib. dnl The former is specified by FHS, but e.g. Debian does not adhere to dnl this (as it rises problems for generic multi-arch support). dnl The last entry in the list is chosen by default when no libraries dnl are found, e.g. when only header-only libraries are installed! - libsubdirs="lib" - ax_arch=`uname -m` - case $ax_arch in - x86_64|ppc64|s390x|sparc64|aarch64) - libsubdirs="lib64 lib lib64" - ;; - esac + AS_CASE([${host_cpu}], + [x86_64],[libsubdirs="lib64 libx32 lib lib64"], + [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"], + [libsubdirs="lib"] + ) dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give dnl them priority over the other paths since, if libs are found there, they dnl are almost assuredly the ones desired. - AC_REQUIRE([AC_CANONICAL_HOST]) - libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs" - - case ${host_cpu} in - i?86) - libsubdirs="lib/i386-${host_os} $libsubdirs" - ;; - esac + AS_CASE([${host_cpu}], + [i?86],[multiarch_libsubdir="lib/i386-${host_os}"], + [multiarch_libsubdir="lib/${host_cpu}-${host_os}"] + ) dnl first we check the system location for boost libraries dnl this location ist chosen if boost libraries are installed with the --layout=system option dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - BOOST_CPPFLAGS="-I$ac_boost_path/include" - for ac_boost_path_tmp in $libsubdirs; do - if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then - BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" - break - fi - done - elif test "$cross_compiling" != yes; then - for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - for libsubdir in $libsubdirs ; do - if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[ + AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"]) + AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[ + AC_MSG_RESULT([yes]) + BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include" + for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do + AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"]) + AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[ + AC_MSG_RESULT([yes]) + BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"; + break; + ], + [AC_MSG_RESULT([no])]) + done],[ + AC_MSG_RESULT([no])]) + ],[ + if test X"$cross_compiling" = Xyes; then + search_libsubdirs=$multiarch_libsubdir + else + search_libsubdirs="$multiarch_libsubdir $libsubdirs" + fi + for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do + if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then + for libsubdir in $search_libsubdirs ; do + if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done - BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" + BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir" + BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include" break; fi done - fi + ]) dnl overwrite ld flags if we have required special directory with dnl --with-boost-libdir parameter - if test "$ac_boost_lib_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_lib_path" - fi + AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"], + [BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"]) + AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)]) CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS @@ -149,15 +177,7 @@ if test "x$want_boost" = "xyes"; then AC_REQUIRE([AC_PROG_CXX]) AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ + AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[ AC_MSG_RESULT(yes) succeeded=yes found_system=yes @@ -169,30 +189,50 @@ if test "x$want_boost" = "xyes"; then dnl if we found no boost with system layout we search for boost libraries dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes"; then + if test "x$succeeded" != "xyes" ; then + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + BOOST_CPPFLAGS= + if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then + BOOST_LDFLAGS= + fi _version=0 - if test "$ac_boost_path" != ""; then - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + if test -n "$_AX_BOOST_BASE_boost_path" ; then + if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then + for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then + if test "x$V_CHECK" = "x1" ; then _version=$_version_tmp fi VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" + BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE" done + dnl if nothing found search for layout used in Windows distributions + if test -z "$BOOST_CPPFLAGS"; then + if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then + BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path" + fi + fi + dnl if we found something and BOOST_LDFLAGS was unset before + dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here. + if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then + for libsubdir in $libsubdirs ; do + if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir" + fi fi else - if test "$cross_compiling" != yes; then - for ac_boost_path in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + if test "x$cross_compiling" != "xyes" ; then + for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do + if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then + for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then + if test "x$V_CHECK" = "x1" ; then _version=$_version_tmp - best_path=$ac_boost_path + best_path=$_AX_BOOST_BASE_boost_path fi done fi @@ -200,7 +240,7 @@ if test "x$want_boost" = "xyes"; then VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - if test "$ac_boost_lib_path" = ""; then + if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then for libsubdir in $libsubdirs ; do if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done @@ -208,7 +248,7 @@ if test "x$want_boost" = "xyes"; then fi fi - if test "x$BOOST_ROOT" != "x"; then + if test -n "$BOOST_ROOT" ; then for libsubdir in $libsubdirs ; do if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done @@ -217,7 +257,7 @@ if test "x$want_boost" = "xyes"; then stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then + if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) BOOST_CPPFLAGS="-I$BOOST_ROOT" BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" @@ -232,15 +272,7 @@ if test "x$want_boost" = "xyes"; then export LDFLAGS AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ + AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[ AC_MSG_RESULT(yes) succeeded=yes found_system=yes @@ -249,17 +281,15 @@ if test "x$want_boost" = "xyes"; then AC_LANG_POP([C++]) fi - if test "$succeeded" != "yes" ; then - if test "$_version" = "0" ; then - AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) + if test "x$succeeded" != "xyes" ; then + if test "x$_version" = "x0" ; then + AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) else AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) fi # execute ACTION-IF-NOT-FOUND (if present): ifelse([$3], , :, [$3]) else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) # execute ACTION-IF-FOUND (if present): ifelse([$2], , :, [$2]) @@ -267,6 +297,5 @@ if test "x$want_boost" = "xyes"; then CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" -fi ]) diff --git a/m4/ax_boost_filesystem.m4 b/m4/ax_boost_filesystem.m4 index f162163c..c392f9d6 100644 --- a/m4/ax_boost_filesystem.m4 +++ b/m4/ax_boost_filesystem.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# 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], [ diff --git a/m4/ax_boost_system.m4 b/m4/ax_boost_system.m4 index c4c45559..207d7be8 100644 --- a/m4/ax_boost_system.m4 +++ b/m4/ax_boost_system.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# 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::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++]) From 6eee8ebcbe3c8bc58ccb28137d9631f76e6837e6 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Fri, 23 Mar 2018 11:11:48 +1300 Subject: [PATCH 13/38] Added option to build against the system copy of GLM. --- INSTALL | 10 ++++++++-- Makefile.am | 6 +++++- configure.ac | 11 +++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/INSTALL b/INSTALL index 5c500517..259ca3cf 100644 --- a/INSTALL +++ b/INSTALL @@ -62,8 +62,14 @@ 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 the GLM header-only library due to backwards +incompatible changes in the version most recently packaged by Debain. +To build against the system version of GLM use: + + ./configure --with-glm + +Gource includes a copy of TinyXML. To build against the system version of the +library use: ./configure --with-tinyxml diff --git a/Makefile.am b/Makefile.am index 94b14e34..e510f518 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,7 +55,11 @@ gource_SOURCES = \ src/user.cpp \ src/zoomcamera.cpp -AM_CPPFLAGS = -I src/core/glm -DSDLAPP_RESOURCE_DIR=\"$(pkgdatadir)\" +AM_CPPFLAGS = -DSDLAPP_RESOURCE_DIR=\"$(pkgdatadir)\" + +if USE_BUNDLED_GLM +AM_CPPFLAGS += -I src/core/glm +endif dist_pkgdata_DATA = data/beam.png data/bloom.tga data/bloom_alpha.tga data/file.png data/user.png data/gource.style diff --git a/configure.ac b/configure.ac index 13ceb341..e9fe9c21 100644 --- a/configure.ac +++ b/configure.ac @@ -58,8 +58,15 @@ AC_ARG_ENABLE(ttf-font-dir,[AS_HELP_STRING([--enable-ttf-font-dir=DIR],[director AM_CONDITIONAL([FONTDIR], [test "x$gourcefontdir" != "x"]) AC_SUBST(gourcefontdir) -#GLM -AC_CHECK_FILE(src/core/glm/glm/glm.hpp,, AC_MSG_ERROR(src/core/glm submodule not found. Please re-install or run ./autogen.sh)) +#see if building against system GLM library +use_glm_system_library=no +AC_ARG_WITH(glm, AC_HELP_STRING([--with-glm], [Use system installed GLM header-only library]), use_glm_system_library=$withval) +if test "x$use_glm_system_library" = "xyes"; then + AC_CHECK_HEADER([glm/glm.hpp],, AC_MSG_ERROR(GLM header-only library was required but not found)) +else + AC_CHECK_FILE(src/core/glm/glm/glm.hpp,, AC_MSG_ERROR(src/core/glm submodule not found. Please re-install or run ./autogen.sh)) +fi +AM_CONDITIONAL(USE_BUNDLED_GLM, test "x$use_glm_system_library" != "xyes") #see if building against system TinyXML library use_tinyxml_system_library=no From 939a576ae6d7df0c1bebc40fe5e0611c8dd73ac7 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 27 Mar 2018 15:41:10 +1300 Subject: [PATCH 14/38] Mention --with-glm configure option. --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 8f020f40..872f8f67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 0.49: * Use built-in GLM version to fix compatibility issues (dependency removed). + * Added --with-glm configure option. 0.48: * Can now generate logs from git sub module directories. From 9ed75287a2e6b390de9fbc74687f3a585fed40a6 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 27 Mar 2018 16:47:19 +1300 Subject: [PATCH 15/38] Fixed spelling of Debian. --- INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 259ca3cf..41c2363a 100644 --- a/INSTALL +++ b/INSTALL @@ -63,7 +63,7 @@ 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 GLM header-only library due to backwards -incompatible changes in the version most recently packaged by Debain. +incompatible changes in the version most recently packaged by Debian. To build against the system version of GLM use: ./configure --with-glm From bf782c0906e981c44cc6b2ae1748728103c165a9 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 27 Mar 2018 16:48:36 +1300 Subject: [PATCH 16/38] Clarify GLM version compatibility. --- src/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core b/src/core index eff33395..429e2c7a 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit eff33395b84ce6660f596b3f52549ae50969d4fc +Subproject commit 429e2c7a9c6efd1d7585c61a38bdc1c86c3a32c4 From db5ccda109deaf664a6bbc177c43dedf76e86475 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 28 Mar 2018 13:42:48 +1300 Subject: [PATCH 17/38] Make code compatible with the current GLM master branch. --- src/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core b/src/core index 429e2c7a..c9988ce2 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 429e2c7a9c6efd1d7585c61a38bdc1c86c3a32c4 +Subproject commit c9988ce239ae6b0a651b02b400d4ecfaaff86ba3 From 25d07b88a76e506043de86a17872619a6d654b2f Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 3 Apr 2018 11:30:28 +1200 Subject: [PATCH 18/38] Remove GLM work around as it is no longer needed. --- ChangeLog | 4 ---- INSTALL | 7 +------ Makefile.am | 4 ---- configure.ac | 11 ++--------- dev/bin/build_tar.pl | 1 - src/core | 2 +- 6 files changed, 4 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 872f8f67..2c56a69c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,3 @@ -0.49: - * Use built-in GLM version to fix compatibility issues (dependency removed). - * Added --with-glm configure option. - 0.48: * Can now generate logs from git sub module directories. diff --git a/INSTALL b/INSTALL index 41c2363a..d7a10359 100644 --- a/INSTALL +++ b/INSTALL @@ -17,6 +17,7 @@ Gource requires the following libraries to compile (package names may vary): PCRE (libpcre3-dev) Freetype 2 (libfreetype6-dev) GLEW (libglew-dev) + GLM >= 0.9.3 (libglm-dev) Boost Filesystem >= 1.46 (libboost-filesystem-dev) PNG >= 1.2 (libpng12-dev) @@ -62,12 +63,6 @@ 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 GLM header-only library due to backwards -incompatible changes in the version most recently packaged by Debian. -To build against the system version of GLM use: - - ./configure --with-glm - Gource includes a copy of TinyXML. To build against the system version of the library use: diff --git a/Makefile.am b/Makefile.am index e510f518..100a5827 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,10 +57,6 @@ gource_SOURCES = \ AM_CPPFLAGS = -DSDLAPP_RESOURCE_DIR=\"$(pkgdatadir)\" -if USE_BUNDLED_GLM -AM_CPPFLAGS += -I src/core/glm -endif - dist_pkgdata_DATA = data/beam.png data/bloom.tga data/bloom_alpha.tga data/file.png data/user.png data/gource.style shadersdir = $(pkgdatadir)/shaders diff --git a/configure.ac b/configure.ac index e9fe9c21..119f12cf 100644 --- a/configure.ac +++ b/configure.ac @@ -58,15 +58,8 @@ AC_ARG_ENABLE(ttf-font-dir,[AS_HELP_STRING([--enable-ttf-font-dir=DIR],[director AM_CONDITIONAL([FONTDIR], [test "x$gourcefontdir" != "x"]) AC_SUBST(gourcefontdir) -#see if building against system GLM library -use_glm_system_library=no -AC_ARG_WITH(glm, AC_HELP_STRING([--with-glm], [Use system installed GLM header-only library]), use_glm_system_library=$withval) -if test "x$use_glm_system_library" = "xyes"; then - AC_CHECK_HEADER([glm/glm.hpp],, AC_MSG_ERROR(GLM header-only library was required but not found)) -else - AC_CHECK_FILE(src/core/glm/glm/glm.hpp,, AC_MSG_ERROR(src/core/glm submodule not found. Please re-install or run ./autogen.sh)) -fi -AM_CONDITIONAL(USE_BUNDLED_GLM, test "x$use_glm_system_library" != "xyes") +#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 diff --git a/dev/bin/build_tar.pl b/dev/bin/build_tar.pl index 113e4e75..1161f7a1 100755 --- a/dev/bin/build_tar.pl +++ b/dev/bin/build_tar.pl @@ -58,7 +58,6 @@ sub gource_version { qr{^/m4/.+\.m4$}, qr{^/configure(?:\.ac)?$}, qr{^/src/.+\.(?:cpp|h|cc|hh)$}, - qr{^/src/core/glm/.+$}, qr{^/data/file\.png$}, qr{^/data/user\.png$}, qr{^/data/beam\.png$}, diff --git a/src/core b/src/core index c9988ce2..66fb8931 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit c9988ce239ae6b0a651b02b400d4ecfaaff86ba3 +Subproject commit 66fb89313079612901bba1e33928fb1c2f95f0f0 From 997531a55a9dcb9106b14b5b56c697feb6f3f052 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 2 Jun 2018 18:13:41 -0400 Subject: [PATCH 19/38] Fix command synopsis to use normal manual-page command syntax. This is significant for tools like doclifter that lift to XML/HTML. --- data/gource.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/gource.1 b/data/gource.1 index 687377be..ed7a2a9d 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -3,7 +3,7 @@ Gource - a software version control visualization .SH SYNOPSIS \fIgource\fR - +[options] path .SH DESCRIPTION \fIgource\fR is an OpenGL-based 3D visualisation tool for source control repositories. From 5fe6becf0ac54618ca4da8ef9eed5451c1ddac14 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 13 Jun 2018 13:54:05 +1200 Subject: [PATCH 20/38] Fixed compatibility with GLM 0.9.9.0. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2c56a69c..2a928818 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +0.49: + * Fixed compatibility with GLM 0.9.9.0. + 0.48: * Can now generate logs from git sub module directories. From 81cd3e6b331e07b79b7c54b4fa881bce5e7e4777 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 13 Jun 2018 14:19:50 +1200 Subject: [PATCH 21/38] Made command line synopsis consistent. --- README | 2 +- data/gource.1 | 2 +- src/gource_settings.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 2d44aa46..66a51275 100644 --- a/README +++ b/README @@ -34,7 +34,7 @@ card to run. 3. Using Gource =============== -gource +gource [options] [path] options: diff --git a/data/gource.1 b/data/gource.1 index ed7a2a9d..66897100 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -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. diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 6b647056..3e1450b8 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -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"); From ad5a926d6cadb25d1db043406ddd4b0b3535d20d Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Mon, 17 Sep 2018 17:32:26 +1200 Subject: [PATCH 22/38] Fixed a bug in the log file format detection affecting custom logs. After the first commit in a log is read to check the file format the log it is rewound to the beginning, however the last line read was still buffered so it would return the buffered line next not the first line of the log. As custom log entries are all on one line this would erroneously be parsed as the first commit. --- ChangeLog | 4 ++++ configure.ac | 2 +- src/formats/commitlog.cpp | 5 +++-- src/gource_settings.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a928818..6d56c50a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +0.50: + * Fixed a bug in the log file format detection that could result in the wrong + first entry being displayed for a custom log. + 0.49: * Fixed compatibility with GLM 0.9.9.0. diff --git a/configure.ac b/configure.ac index 119f12cf..6e5b34f2 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.61) -AC_INIT(Gource, 0.49, [acaudwell@gmail.com]) +AC_INIT(Gource, 0.50, [acaudwell@gmail.com]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/main.h]) AM_INIT_AUTOMAKE([dist-bzip2 foreign subdir-objects]) diff --git a/src/formats/commitlog.cpp b/src/formats/commitlog.cpp index 800e59cd..32bebba4 100644 --- a/src/formats/commitlog.cpp +++ b/src/formats/commitlog.cpp @@ -130,6 +130,7 @@ bool RCommitLog::checkFormat() { if(seekable) { //if the log is seekable, go back to the start ((SeekLog*)logf)->seekTo(0.0); + lastline.clear(); } else { //otherwise set the buffered flag as we have bufferd one commit buffered = true; @@ -171,7 +172,7 @@ bool RCommitLog::getCommitAt(float percent, RCommit& commit) { bool RCommitLog::getNextLine(std::string& line) { if(!lastline.empty()) { line = lastline; - lastline = std::string(""); + lastline.clear(); return true; } @@ -182,7 +183,7 @@ bool RCommitLog::getNextLine(std::string& line) { void RCommitLog::seekTo(float percent) { if(!seekable) return; - lastline = ""; + lastline.clear(); ((SeekLog*)logf)->seekTo(percent); } diff --git a/src/gource_settings.h b/src/gource_settings.h index b2378a85..a21cdabf 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -18,7 +18,7 @@ #ifndef GOURCE_SETTINGS_H #define GOURCE_SETTINGS_H -#define GOURCE_VERSION "0.49" +#define GOURCE_VERSION "0.50" #include "core/texture.h" #include "core/settings.h" From 74e8bee4bd8916860811f6e43fb06b97a7dc8aae Mon Sep 17 00:00:00 2001 From: Lars Schmertmann Date: Fri, 14 Sep 2018 15:09:45 +0200 Subject: [PATCH 23/38] Added no-time-travel to the configuration Enabling this option causes gource to use the time of the parent commit, if the time of a commit is in the past. This allows a linear simulation, even if the time of the commits are not corresponding to the order of the commits. --- README | 3 +++ src/gource.cpp | 7 +++++++ src/gource_settings.cpp | 8 ++++++++ src/gource_settings.h | 1 + 4 files changed, 19 insertions(+) diff --git a/README b/README index 66a51275..8267ea5f 100644 --- a/README +++ b/README @@ -106,6 +106,9 @@ options: --realtime Realtime playback speed. + --no-time-travel + Use the time of the parent commit, if the time of a commit is in the past. + -c, --time-scale SCALE Change simulation time scale. diff --git a/src/gource.cpp b/src/gource.cpp index c3f397bd..829074c1 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -1133,6 +1133,13 @@ void Gource::readLog() { break; } + if(gGourceSettings.no_time_travel) { + time_t checkTime = commitqueue.empty() ? currtime : commitqueue.back().timestamp; + if(commit.timestamp < checkTime) { + commit.timestamp = checkTime; + } + } + commitqueue.push_back(commit); } diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 3e1450b8..9cc8d330 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -70,6 +70,8 @@ void GourceSettings::help(bool extended_help) { printf(" --disable-auto-skip Disable auto skip\n"); printf(" -s, --seconds-per-day SECONDS Speed in seconds per day (default: 10)\n"); printf(" --realtime Realtime playback speed\n"); + printf(" --no-time-travel Use the time of the parent commit,\n"); + printf(" if the time of a commit is in the past.\n"); printf(" -c, --time-scale SCALE Change simulation time scale (default: 1.0)\n"); printf(" -e, --elasticity FLOAT Elasticity of nodes (default: 0.0)\n\n"); @@ -249,6 +251,7 @@ GourceSettings::GourceSettings() { arg_types["dont-stop"] = "bool"; arg_types["loop"] = "bool"; arg_types["realtime"] = "bool"; + arg_types["no-time-travel"] = "bool"; arg_types["colour-images"] = "bool"; arg_types["hide-date"] = "bool"; arg_types["hide-files"] = "bool"; @@ -380,6 +383,7 @@ void GourceSettings::setGourceDefaults() { stop_on_idle = false; stop_at_end = false; dont_stop = false; + no_time_travel = false; show_key = false; @@ -1273,6 +1277,10 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc days_per_second = 1.0 / 86400.0; } + if(gource_settings->getBool("no-time-travel")) { + no_time_travel = true; + } + if(gource_settings->getBool("dont-stop")) { dont_stop = true; } diff --git a/src/gource_settings.h b/src/gource_settings.h index a21cdabf..6d3805af 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -67,6 +67,7 @@ class GourceSettings : public SDLAppSettings { bool stop_on_idle; bool stop_at_end; bool dont_stop; + bool no_time_travel; float auto_skip_seconds; float days_per_second; From 21f09b0ae365ddf628509d896473e3fc5a903d75 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 18 Sep 2018 14:32:47 +1200 Subject: [PATCH 24/38] Added ChangeLog and man page entries for --no-time-travel. --- ChangeLog | 1 + data/gource.1 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6d56c50a..f548b10a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 0.50: * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. + * Added --no-time-travel option (Lars Schmertmann). 0.49: * Fixed compatibility with GLM 0.9.9.0. diff --git a/data/gource.1 b/data/gource.1 index 66897100..87a5ac24 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -76,6 +76,9 @@ Speed of simulation in seconds per day. \fB\-\-realtime\fR Realtime playback speed. .TP +\fB\-\-no-time-travel\fR +Use the time of the parent commit, if the time of a commit is in the past. +.TP \fB\-c, \-\-time\-scale SCALE\fR Change simulation time scale. .TP From 47ea2aac18f9a9c2e099ee0f9972d2f432974687 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 18 Sep 2018 14:52:32 +1200 Subject: [PATCH 25/38] Use lasttime for no-time-travel instead of currtime. When the commit queue is empty lasttime use lasttime instead of currtime to determine if the commit time is out of order as currtime is incremented by the simulation. --- ChangeLog | 2 +- README | 2 +- data/gource.1 | 2 +- src/gource.cpp | 6 +++--- src/gource_settings.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index f548b10a..c83e5473 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 0.50: + * Added --no-time-travel option (Lars Schmertmann). * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. - * Added --no-time-travel option (Lars Schmertmann). 0.49: * Fixed compatibility with GLM 0.9.9.0. diff --git a/README b/README index 8267ea5f..b013dda1 100644 --- a/README +++ b/README @@ -107,7 +107,7 @@ options: Realtime playback speed. --no-time-travel - Use the time of the parent commit, if the time of a commit is in the past. + Use the time of the last commit if the time of a commit is in the past. -c, --time-scale SCALE Change simulation time scale. diff --git a/data/gource.1 b/data/gource.1 index 87a5ac24..04b7d236 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -77,7 +77,7 @@ Speed of simulation in seconds per day. Realtime playback speed. .TP \fB\-\-no-time-travel\fR -Use the time of the parent commit, if the time of a commit is in the past. +Use the time of the last commit if the time of a commit is in the past. .TP \fB\-c, \-\-time\-scale SCALE\fR Change simulation time scale. diff --git a/src/gource.cpp b/src/gource.cpp index 829074c1..4fd11cd0 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -1134,9 +1134,9 @@ void Gource::readLog() { } if(gGourceSettings.no_time_travel) { - time_t checkTime = commitqueue.empty() ? currtime : commitqueue.back().timestamp; - if(commit.timestamp < checkTime) { - commit.timestamp = checkTime; + time_t check_time = commitqueue.empty() ? lasttime : commitqueue.back().timestamp; + if(commit.timestamp < check_time) { + commit.timestamp = check_time; } } diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 9cc8d330..cbc90588 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -70,8 +70,8 @@ void GourceSettings::help(bool extended_help) { printf(" --disable-auto-skip Disable auto skip\n"); printf(" -s, --seconds-per-day SECONDS Speed in seconds per day (default: 10)\n"); printf(" --realtime Realtime playback speed\n"); - printf(" --no-time-travel Use the time of the parent commit,\n"); - printf(" if the time of a commit is in the past.\n"); + printf(" --no-time-travel Use the time of the last commit if the\n"); + printf(" of a commit is in the past\n"); printf(" -c, --time-scale SCALE Change simulation time scale (default: 1.0)\n"); printf(" -e, --elasticity FLOAT Elasticity of nodes (default: 0.0)\n\n"); From ed284ba3eed395b9bb6e844fb3a1b3120992d03e Mon Sep 17 00:00:00 2001 From: Lars Schmertmann Date: Mon, 17 Sep 2018 21:27:57 +0200 Subject: [PATCH 26/38] Added dir-name-position to the configuration Using this option allows to move the directory name to the root (0.0) or to the leafs (1.0). --- README | 4 ++++ src/gource_settings.cpp | 17 ++++++++++++++++- src/gource_settings.h | 1 + src/spline.cpp | 9 +++++++-- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README b/README index b013dda1..0d267656 100644 --- a/README +++ b/README @@ -196,6 +196,10 @@ options: --dir-name-depth DEPTH Draw names of directories down to a specific depth in the tree. + --dir-name-position FLOAT + Position for the directory name along the edge + (between 0.0 and 1.0, default is 0.5). + --filename-time SECONDS Duration to keep filenames on screen (>= 2.0). diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index cbc90588..e262c38a 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -157,7 +157,9 @@ if(extended_help) { printf(" --filename-colour Font colour for filenames.\n"); printf(" --dir-colour Font colour for directories.\n\n"); - printf(" --dir-name-depth DEPTH Draw names of directories down to a specific depth.\n\n"); + printf(" --dir-name-depth DEPTH Draw names of directories down to a specific depth.\n"); + printf(" --dir-name-position FLOAT Position for the directory name along the edge\n"); + printf(" (between 0.0 and 1.0, default is 0.5).\n\n"); printf(" --filename-time SECONDS Duration to keep filenames on screen (default: 4.0)\n\n"); @@ -291,6 +293,7 @@ GourceSettings::GourceSettings() { arg_types["user-friction"] = "float"; arg_types["padding"] = "float"; arg_types["time-scale"] = "float"; + arg_types["dir-name-position"] = "float"; arg_types["max-files"] = "int"; arg_types["font-size"] = "int"; @@ -436,6 +439,7 @@ void GourceSettings::setGourceDefaults() { title_height_pad = 0; dir_name_depth = 0; + dir_name_position = 0.5f; elasticity = 0.0f; @@ -1496,6 +1500,17 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc } } + if((entry = gource_settings->getEntry("dir-name-position")) != 0) { + + if(!entry->hasValue()) conffile.entryException(entry, "specify dir-name-position (float)"); + + dir_name_position = entry->getFloat(); + + if(dir_name_position<0.0f || dir_name_position>1.0f) { + conffile.entryException(entry, "dir-name-position must be >= 0.0 and <= 1.0"); + } + } + //validate path if(gource_settings->hasValue("path")) { path = gource_settings->getString("path"); diff --git a/src/gource_settings.h b/src/gource_settings.h index 6d3805af..8ca2377b 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -135,6 +135,7 @@ class GourceSettings : public SDLAppSettings { vec3 selection_colour; int dir_name_depth; + float dir_name_position; std::vector highlight_users; std::vector follow_users; diff --git a/src/spline.cpp b/src/spline.cpp index bf9fbf70..18ca6671 100644 --- a/src/spline.cpp +++ b/src/spline.cpp @@ -17,6 +17,8 @@ #include "spline.h" +#include + SplineEdge::SplineEdge() { } @@ -59,8 +61,11 @@ void SplineEdge::update(const vec2& pos1, const vec4& col1, const vec2& pos2, co spline_point.push_back(pt); spline_colour.push_back(coln); } - - midpoint = pos1 * 0.25f + pos2 * 0.25f + spos * 0.5f; + + const float pos = gGourceSettings.dir_name_position; + const float s_quota = 0.5f - std::abs(pos - 0.5f); + const float p_quota = 1.0f - s_quota; + midpoint = pos1 * (p_quota * (1.0f - pos)) + pos2 * (p_quota * pos) + spos * s_quota; } const vec2& SplineEdge::getMidPoint() const { From 5b24e4472260509b3ef5cbfe78b72b5d16314aa2 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Fri, 21 Sep 2018 10:35:07 +1200 Subject: [PATCH 27/38] Don't allow dir-name-position to be 0.0 as it doesn't make sense. Renamed midpoint to label_pos. --- ChangeLog | 1 + README | 4 ++-- data/gource.1 | 5 ++++- src/dirnode.cpp | 4 ++-- src/gource_settings.cpp | 6 +++--- src/spline.cpp | 12 ++++++------ src/spline.h | 4 ++-- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index c83e5473..ffe84783 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 0.50: * Added --no-time-travel option (Lars Schmertmann). + * Added --dir-name-position option (Lars Schmertmann). * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. diff --git a/README b/README index 0d267656..e5971258 100644 --- a/README +++ b/README @@ -197,8 +197,8 @@ options: Draw names of directories down to a specific depth in the tree. --dir-name-position FLOAT - Position for the directory name along the edge - (between 0.0 and 1.0, default is 0.5). + Position along edge of the directory name + (between 0.1 and 1.0, default is 0.5). --filename-time SECONDS Duration to keep filenames on screen (>= 2.0). diff --git a/data/gource.1 b/data/gource.1 index 04b7d236..121a4b9c 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -76,7 +76,7 @@ Speed of simulation in seconds per day. \fB\-\-realtime\fR Realtime playback speed. .TP -\fB\-\-no-time-travel\fR +\fB\-\-no\-time\-travel\fR Use the time of the last commit if the time of a commit is in the past. .TP \fB\-c, \-\-time\-scale SCALE\fR @@ -151,6 +151,9 @@ Font colour for directories. \fB\-\-dir\-name\-depth DEPTH\fR Draw names of directories down to a specific depth in the tree. .TP +\fB\-\-dir\-name\-position FLOAT +Position along edge of the directory name (between 0.1 and 1.0, default is 0.5). +.TP \fB\-\-filename\-time SECONDS\fR Duration to keep filenames on screen (>= 2.0). .TP diff --git a/src/dirnode.cpp b/src/dirnode.cpp index 8db076e7..c0fc5703 100644 --- a/src/dirnode.cpp +++ b/src/dirnode.cpp @@ -929,10 +929,10 @@ void RDirNode::drawDirName(FXFont& dirfont) const{ float alpha = gGourceSettings.highlight_dirs ? 1.0 : std::max(0.0f, 5.0f - since_last_node_change) / 5.0f; - vec2 mid = spline.getMidPoint(); + vec2 label_pos = spline.getLabelPos(); dirfont.setAlpha(alpha); - dirfont.draw(mid.x, mid.y, path_token); + dirfont.draw(label_pos.x, label_pos.y, path_token); } void RDirNode::calcScreenPos(GLint* viewport, GLdouble* modelview, GLdouble* projection) { diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index e262c38a..ff2b86cf 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -158,7 +158,7 @@ if(extended_help) { printf(" --dir-colour Font colour for directories.\n\n"); printf(" --dir-name-depth DEPTH Draw names of directories down to a specific depth.\n"); - printf(" --dir-name-position FLOAT Position for the directory name along the edge\n"); + printf(" --dir-name-position FLOAT Position along edge of the directory name\n"); printf(" (between 0.0 and 1.0, default is 0.5).\n\n"); printf(" --filename-time SECONDS Duration to keep filenames on screen (default: 4.0)\n\n"); @@ -1506,8 +1506,8 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc dir_name_position = entry->getFloat(); - if(dir_name_position<0.0f || dir_name_position>1.0f) { - conffile.entryException(entry, "dir-name-position must be >= 0.0 and <= 1.0"); + if(dir_name_position < 0.1f || dir_name_position > 1.0f) { + conffile.entryException(entry, "dir-name-position outside of range 0.1 - 1.0 (inclusive)"); } } diff --git a/src/spline.cpp b/src/spline.cpp index 18ca6671..e5cc891a 100644 --- a/src/spline.cpp +++ b/src/spline.cpp @@ -17,8 +17,6 @@ #include "spline.h" -#include - SplineEdge::SplineEdge() { } @@ -63,13 +61,15 @@ void SplineEdge::update(const vec2& pos1, const vec4& col1, const vec2& pos2, co } const float pos = gGourceSettings.dir_name_position; - const float s_quota = 0.5f - std::abs(pos - 0.5f); + + const float s_quota = 0.5f - glm::abs(pos - 0.5f); const float p_quota = 1.0f - s_quota; - midpoint = pos1 * (p_quota * (1.0f - pos)) + pos2 * (p_quota * pos) + spos * s_quota; + + label_pos = pos1 * (p_quota * (1.0f - pos)) + pos2 * (p_quota * pos) + spos * s_quota; } -const vec2& SplineEdge::getMidPoint() const { - return midpoint; +const vec2& SplineEdge::getLabelPos() const { + return label_pos; } void SplineEdge::drawToVBO(quadbuf& buffer) const { diff --git a/src/spline.h b/src/spline.h index eadfe177..187c010f 100644 --- a/src/spline.h +++ b/src/spline.h @@ -31,13 +31,13 @@ class SplineEdge { std::vector spline_point; std::vector spline_colour; - vec2 midpoint; + vec2 label_pos; void drawBeam(const vec2 & pos1, const vec4 & col1, const vec2 & pos2, const vec4 & col2, float radius, bool first) const; public: SplineEdge(); - const vec2& getMidPoint() const; + const vec2& getLabelPos() const; void update(const vec2& pos1, const vec4& col1, const vec2& pos2, const vec4& col2, const vec2& spos); From ae7bde2ae63ef3471886f3d7b1f5f263b825ac92 Mon Sep 17 00:00:00 2001 From: Lars Schmertmann Date: Sun, 9 Sep 2018 15:02:43 +0200 Subject: [PATCH 28/38] Added file-extension-fallback to the configuration. Enabling this option causes gource to use the filename as the file extension if no extension is set or the filename ends with a dot. As a result every file without an extension has an own entry in the file extension key. --- ChangeLog | 1 + README | 3 +++ data/gource.1 | 3 +++ src/file.cpp | 6 +++-- src/gource_settings.cpp | 59 ++++++++++++++++++++++++----------------- src/gource_settings.h | 1 + 6 files changed, 46 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index ffe84783..1ade7a7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 0.50: * Added --no-time-travel option (Lars Schmertmann). * Added --dir-name-position option (Lars Schmertmann). + * Added --file-extension-fallback option (Lars Schmertmann). * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. diff --git a/README b/README index e5971258..58fc8f01 100644 --- a/README +++ b/README @@ -206,6 +206,9 @@ options: --file-extensions Show filename extensions only. + --file-extension-fallback + Use filename as extension if the extension is missing or empty. + --file-filter REGEX Filter out file paths matching the specified regular expression. diff --git a/data/gource.1 b/data/gource.1 index 121a4b9c..8af9fd98 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -160,6 +160,9 @@ Duration to keep filenames on screen (>= 2.0). \fB\-\-file\-extensions\fR Show filename extensions only. .TP +\fB\-\-file\-extension\-fallback\fR +Use filename as extension if the extension is missing or empty. +.TP \fB\-\-file\-filter REGEX\fR Filter out file paths matching the specified regular expression. .TP diff --git a/src/file.cpp b/src/file.cpp index afb2da94..cf9b01f8 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -119,10 +119,12 @@ void RFile::setFilename(const std::string& abs_file_path) { } //trim name to just extension - int dotsep=0; + size_t dotsep = name.rfind("."); - if((dotsep=name.rfind(".")) != std::string::npos && dotsep != name.size()-1) { + if(dotsep != std::string::npos && dotsep != name.size()-1) { ext = name.substr(dotsep+1); + } else if(gGourceSettings.file_extension_fallback) { + ext = name; } } diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index ff2b86cf..0fb18489 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -127,6 +127,9 @@ if(extended_help) { printf(" --file-extensions Show filename extensions only\n\n"); + printf(" --file-extension-fallback Use filename as extension if the\n"); + printf(" extension is missing or empty\n\n"); + printf(" --git-branch Get the git log of a particular branch\n\n"); printf(" --hide DISPLAY_ELEMENT bloom,date,dirnames,files,filenames,mouse,progress,\n"); @@ -246,31 +249,32 @@ GourceSettings::GourceSettings() { conf_sections["log-level"] = "command-line"; //boolean args - arg_types["help"] = "bool"; - arg_types["extended-help"] = "bool"; - arg_types["stop-on-idle"] = "bool"; - arg_types["stop-at-end"] = "bool"; - arg_types["dont-stop"] = "bool"; - arg_types["loop"] = "bool"; - arg_types["realtime"] = "bool"; - arg_types["no-time-travel"] = "bool"; - arg_types["colour-images"] = "bool"; - arg_types["hide-date"] = "bool"; - arg_types["hide-files"] = "bool"; - arg_types["hide-users"] = "bool"; - arg_types["hide-tree"] = "bool"; - arg_types["hide-usernames"] = "bool"; - arg_types["hide-filenames"] = "bool"; - arg_types["hide-dirnames"] = "bool"; - arg_types["hide-progress"] = "bool"; - arg_types["hide-bloom"] = "bool"; - arg_types["hide-mouse"] = "bool"; - arg_types["hide-root"] = "bool"; - arg_types["highlight-users"] = "bool"; - arg_types["highlight-dirs"] = "bool"; - arg_types["file-extensions"] = "bool"; - arg_types["key"] = "bool"; - arg_types["ffp"] = "bool"; + arg_types["help"] = "bool"; + arg_types["extended-help"] = "bool"; + arg_types["stop-on-idle"] = "bool"; + arg_types["stop-at-end"] = "bool"; + arg_types["dont-stop"] = "bool"; + arg_types["loop"] = "bool"; + arg_types["realtime"] = "bool"; + arg_types["no-time-travel"] = "bool"; + arg_types["colour-images"] = "bool"; + arg_types["hide-date"] = "bool"; + arg_types["hide-files"] = "bool"; + arg_types["hide-users"] = "bool"; + arg_types["hide-tree"] = "bool"; + arg_types["hide-usernames"] = "bool"; + arg_types["hide-filenames"] = "bool"; + arg_types["hide-dirnames"] = "bool"; + arg_types["hide-progress"] = "bool"; + arg_types["hide-bloom"] = "bool"; + arg_types["hide-mouse"] = "bool"; + arg_types["hide-root"] = "bool"; + arg_types["highlight-users"] = "bool"; + arg_types["highlight-dirs"] = "bool"; + arg_types["file-extensions"] = "bool"; + arg_types["file-extension-fallback"] = "bool"; + arg_types["key"] = "bool"; + arg_types["ffp"] = "bool"; arg_types["swap-title-and-date"] = "bool"; arg_types["disable-auto-rotate"] = "bool"; @@ -485,6 +489,7 @@ void GourceSettings::setGourceDefaults() { file_show_filters.clear(); file_extensions = false; + file_extension_fallback = false; //delete user filters for(std::vector::iterator it = user_filters.begin(); it != user_filters.end(); it++) { @@ -1420,6 +1425,10 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc file_extensions=true; } + if(gource_settings->getBool("file-extension-fallback")) { + file_extension_fallback=true; + } + if((entry = gource_settings->getEntry("file-filter")) != 0) { ConfEntryList* filters = gource_settings->getEntries("file-filter"); diff --git a/src/gource_settings.h b/src/gource_settings.h index 8ca2377b..1d393da1 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -143,6 +143,7 @@ class GourceSettings : public SDLAppSettings { std::vector file_show_filters; std::vector user_filters; bool file_extensions; + bool file_extension_fallback; std::string caption_file; vec3 caption_colour; From 43c6477b6d5573d2f6c4008eeb605de90589dcf7 Mon Sep 17 00:00:00 2001 From: Victor Lopez Date: Tue, 5 Dec 2017 16:12:27 +0000 Subject: [PATCH 29/38] Add user-show-filter --- src/formats/commitlog.cpp | 13 +++++++++++++ src/gource_settings.cpp | 31 +++++++++++++++++++++++++++++++ src/gource_settings.h | 1 + 3 files changed, 45 insertions(+) diff --git a/src/formats/commitlog.cpp b/src/formats/commitlog.cpp index 32bebba4..0a37a166 100644 --- a/src/formats/commitlog.cpp +++ b/src/formats/commitlog.cpp @@ -361,6 +361,19 @@ bool RCommit::isValid() { } } + // Only allow users that have been whitelisted + if(!gGourceSettings.user_show_filters.empty()) { + + for(std::vector::iterator ri = gGourceSettings.user_show_filters.begin(); ri != gGourceSettings.user_show_filters.end(); ri++) { + Regex* r = *ri; + + if(!r->match(username)) { + return false; + } + } + } + + return !files.empty(); } diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 0fb18489..93dca0d4 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -143,6 +143,7 @@ if(extended_help) { printf(" --transparent Make the background transparent\n\n"); printf(" --user-filter REGEX Ignore usernames matching this regex\n"); + printf(" --user-show-filter REGEX Show only usernames 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"); @@ -308,6 +309,7 @@ GourceSettings::GourceSettings() { arg_types["title-height-pad"] = "int"; arg_types["user-filter"] = "multi-value"; + arg_types["user-show-filter"] = "multi-value"; arg_types["follow-user"] = "multi-value"; arg_types["highlight-user"] = "multi-value"; @@ -496,6 +498,12 @@ void GourceSettings::setGourceDefaults() { delete (*it); } user_filters.clear(); + + //delete user whitelist + for(std::vector::iterator it = user_show_filters.begin(); it != user_show_filters.end(); it++) { + delete (*it); + } + user_show_filters.clear(); } void GourceSettings::commandLineOption(const std::string& name, const std::string& value) { @@ -1498,6 +1506,29 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc } } + if((entry = gource_settings->getEntry("user-show-filter")) != 0) { + + ConfEntryList* filters = gource_settings->getEntries("user-show-filter"); + + for(ConfEntryList::iterator it = filters->begin(); it != filters->end(); it++) { + + entry = *it; + + if(!entry->hasValue()) conffile.entryException(entry, "specify user-show-filter (regex)"); + + std::string filter_string = entry->getString(); + + Regex* r = new Regex(filter_string, 1); + + if(!r->isValid()) { + delete r; + conffile.entryException(entry, "invalid user-show-filter regular expression"); + } + + user_show_filters.push_back(r); + } + } + if((entry = gource_settings->getEntry("dir-name-depth")) != 0) { if(!entry->hasValue()) conffile.entryException(entry, "specify dir-name-depth (depth)"); diff --git a/src/gource_settings.h b/src/gource_settings.h index 1d393da1..8bd33e43 100644 --- a/src/gource_settings.h +++ b/src/gource_settings.h @@ -142,6 +142,7 @@ class GourceSettings : public SDLAppSettings { std::vector file_filters; std::vector file_show_filters; std::vector user_filters; + std::vector user_show_filters; bool file_extensions; bool file_extension_fallback; From 1d70fd0ad146208e0321b34c4b2ecae438c1991a Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 25 Sep 2018 12:43:16 +1200 Subject: [PATCH 30/38] Documented user-show-filter option. --- ChangeLog | 1 + README | 3 +++ data/gource.1 | 3 +++ src/gource_settings.cpp | 9 ++++----- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ade7a7f..1b647b02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Added --no-time-travel option (Lars Schmertmann). * Added --dir-name-position option (Lars Schmertmann). * Added --file-extension-fallback option (Lars Schmertmann). + * Added --user-show-filter option (Victor Lopez). * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. diff --git a/README b/README index 58fc8f01..a9a4c4cb 100644 --- a/README +++ b/README @@ -218,6 +218,9 @@ options: --user-filter REGEX Filter usernames matching the specified regular expression. + --user-show-filter REGEX + Show only 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. diff --git a/data/gource.1 b/data/gource.1 index 8af9fd98..0a8352d0 100644 --- a/data/gource.1 +++ b/data/gource.1 @@ -172,6 +172,9 @@ Show only file paths matching the specified regular expression. \fB\-\-user\-filter REGEX\fR Filter usernames matching the specified regular expression. .TP +\fB\-\-user\-show\-filter REGEX\fR +Show only 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. .TP diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index 93dca0d4..c46985d7 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -308,13 +308,12 @@ GourceSettings::GourceSettings() { arg_types["date-height-pad"] = "int"; arg_types["title-height-pad"] = "int"; - arg_types["user-filter"] = "multi-value"; - arg_types["user-show-filter"] = "multi-value"; - arg_types["follow-user"] = "multi-value"; - arg_types["highlight-user"] = "multi-value"; - + arg_types["user-filter"] = "multi-value"; + arg_types["user-show-filter"] = "multi-value"; arg_types["file-filter"] = "multi-value"; arg_types["file-show-filter"] = "multi-value"; + arg_types["follow-user"] = "multi-value"; + arg_types["highlight-user"] = "multi-value"; arg_types["log-level"] = "string"; arg_types["background-image"] = "string"; From 0a0bfd77ab342a8b57bfac1d53acf048b95290cd Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Thu, 27 Sep 2018 17:03:24 +1200 Subject: [PATCH 31/38] Removed unused tagfilemap left over from when picking was used for selection. --- src/gource.cpp | 3 --- src/gource.h | 1 - 2 files changed, 4 deletions(-) diff --git a/src/gource.cpp b/src/gource.cpp index 4fd11cd0..d8361140 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -870,7 +870,6 @@ void Gource::reset() { active_user_bounds.reset(); dir_bounds.reset(); commitqueue.clear(); - tagfilemap.clear(); tagusermap.clear(); gGourceRemovedFiles.clear(); @@ -972,7 +971,6 @@ void Gource::deleteFile(RFile* file) { } files.erase(file->fullpath); - tagfilemap.erase(file->getTagID()); file_key.dec(file); //debugLog("removed file %s\n", file->fullpath.c_str()); @@ -998,7 +996,6 @@ RFile* Gource::addFile(const RCommitFile& cf) { RFile* file = new RFile(cf.filename, cf.colour, vec2(0.0,0.0), tagid); files[cf.filename] = file; - tagfilemap[tagid] = file; root->addFile(file); diff --git a/src/gource.h b/src/gource.h index 646dffd4..22ade949 100644 --- a/src/gource.h +++ b/src/gource.h @@ -183,7 +183,6 @@ class Gource : public SDLApp { std::deque commitqueue; std::map users; std::map files; - std::map tagfilemap; std::map tagusermap; std::list captions; From d6afc4f4a4a42ed4832d52bab9c887103a4627d8 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Fri, 28 Sep 2018 11:00:05 +1200 Subject: [PATCH 32/38] Fixed Mercurial parser missing entries due to a buffering bug. While parsing a commit when the parser encountered the first line of the next commit it would buffer it to be parsed next, however it didn't use the correct method to then fetch the next line so the buffered entry was missed. --- ChangeLog | 1 + src/formats/hg.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1b647b02..8c728743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * Added --dir-name-position option (Lars Schmertmann). * Added --file-extension-fallback option (Lars Schmertmann). * Added --user-show-filter option (Victor Lopez). + * Fixed a bug in the Mercurial log parser that caused changes to be missed. * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. diff --git a/src/formats/hg.cpp b/src/formats/hg.cpp index 7a4e612c..984e6e6e 100644 --- a/src/formats/hg.cpp +++ b/src/formats/hg.cpp @@ -114,7 +114,7 @@ bool MercurialLog::parseCommitEntry(RCommit& commit) { std::string line; std::vector entries; - if(!logf->getNextLine(line)) return false; + if(!getNextLine(line)) return false; //custom line if(!hg_regex.match(line, &entries)) return false; From ebf158b46bb57df6d8627d419486ca1c4ac44ea3 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Sun, 30 Sep 2018 11:31:58 +0200 Subject: [PATCH 33/38] Fixed file removal being cancelled by an action with an earlier timestamp. Thanks to Lars Schmertmann for helping debug this issue. --- ChangeLog | 1 + src/action.cpp | 27 ++++++++++----------------- src/action.h | 11 ++++++----- src/dirnode.cpp | 2 +- src/file.cpp | 23 ++++++++++++++++------- src/file.h | 7 +++++-- src/gource.cpp | 22 +++++++++++----------- src/gource.h | 4 ++-- src/user.cpp | 2 +- 9 files changed, 53 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c728743..d5751096 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ * Added --file-extension-fallback option (Lars Schmertmann). * Added --user-show-filter option (Victor Lopez). * Fixed a bug in the Mercurial log parser that caused changes to be missed. + * Fixed file removal being cancelled by an action with an earlier timestamp. * Fixed a bug in the log file format detection that could result in the wrong first entry being displayed for a custom log. diff --git a/src/action.cpp b/src/action.cpp index 1278a4ce..3059c7db 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -17,18 +17,12 @@ #include "action.h" -RAction::RAction(RUser* source, RFile* target, float addedtime) { - this->source = source; - this->target = target; - this->addedtime = addedtime; - - progress = 0.0; - - rate = 0.5; +RAction::RAction(RUser* source, RFile* target, time_t timestamp, float t, const vec3& colour) + : colour(colour), source(source), target(target), timestamp(timestamp), t(t), progress(0.0f), rate(0.5f) { } void RAction::apply() { - target->touch(colour); + target->touch(timestamp, colour); } void RAction::logic(float dt) { @@ -104,12 +98,12 @@ void RAction::draw(float dt) { glEnd(); } -CreateAction::CreateAction(RUser* source, RFile* target, float addedtime) : RAction(source, target, addedtime) { - colour = vec3(0.0, 1.0, 0.0); +CreateAction::CreateAction(RUser* source, RFile* target, time_t timestamp, float t) + : RAction(source, target, timestamp, t, vec3(0.0f, 1.0f, 0.0f)) { } -RemoveAction::RemoveAction(RUser* source, RFile* target, float addedtime): RAction(source, target, addedtime) { - colour = vec3(1.0, 0.0, 0.0); +RemoveAction::RemoveAction(RUser* source, RFile* target, time_t timestamp, float t) + : RAction(source, target, timestamp, t, vec3(1.0f, 0.0f, 0.0f)) { } void RemoveAction::logic(float dt) { @@ -118,13 +112,12 @@ void RemoveAction::logic(float dt) { RAction::logic(dt); if(old_progress < 1.0 && progress >= 1.0) { - target->remove(); + target->remove(timestamp); } } -ModifyAction::ModifyAction(RUser* source, RFile* target, float addedtime, const vec3& modify_colour) - : modify_colour(modify_colour), RAction(source, target, addedtime) { - colour = vec3(1.0, 0.7, 0.3); +ModifyAction::ModifyAction(RUser* source, RFile* target, time_t timestamp, float t, const vec3& modify_colour) + : RAction(source, target, timestamp, t, vec3(1.0f, 0.7f, 0.3f)), modify_colour(modify_colour) { } void ModifyAction::apply() { diff --git a/src/action.h b/src/action.h index 93d167a7..0cbb3848 100644 --- a/src/action.h +++ b/src/action.h @@ -32,12 +32,13 @@ class RAction { RUser* source; RFile* target; - float addedtime; + time_t timestamp; + float t; float progress; float rate; - RAction(RUser* source, RFile* target, float addedtime); + RAction(RUser* source, RFile* target, time_t timestamp, float t, const vec3& colour); virtual ~RAction() {}; inline bool isFinished() const { return (progress >= 1.0); }; @@ -50,12 +51,12 @@ class RAction { class CreateAction : public RAction { public: - CreateAction(RUser* source, RFile* target, float addedtime); + CreateAction(RUser* source, RFile* target, time_t timestamp, float t); }; class RemoveAction : public RAction { public: - RemoveAction(RUser* source, RFile* target, float addedtime); + RemoveAction(RUser* source, RFile* target, time_t timestamp, float t); void logic(float dt); }; @@ -64,7 +65,7 @@ class ModifyAction : public RAction { protected: vec3 modify_colour; public: - ModifyAction(RUser* source, RFile* target, float addedtime, const vec3& modify_colour); + ModifyAction(RUser* source, RFile* target, time_t timestamp, float t, const vec3& modify_colour); void apply(); }; diff --git a/src/dirnode.cpp b/src/dirnode.cpp index c0fc5703..dfb48df2 100644 --- a/src/dirnode.cpp +++ b/src/dirnode.cpp @@ -430,7 +430,7 @@ bool RDirNode::addFile(RFile* f) { if(f->path.find(file->fullpath) == 0) { //fprintf(stderr, "removing %s as is actually the directory of %s\n", file->fullpath.c_str(), f->fullpath.c_str()); - file->remove(true); + file->remove(); break; } } diff --git a/src/file.cpp b/src/file.cpp index cf9b01f8..d35fad2d 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -40,8 +40,10 @@ RFile::RFile(const std::string & name, const vec3 & colour, const vec2 & pos, in last_action = 0.0f; fade_start = -1.0f; + removed_timestamp = 0; expired = false; forced_removal = false; + removing = false; shadow = true; @@ -74,10 +76,16 @@ RFile::~RFile() { //glDeleteLists(namelist, 1); } -void RFile::remove(bool force) { +void RFile::remove(time_t removed_timestamp) { last_action = elapsed; fade_start = elapsed; - if(force) forced_removal = true; + removing = true; + this->removed_timestamp = removed_timestamp; +} + +void RFile::remove() { + forced_removal = true; + remove(0); } void RFile::setDir(RDirNode* dir) { @@ -248,17 +256,18 @@ void RFile::logic(float dt) { if(isHidden() && !forced_removal) elapsed = 0.0; } -void RFile::touch(const vec3 & colour) { - if(forced_removal) return; +void RFile::touch(time_t touched_timestamp, const vec3 & colour) { + if(forced_removal || (removing && touched_timestamp < removed_timestamp)) return; - fade_start = -1.0f; - //fprintf(stderr, "touch %s\n", fullpath.c_str()); + fade_start = -1.0f; + removing = false; + removed_timestamp = 0; last_action = elapsed; touch_colour = colour; - //un expire file + //un expire file if touched after being removed if(expired) { for(std::vector::iterator it = gGourceRemovedFiles.begin(); it != gGourceRemovedFiles.end(); it++) { if((*it) == this) { diff --git a/src/file.h b/src/file.h index 61128ee0..f36ca487 100644 --- a/src/file.h +++ b/src/file.h @@ -30,7 +30,9 @@ class RFile : public Pawn { RDirNode* dir; + time_t removed_timestamp; bool forced_removal; + bool removing; bool expired; float fade_start; @@ -67,7 +69,7 @@ class RFile : public Pawn { float getAlpha() const; - void touch(const vec3 & colour); + void touch(time_t touch_timestamp, const vec3& colour); void setSelected(bool selected); @@ -83,7 +85,8 @@ class RFile : public Pawn { void logic(float dt); void draw(float dt); - void remove(bool force=false); + void remove(time_t removed_timestamp); + void remove(); vec2 getAbsolutePos() const; diff --git a/src/gource.cpp b/src/gource.cpp index d8361140..17007c30 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -1168,12 +1168,12 @@ void Gource::readLog() { //debugLog("current date: %s\n", displaydate.c_str()); } -void Gource::processCommit(RCommit& commit, float t) { +void Gource::processCommit(const RCommit& commit, float t) { //find files of this commit or create it - for(std::list::iterator it = commit.files.begin(); it != commit.files.end(); it++) { + for(std::list::const_iterator it = commit.files.begin(); it != commit.files.end(); it++) { - RCommitFile& cf = *it; + const RCommitFile& cf = *it; RFile* file = 0; //is this a directory (ends in slash) @@ -1204,7 +1204,7 @@ void Gource::processCommit(RCommit& commit, float t) { for(std::list::iterator it = dir_files.begin(); it != dir_files.end(); it++) { RFile* file = *it; - addFileAction(commit.username, cf, file, t); + addFileAction(commit, cf, file, t); } } @@ -1220,11 +1220,11 @@ void Gource::processCommit(RCommit& commit, float t) { if(!file) continue; } - addFileAction(commit.username, cf, file, t); + addFileAction(commit, cf, file, t); } } -void Gource::addFileAction(const std::string& username, const RCommitFile& cf, RFile* file, float t) { +void Gource::addFileAction(const RCommit& commit, const RCommitFile& cf, RFile* file, float t) { //create user if havent yet. do it here to ensure at least one of there files //was added (incase we hit gGourceSettings.max_files) @@ -1232,11 +1232,11 @@ void Gource::addFileAction(const std::string& username, const RCommitFile& cf, R RUser* user = 0; //see if user already exists - std::map::iterator seen_user = users.find(username); + std::map::iterator seen_user = users.find(commit.username); if(seen_user != users.end()) user = seen_user->second; if(user == 0) { - user = addUser(username); + user = addUser(commit.username); if(gGourceSettings.highlight_all_users) user->setHighlighted(true); else { @@ -1260,12 +1260,12 @@ void Gource::addFileAction(const std::string& username, const RCommitFile& cf, R commit_seq++; if(cf.action == "D") { - userAction = new RemoveAction(user, file, t); + userAction = new RemoveAction(user, file, commit.timestamp, t); } else { if(cf.action == "A") { - userAction = new CreateAction(user, file, t); + userAction = new CreateAction(user, file, commit.timestamp, t); } else { - userAction = new ModifyAction(user, file, t, cf.colour); + userAction = new ModifyAction(user, file, commit.timestamp, t, cf.colour); } } diff --git a/src/gource.h b/src/gource.h index 22ade949..06d646a5 100644 --- a/src/gource.h +++ b/src/gource.h @@ -215,8 +215,8 @@ class Gource : public SDLApp { void logReadingError(const std::string& error); - void processCommit(RCommit& commit, float t); - void addFileAction(const std::string& username, const RCommitFile& cf, RFile* file, float t); + void processCommit(const RCommit& commit, float t); + void addFileAction(const RCommit& commit, const RCommitFile& cf, RFile* file, float t); std::string dateAtPosition(float percent); diff --git a/src/user.cpp b/src/user.cpp index f6509c3b..8875d2a3 100644 --- a/src/user.cpp +++ b/src/user.cpp @@ -246,7 +246,7 @@ void RUser::logic(float t, float dt) { RAction* action = *it; //add all files which are too old - if(gGourceSettings.max_file_lag>=0.0 && action->addedtime < t - gGourceSettings.max_file_lag) { + if(gGourceSettings.max_file_lag>=0.0 && action->t < t - gGourceSettings.max_file_lag) { it = actions.erase(it); actionCount--; action->rate = 2.0; From 71057b8994db135e6d4cd949167861888e913130 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Mon, 1 Oct 2018 13:48:28 +1300 Subject: [PATCH 34/38] Removed some functions that didn't do anything. --- src/file.cpp | 32 -------------------------------- src/file.h | 6 +----- src/gource.cpp | 10 ---------- src/gource.h | 2 -- 4 files changed, 1 insertion(+), 49 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index d35fad2d..2ada6fb1 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -65,15 +65,12 @@ RFile::RFile(const std::string & name, const vec3 & colour, const vec2 & pos, in file_font.setColour(vec4(gGourceSettings.filename_colour, 1.0f)); } - //namelist = glGenLists(1); - //label = 0; setSelected(false); dir = 0; } RFile::~RFile() { - //glDeleteLists(namelist, 1); } void RFile::remove(time_t removed_timestamp) { @@ -136,35 +133,6 @@ void RFile::setFilename(const std::string& abs_file_path) { } } -int call_count = 0; - - -void RFile::setSelected(bool selected) { -// if(font.getFTFont()!=0 && this->selected==selected) return; - //if(label && this->selected==selected) return; - -// if(!label) label = new FXLabel(); - - Pawn::setSelected(selected); - -// updateLabel(); - - //pre-compile name display list - //glNewList(namelist, GL_COMPILE); - // font.draw(0.0f, 0.0f, (selected || shortname.size()==0) ? name : shortname); - //glEndList(); -} - -void RFile::updateLabel() { -/* bool show_file_ext = gGourceSettings.file_extensions; - - if(selected) { - label->setText(file_selected_font, (selected || !show_file_ext) ? name : ext); - } else { - label->setText(file_font, (selected || !show_file_ext) ? name : ext); - }*/ -} - void RFile::colourize() { file_colour = ext.size() ? colourHash(ext) : vec3(1.0f, 1.0f, 1.0f); } diff --git a/src/file.h b/src/file.h index f36ca487..e8b75e87 100644 --- a/src/file.h +++ b/src/file.h @@ -32,8 +32,8 @@ class RFile : public Pawn { time_t removed_timestamp; bool forced_removal; - bool removing; bool expired; + bool removing; float fade_start; @@ -71,10 +71,6 @@ class RFile : public Pawn { void touch(time_t touch_timestamp, const vec3& colour); - void setSelected(bool selected); - - void updateLabel(); - void setHidden(bool hidden); void setDest(const vec2 & dest){ this->dest = dest; } diff --git a/src/gource.cpp b/src/gource.cpp index 17007c30..2177734a 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -766,8 +766,6 @@ void Gource::keyPress(SDL_KeyboardEvent *e) { gGourceSettings.file_extensions = true; gGourceSettings.hide_filenames = false; } - - update_file_labels = true; } if (e->keysym.sym == SDLK_r) { @@ -877,7 +875,6 @@ void Gource::reset() { if(dirNodeTree!=0) delete dirNodeTree; recolour = false; - update_file_labels = false; userTree = 0; dirNodeTree = 0; @@ -1658,13 +1655,6 @@ void Gource::logic(float t, float dt) { recolour = false; } - if(update_file_labels) { - for(std::map::iterator it = files.begin(); it != files.end(); it++) { - it->second->updateLabel(); - } - update_file_labels = false; - } - //still want to update camera while paused if(paused) { updateBounds(); diff --git a/src/gource.h b/src/gource.h index 06d646a5..8691c6c9 100644 --- a/src/gource.h +++ b/src/gource.h @@ -81,8 +81,6 @@ class Gource : public SDLApp { bool recolour; - bool update_file_labels; - bool use_selection_bounds; Bounds2D selection_bounds; From 55fe062c1f04e34843b26f4c41fbf8689e84a646 Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Tue, 2 Oct 2018 16:56:15 +1300 Subject: [PATCH 35/38] Right mouse button rotation now pivots around the camera. --- ChangeLog | 1 + src/dirnode.cpp | 17 ++++++++++++----- src/dirnode.h | 1 + src/gource.cpp | 24 +++++++++++++++++++----- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5751096..2efc7295 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 0.50: + * Right mouse button rotation now pivots around the camera. * Added --no-time-travel option (Lars Schmertmann). * Added --dir-name-position option (Lars Schmertmann). * Added --file-extension-fallback option (Lars Schmertmann). diff --git a/src/dirnode.cpp b/src/dirnode.cpp index dfb48df2..6d23f385 100644 --- a/src/dirnode.cpp +++ b/src/dirnode.cpp @@ -114,15 +114,23 @@ void RDirNode::nodeUpdated(bool userInitiated) { } void RDirNode::rotate(float s, float c) { + pos = rotate_vec2(pos, s, c); + spos = rotate_vec2(spos, s, c); - if(parent != 0) { - pos = rotate_vec2(pos, s, c); - spos = rotate_vec2(spos, s, c); + for(std::list::iterator it = children.begin(); it != children.end(); it++) { + RDirNode* child = (*it); + child->rotate(s, c); } +} + +void RDirNode::rotate(float s, float c, const vec2& centre) { + + pos = rotate_vec2(pos - centre, s, c) + centre; + spos = rotate_vec2(spos - centre, s, c) + centre; for(std::list::iterator it = children.begin(); it != children.end(); it++) { RDirNode* child = (*it); - child->rotate(s, c); + child->rotate(s, c, centre); } } @@ -792,7 +800,6 @@ void RDirNode::move(float dt) { //the root node is the centre of the world if(parent == 0) { - pos = vec2(0.0f); return; } diff --git a/src/dirnode.h b/src/dirnode.h index 7ae124f9..8a78782b 100644 --- a/src/dirnode.h +++ b/src/dirnode.h @@ -173,6 +173,7 @@ class RDirNode : public QuadItem { void setPos(const vec2 & pos); void rotate(float s, float c); + void rotate(float s, float c, const vec2& centre); void setParent(RDirNode* parent); diff --git a/src/gource.cpp b/src/gource.cpp index 2177734a..efae7221 100644 --- a/src/gource.cpp +++ b/src/gource.cpp @@ -1637,14 +1637,28 @@ void Gource::logic(float t, float dt) { float s = sinf(rotate_angle); float c = cosf(rotate_angle); - root->rotate(s, c); + if(manual_rotate) { + // rotate around camera position if manual + vec2 centre = vec2(camera.getPos()); - for(std::map::iterator it = users.begin(); it!=users.end(); it++) { - RUser* user = it->second; + root->rotate(s, c, centre); + + for(std::map::iterator it = users.begin(); it!=users.end(); it++) { + RUser* user = it->second; + + vec2 rotated_user_pos = rotate_vec2(user->getPos() - centre, s, c) + centre; + user->setPos(rotated_user_pos); + } + } else { + root->rotate(s, c); - vec2 userpos = user->getPos(); + for(std::map::iterator it = users.begin(); it!=users.end(); it++) { + RUser* user = it->second; + + vec2 rotated_user_pos = rotate_vec2(user->getPos(), s, c); + user->setPos(rotated_user_pos); + } - user->setPos(rotate_vec2(userpos, s, c)); } rotate_angle = 0.0f; From 2dc7de4ea5294e3096bdd10368248c2d2d04676e Mon Sep 17 00:00:00 2001 From: Andrew Caudwell Date: Wed, 3 Oct 2018 14:24:39 +1300 Subject: [PATCH 36/38] Updated core module. --- src/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core b/src/core index 66fb8931..610f172c 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 66fb89313079612901bba1e33928fb1c2f95f0f0 +Subproject commit 610f172c4c1e5d1d0d98f12d5b31d765c81e5515 From 7bb7eae1432881a279c0e6059208d77408e972b8 Mon Sep 17 00:00:00 2001 From: Seth Berrier Date: Sat, 29 Apr 2017 12:42:35 -0500 Subject: [PATCH 37/38] New CL options to customize title independent of date - New CL option to set title size/color separate from date - New CL option to swap position of date and title - Tweaked the y position calc of top-center/bottom-left text - New CL options to adjust y position of date or title Changes to be committed: modified: src/gource.cpp modified: src/gource.h modified: src/gource_settings.cpp modified: src/gource_settings.h --- src/gource_settings.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gource_settings.cpp b/src/gource_settings.cpp index c46985d7..a79d6543 100644 --- a/src/gource_settings.cpp +++ b/src/gource_settings.cpp @@ -117,6 +117,10 @@ if(extended_help) { printf(" --font-size SIZE Font size used by date and title\n"); printf(" --font-colour FFFFFF Font colour used by date and title in hex\n\n"); + printf(" --file-extensions Show filename extensions only\n"); + printf(" --file-extension-fallback Use filename as extension if the extension\n"); + printf(" is missing or empty\n\n"); + printf(" --title-size SIZE Font size used by title (overrides font-size)\n"); printf(" --title-colour FFFFFF Font colour used by title in hex (overrides font-colour)\n\n"); @@ -125,11 +129,6 @@ if(extended_help) { printf(" --swap-title-and-date Exchange the posiiton of the title and date\n\n"); - printf(" --file-extensions Show filename extensions only\n\n"); - - printf(" --file-extension-fallback Use filename as extension if the\n"); - printf(" extension is missing or empty\n\n"); - printf(" --git-branch Get the git log of a particular branch\n\n"); printf(" --hide DISPLAY_ELEMENT bloom,date,dirnames,files,filenames,mouse,progress,\n"); From 8c5284f2b70b3b2b157279f39331bafabb32b344 Mon Sep 17 00:00:00 2001 From: Seth Berrier Date: Thu, 6 Dec 2018 09:39:23 -0600 Subject: [PATCH 38/38] Updating submodule revision --- src/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core b/src/core index 610f172c..683d98ba 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 610f172c4c1e5d1d0d98f12d5b31d765c81e5515 +Subproject commit 683d98ba22965e45cb1c26329caee1eebcb3b7c4