diff --git a/app/gimp-update.c b/app/gimp-update.c index 714c32755c..8c5cc18874 100644 --- a/app/gimp-update.c +++ b/app/gimp-update.c @@ -540,13 +540,13 @@ gimp_version_cmp (const gchar *v1, static const gchar * gimp_get_version_url (void) { -#ifdef GIMP_UNSTABLE +#ifdef GIMP_RELEASE + return "https://www.gimp.org/gimp_versions.json"; +#else if (g_getenv ("GIMP_DEV_VERSIONS_JSON")) return g_getenv ("GIMP_DEV_VERSIONS_JSON"); else return "https://testing.gimp.org/gimp_versions.json"; -#else - return "https://www.gimp.org/gimp_versions.json"; #endif } @@ -607,7 +607,7 @@ gimp_update_auto_check (GimpCoreConfig *config, if (prev_update_timestamp > current_timestamp) prev_update_timestamp = -1; -#ifndef GIMP_UNSTABLE +#ifdef GIMP_RELEASE /* Do not check more than once a week. */ if (current_timestamp - prev_update_timestamp < 3600L * 24L * 7L) return FALSE; diff --git a/configure.ac b/configure.ac index 6851a889b1..a9a4874f43 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,9 @@ m4_define([gimp_unstable], m4_define([gimp_stable], m4_if(m4_eval(gimp_minor_version % 2), [0], [yes], [no])) +m4_define([gimp_release], + m4_if(m4_eval(gimp_micro_version % 2), [0], [yes], [no])) + m4_define([gimp_full_name], [GNU Image Manipulation Program]) # required versions of other packages @@ -129,6 +132,7 @@ GIMP_DATA_VERSION=gimp_data_version GIMP_SYSCONF_VERSION=gimp_sysconf_version GIMP_USER_VERSION=gimp_user_version GIMP_UNSTABLE=gimp_unstable +GIMP_RELEASE=gimp_release GIMP_FULL_NAME="gimp_full_name" AC_SUBST(GIMP_MAJOR_VERSION) AC_SUBST(GIMP_MINOR_VERSION) @@ -148,6 +152,7 @@ AC_SUBST(GIMP_DATA_VERSION) AC_SUBST(GIMP_SYSCONF_VERSION) AC_SUBST(GIMP_USER_VERSION) AC_SUBST(GIMP_UNSTABLE) +AC_SUBST(GIMP_RELEASE) AC_SUBST(GIMP_FULL_NAME) # Version strings used in some source, though it seems unnecessary to @@ -234,10 +239,15 @@ AC_SUBST(LIBUNWIND_REQUIRED_VERSION) # and automake conditional. if test "x$GIMP_UNSTABLE" = "xyes"; then AC_DEFINE(GIMP_UNSTABLE, 1, - [Define to 1 if this is an unstable version of GIMP]) + [Define to 1 if this is code from the unstable branch of GIMP]) fi AM_CONDITIONAL(GIMP_UNSTABLE, test "x$GIMP_UNSTABLE" = "xyes") +if test "x$GIMP_RELEASE" = "xyes"; then + AC_DEFINE(GIMP_RELEASE, 1, + [Define to 1 if this is a release version of GIMP]) +fi +AM_CONDITIONAL(GIMP_RELEASE, test "x$GIMP_RELEASE" = "xyes") # libtool versioning m4_define([lt_current], [m4_eval(100 * gimp_minor_version + gimp_micro_version - gimp_interface_age)]) diff --git a/meson.build b/meson.build index 574a8a1c76..e777f5e6dc 100644 --- a/meson.build +++ b/meson.build @@ -59,9 +59,14 @@ conf.set_quoted('GETTEXT_PACKAGE', gettext_package) conf.set_quoted('GIMP_VERSION', gimp_version) +# GIMP_UNSTABLE tells if we are on an unstable or stable development branch. stable = (gimp_app_version_minor % 2 == 0) conf.set('GIMP_UNSTABLE', stable ? false : 1) +# GIMP_RELEASE tells if this is a release or in-between release (git) code. +release = (gimp_app_version_micro % 2 == 0) +conf.set('GIMP_RELEASE', release ? 1 : false) + versionconfig = configuration_data() versionconfig.set('GIMP_FULL_NAME', full_name) versionconfig.set('GIMP_MAJOR_VERSION', gimp_app_version_major)