meson: Provide options to set CFBundleVersion and CFBundleVersionString in XQuartz
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 4f5999826a
)
This commit is contained in:
parent
37285e6252
commit
a6a20a7c40
|
@ -6,8 +6,19 @@ bundle_id_prefix = get_option('bundle-id-prefix')
|
|||
xquartz_sparkle_feed_url = get_option('sparkle-feed-url')
|
||||
xquartz_sparkle_public_edkey = get_option('sparkle-public-edkey')
|
||||
|
||||
bundle_version_string = meson.project_version() # CFBundleShortVersionString
|
||||
bundle_version = release # CFBundleVersion
|
||||
bundle_version_string = get_option('bundle-version-string') # CFBundleShortVersionString
|
||||
if bundle_version_string == 'auto'
|
||||
bundle_version_string = meson.project_version()
|
||||
endif
|
||||
|
||||
bundle_version = get_option('bundle-version') # CFBundleVersion
|
||||
if bundle_version == 'auto'
|
||||
version_arr = bundle_version_string.split('.')
|
||||
version_major = version_arr[0].to_int()
|
||||
version_minor = version_arr[1].to_int()
|
||||
version_tiny = version_arr[2].to_int()
|
||||
bundle_version = '@0@.@1@.@2@'.format(version_major, version_minor, version_tiny)
|
||||
endif
|
||||
|
||||
bundle_id_def = '-DBUNDLE_ID_PREFIX="@0@"'.format(bundle_id_prefix)
|
||||
|
||||
|
|
|
@ -116,6 +116,10 @@ option('apple-application-name', type: 'string', value: 'X11',
|
|||
description: 'Application name')
|
||||
option('bundle-id-prefix', type: 'string', value: 'org.x',
|
||||
description: 'RDNS prefix for bundle identifier')
|
||||
option('bundle-version', type: 'string', value: 'auto',
|
||||
description: 'The CFBundleVersion for the application bundle')
|
||||
option('bundle-version-string', type: 'string', value: 'auto',
|
||||
description: 'The CFBundleShortVersionString for the application bundle')
|
||||
option('sparkle-feed-url', type: 'string',
|
||||
description: 'Feed URL for autoupdating with the Sparkle Framework (default: disabled)')
|
||||
option('sparkle-public-edkey', type: 'string',
|
||||
|
|
Loading…
Reference in New Issue