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.
This commit is contained in:
Jehan 2019-11-30 15:18:18 +01:00
parent 1b03513fc6
commit 73c09ebb32
2 changed files with 36 additions and 2 deletions

View File

@ -223,8 +223,12 @@ gimp_version (gboolean be_verbose,
lib_versions = gimp_library_versions (localized); lib_versions = gimp_library_versions (localized);
verbose_info = g_strdup_printf ("git-describe: %s\n" verbose_info = g_strdup_printf ("git-describe: %s\n"
"C compiler:\n%s\n%s", "Build: %s rev %s for %s\n"
GIMP_GIT_VERSION, CC_VERSION, "# C compiler #\n%s\n"
"# Libraries #\n%s",
GIMP_GIT_VERSION,
GIMP_BUILD_ID, GIMP_BUILD_REVISION, GIMP_BUILD_PLATFORM,
CC_VERSION,
lib_versions); lib_versions);
g_free (lib_versions); g_free (lib_versions);

View File

@ -2657,6 +2657,36 @@ NOTE: if you plan on packaging GIMP for distribution, it is recommended
" "
fi 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 # # Default ICC directory #
######################### #########################