meson: new build id and revision also in meson configuration.

This commit is contained in:
Jehan 2019-11-30 15:27:30 +01:00
parent 73c09ebb32
commit 0dd4feaafd
2 changed files with 18 additions and 1 deletions

View File

@ -1087,6 +1087,21 @@ endif
conf.set_quoted('PACKAGE_BUGREPORT', project_url_issues) conf.set_quoted('PACKAGE_BUGREPORT', project_url_issues)
conf.set_quoted('BUG_REPORT_URL', bug_report_url) conf.set_quoted('BUG_REPORT_URL', bug_report_url)
# Build identifiers #
conf.set_quoted('GIMP_BUILD_ID', get_option('build-id'))
conf.set_quoted('GIMP_BUILD_REVISION', get_option('revision').to_string())
conf.set_quoted('GIMP_BUILD_PLATFORM', host_os)
if platform_linux
conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'linux')
elif platform_windows
conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'windows')
elif platform_osx
conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'macos')
else
conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'other')
endif
# Default ICC directory # # Default ICC directory #
# This is necessary because some Unix systems may have a different # This is necessary because some Unix systems may have a different
@ -1364,7 +1379,7 @@ else
# See also: https://github.com/mesonbuild/meson/pull/6179 # See also: https://github.com/mesonbuild/meson/pull/6179
cc_version = '\\n'.join(cc_version.split('\n')) cc_version = '\\n'.join(cc_version.split('\n'))
endif endif
conf.set_quoted('CC_VERSION', cc_version) conf.set_quoted('CC_VERSION', cc_version.strip())
# Names # Names
conf.set_quoted('GIMP_PACKAGE', meson.project_name()) conf.set_quoted('GIMP_PACKAGE', meson.project_name())

View File

@ -12,6 +12,8 @@ option('relocatable-bundle',type: 'feature', value: 'auto', description: 'build
option('shmem-type', type: 'combo', value: 'auto', description: 'Shared memory transport type', option('shmem-type', type: 'combo', value: 'auto', description: 'Shared memory transport type',
choices: [ 'none', 'sysv', 'posix', 'win32', 'auto' ]) choices: [ 'none', 'sysv', 'posix', 'win32', 'auto' ])
option('build-id', type: 'string', value: 'unknown', description: 'Unique string used to define your build')
option('revision', type: 'integer', value: 0, description: 'Revision increment for a same build/version/platform')
option('bug-report-url', type: 'string', value: '', description: 'URL used by the debug dialog to report bugs') option('bug-report-url', type: 'string', value: '', description: 'URL used by the debug dialog to report bugs')
option('gimpdir', type: 'string', value: '', description: 'Change default gimpdir from ~/.config/GIMP/2.9 to ~/.config/DIR/2.9 (if relative), or to DIR (if absolute)') option('gimpdir', type: 'string', value: '', description: 'Change default gimpdir from ~/.config/GIMP/2.9 to ~/.config/DIR/2.9 (if relative), or to DIR (if absolute)')
option('icc-directory', type: 'string', value: '', description: 'Path to default color profiles for this system') option('icc-directory', type: 'string', value: '', description: 'Path to default color profiles for this system')