diff --git a/NEWS b/NEWS index 2b44b2909..b93d711b5 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.21.7 (not yet released) * fix build failure with -Dlocal_socket=false * Haiku - fix build + - add version info ver 0.21.6 (2019/03/17) * protocol diff --git a/src/haiku/meson.build b/src/haiku/meson.build index ff321d60e..390ecff17 100644 --- a/src/haiku/meson.build +++ b/src/haiku/meson.build @@ -1,10 +1,25 @@ +haiku_conf = configuration_data() +haiku_conf.set('VERSION', meson.project_version()) + +splitted_version = meson.project_version().split('~')[0].split('.') +haiku_conf.set('VERSION_MAJOR', splitted_version[0]) +haiku_conf.set('VERSION_MINOR', splitted_version.get(1, '0')) +haiku_conf.set('VERSION_REVISION', splitted_version.get(2, '0')) +haiku_conf.set('VERSION_EXTRA', splitted_version.get(3, '0')) + +mpd_rdef = configure_file( + input: 'mpd.rdef.in', + output: 'mpd.rdef', + configuration: haiku_conf, +) + rc = find_program('rc') xres = find_program('xres') rsrc = custom_target( 'mpd.rsrc', output: 'mpd.rsrc', - input: 'mpd.rdef', + input: mpd_rdef, command: [rc, '-o', '@OUTPUT@', '@INPUT@'], ) diff --git a/src/haiku/mpd.rdef b/src/haiku/mpd.rdef.in similarity index 93% rename from src/haiku/mpd.rdef rename to src/haiku/mpd.rdef.in index 6f1aca2d9..c4dbea63c 100644 --- a/src/haiku/mpd.rdef +++ b/src/haiku/mpd.rdef.in @@ -2,7 +2,15 @@ resource app_signature "application/x-vnd.MusicPD"; resource app_flags B_BACKGROUND_APP; -// TODO: resource app_version {}; +resource app_version { + major = @VERSION_MAJOR@, + middle = @VERSION_MINOR@, + minor = @VERSION_REVISION@, + variety = B_APPV_ALPHA, + internal = @VERSION_EXTRA@, + short_info = "Music Player Daemon @VERSION@", + long_info = "Music Player Daemon @VERSION@ ©The Music Player Daemon Project" +}; resource vector_icon { $"6E6369661F050102031604BEE29BBEC5403EC540BEE29B4A10004A10000001C6"