[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH virt-viewer] build-sys: add --with-buildid to details build version



On Mon, Feb 11, 2013 at 04:48:20PM +0100, Marc-André Lureau wrote:
> Add a configure argument to append build version details, similar to
> what Daniel Berrange proposed in the "use finer package version in
> mingw-virt-viewer" thread on the ML.
> ---
>  configure.ac             | 4 ++++
>  src/remote-viewer-main.c | 2 +-
>  src/virt-viewer-main.c   | 2 +-
>  src/virt-viewer-window.c | 2 +-
>  4 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 30c2042..e0adfe4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -196,6 +196,10 @@ if test "x$have_gtk_vnc" != "xyes" && test "x$have_spice_gtk" != "xyes"; then
>      AC_MSG_ERROR([At least one of spice or vnc must be used])
>  fi
>  
> +AC_ARG_WITH([buildid],
> +    AS_HELP_STRING([--with-buildid=id], [Set additional build version details]))
> +AC_DEFINE_UNQUOTED([BUILDID], "$with_buildid", [Build version details])
> +
>  AC_CONFIG_FILES([
>      Makefile
>      data/Makefile
> diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
> index 048f6b4..33cd2b2 100644
> --- a/src/remote-viewer-main.c
> +++ b/src/remote-viewer-main.c
> @@ -44,7 +44,7 @@
>  static void
>  remote_viewer_version(void)
>  {
> -    g_print(_("remote-viewer version %s\n"), VERSION);
> +    g_print(_("remote-viewer version %s\n"), VERSION BUILDID);
>      exit(EXIT_SUCCESS);
>  }
>  
> diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
> index 8ac061a..51f8cc6 100644
> --- a/src/virt-viewer-main.c
> +++ b/src/virt-viewer-main.c
> @@ -35,7 +35,7 @@
>  
>  static void virt_viewer_version(void)
>  {
> -    g_print(_("%s version %s\n"), PACKAGE, VERSION);
> +    g_print(_("%s version %s\n"), PACKAGE, VERSION BUILDID);
>  
>      exit(EXIT_SUCCESS);
>  }
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index c5b485c..f4204cf 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -898,7 +898,7 @@ virt_viewer_window_menu_help_about(GtkWidget *menu G_GNUC_UNUSED,
>      GtkBuilder *about = virt_viewer_util_load_ui("virt-viewer-about.xml");
>  
>      GtkWidget *dialog = GTK_WIDGET(gtk_builder_get_object(about, "about"));
> -    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
> +    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION BUILDID);
>  
>      gtk_window_set_transient_for(GTK_WINDOW(dialog),
>                                   GTK_WINDOW(self->priv->window));


ACK

Though it needs .spec.in changes too, to make use of it

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]