[gimp/gimp-2-10] app, configure: add configure option for a build id and revision.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app, configure: add configure option for a build id and revision.
- Date: Thu, 6 Feb 2020 23:14:42 +0000 (UTC)
commit 8537ee86612f0e1c2125f53799c6dd3efb0f1441
Author: Jehan <jehan girinstud io>
Date: Sat Nov 30 15:18:18 2019 +0100
app, configure: add configure option for a build id and revision.
The point will be for a packager to create a unique build ID to identify
the build or provenance. I also add a revision number so that we can
identify 2 builds from the same version/commit, same maker and platform.
It will also be used later to check for new versions (see "phone home"
feature #2584).
Separating autotools and meson commits for easy backport.
(cherry picked from commit 73c09ebb324a29c3aa7af831c4a6120fdbda15f2)
app/gimp-version.c | 8 ++++++--
configure.ac | 30 ++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
---
diff --git a/app/gimp-version.c b/app/gimp-version.c
index 1ca4960e58..0f7bfb9bf9 100644
--- a/app/gimp-version.c
+++ b/app/gimp-version.c
@@ -223,8 +223,12 @@ gimp_version (gboolean be_verbose,
lib_versions = gimp_library_versions (localized);
verbose_info = g_strdup_printf ("git-describe: %s\n"
- "C compiler:\n%s\n%s",
- GIMP_GIT_VERSION, CC_VERSION,
+ "Build: %s rev %s for %s\n"
+ "# C compiler #\n%s\n"
+ "# Libraries #\n%s",
+ GIMP_GIT_VERSION,
+ GIMP_BUILD_ID, GIMP_BUILD_REVISION, GIMP_BUILD_PLATFORM,
+ CC_VERSION,
lib_versions);
g_free (lib_versions);
diff --git a/configure.ac b/configure.ac
index 7c176cfc0d..1e77af5548 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2551,6 +2551,36 @@ NOTE: if you plan on packaging GIMP for distribution, it is recommended
"
fi
+#####################
+# Build identifiers #
+#####################
+
+AC_ARG_WITH(build-id,
+ [ --with-build-id A unique string used to define your build],,
+ [with_build_id="unknown"])
+AC_DEFINE_UNQUOTED(GIMP_BUILD_ID, "$with_build_id",
+ [The string defining the build])
+
+AC_ARG_WITH(revision,
+ [ --with-revision Revision increment for a same build/version/platform],,
+ [with_revision="0"])
+AC_DEFINE_UNQUOTED(GIMP_BUILD_REVISION, "$with_revision",
+ [The revision increment for a same build/version/platform])
+
+AC_DEFINE_UNQUOTED(GIMP_BUILD_PLATFORM, "$host_os",
+ [The OS this was built for])
+if test "x$platform_linux" = xyes; then
+ platform_family="linux"
+elif test "x$platform_win32" = xyes; then
+ platform_family="windows"
+elif test "x$platform_osx" = xyes; then
+ platform_family="macos"
+else
+ platform_family="other"
+fi
+AC_DEFINE_UNQUOTED(GIMP_BUILD_PLATFORM_FAMILY, "$platform_family",
+ [The OS family this was built for])
+
#########################
# Default ICC directory #
#########################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]