[gimp] 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] app, configure: add configure option for a build id and revision.
- Date: Fri, 13 Dec 2019 16:59:56 +0000 (UTC)
commit 73c09ebb324a29c3aa7af831c4a6120fdbda15f2
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.
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 ae522fe7f1..6217197b81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2657,6 +2657,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]