From dc56a5aa6507e4f4d0ef6358627622b7ebc1dc3c Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 15 Jun 2021 10:33:42 +0100 Subject: [PATCH] all install programs support --version and a version bump to 8.12 for the new dev cycle --- ChangeLog | 3 +++ configure.ac | 8 ++++---- tools/Makefile.am | 4 ++-- tools/{vips-8.11 => vips-8.12} | 0 tools/vipsedit.c | 6 ++++++ tools/vipsheader.c | 6 ++++++ tools/vipsthumbnail.c | 6 ++++++ 7 files changed, 27 insertions(+), 6 deletions(-) rename tools/{vips-8.11 => vips-8.12} (100%) diff --git a/ChangeLog b/ChangeLog index d728fb96..c9b9980e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +14/6/21 started 8.12 +- all tools support `--version` + 14/8/20 started 8.11 - add vips_jpegload_source() and vips_svgload_source() to public C API - integrate doxygen in build system to generate C++ API docs diff --git a/configure.ac b/configure.ac index aa53f7ba..bf20f794 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # also update the version number in the m4 macros below -AC_INIT([vips], [8.11.0], [vipsip@jiscmail.ac.uk]) +AC_INIT([vips], [8.12.0], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ(2.62) @@ -17,7 +17,7 @@ AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [8]) -m4_define([vips_minor_version], [11]) +m4_define([vips_minor_version], [12]) m4_define([vips_micro_version], [0]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) @@ -42,9 +42,9 @@ VIPS_LIBS="" # binary interface changes backwards compatible?: increment age # binary interface changes not backwards compatible?: reset age to 0 -LIBRARY_CURRENT=55 LIBRARY_REVISION=0 -LIBRARY_AGE=13 +LIBRARY_CURRENT=56 +LIBRARY_AGE=14 # patched into include/vips/version.h AC_SUBST(VIPS_VERSION) diff --git a/tools/Makefile.am b/tools/Makefile.am index 6ad8258b..64b88b11 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -20,11 +20,11 @@ bin_SCRIPTS = \ batch_rubber_sheet \ batch_crop \ vipsprofile \ - vips-8.11 + vips-8.12 EXTRA_DIST = \ vipsprofile \ - vips-8.11 \ + vips-8.12 \ light_correct.in \ shrink_width.in \ batch_image_convert.in \ diff --git a/tools/vips-8.11 b/tools/vips-8.12 similarity index 100% rename from tools/vips-8.11 rename to tools/vips-8.12 diff --git a/tools/vipsedit.c b/tools/vipsedit.c index 218e8dd7..18d4c432 100644 --- a/tools/vipsedit.c +++ b/tools/vipsedit.c @@ -79,6 +79,7 @@ static char *xoffset = NULL; static char *yoffset = NULL; static char *endian = NULL; static gboolean setext = FALSE; +static gboolean version = FALSE; static GOptionEntry entries[] = { { "endian", 'n', 0, G_OPTION_ARG_STRING, &endian, @@ -111,6 +112,8 @@ static GOptionEntry entries[] = { N_( "set Ysize to N (deprecated, use height)" ), "N" }, { "type", 't', 0, G_OPTION_ARG_STRING, &interpretation, N_( "set Type to T (deprecated, use interpretation)" ), "T" }, + { "version", 'v', 0, G_OPTION_ARG_NONE, &version, + N_( "print version" ), NULL }, { NULL } }; @@ -170,6 +173,9 @@ main( int argc, char **argv ) for( argc = 0; argv[argc]; argc++ ) ; + if( version ) + printf( "vips-%s\n", vips_version_string() ); + if( argc != 2 ) { fprintf( stderr, _( "usage: %s [OPTION...] vips-file\n" ), g_get_prgname() ); diff --git a/tools/vipsheader.c b/tools/vipsheader.c index e634ccef..ed79f9d6 100644 --- a/tools/vipsheader.c +++ b/tools/vipsheader.c @@ -84,6 +84,7 @@ static char *main_option_field = NULL; static gboolean main_option_all = FALSE; +static gboolean version = FALSE; static GOptionEntry main_option[] = { { "all", 'a', 0, G_OPTION_ARG_NONE, &main_option_all, @@ -92,6 +93,8 @@ static GOptionEntry main_option[] = { N_( "print value of FIELD (\"getext\" reads extension block, " "\"Hist\" reads image history)" ), "FIELD" }, + { "version", 'v', 0, G_OPTION_ARG_NONE, &version, + N_( "print version" ), NULL }, { NULL } }; @@ -207,6 +210,9 @@ main( int argc, char *argv[] ) g_option_context_free( context ); + if( version ) + printf( "vips-%s\n", vips_version_string() ); + result = 0; for( i = 1; argv[i]; i++ ) { diff --git a/tools/vipsthumbnail.c b/tools/vipsthumbnail.c index ef23fc5a..afb956fd 100644 --- a/tools/vipsthumbnail.c +++ b/tools/vipsthumbnail.c @@ -138,6 +138,7 @@ static gboolean crop_image = FALSE; static gboolean no_rotate_image = FALSE; static char *smartcrop_image = NULL; static char *thumbnail_intent = NULL; +static gboolean version = FALSE; /* Deprecated and unused. */ @@ -183,6 +184,8 @@ static GOptionEntry options[] = { { "no-rotate", 0, 0, G_OPTION_ARG_NONE, &no_rotate_image, N_( "don't auto-rotate" ), NULL }, + { "version", 'v', 0, G_OPTION_ARG_NONE, &version, + N_( "print version" ), NULL }, { "format", 'f', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &output_format, @@ -528,6 +531,9 @@ main( int argc, char **argv ) g_option_context_free( context ); + if( version ) + printf( "vips-%s\n", vips_version_string() ); + if( thumbnail_size && thumbnail_parse_geometry( thumbnail_size ) ) vips_error_exit( NULL );