diff options
author | François Revol <revol@free.fr> | 2019-03-26 23:44:08 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-03-29 14:33:27 +0100 |
commit | 37a0f047122163a23fb8a09ad7a57b6302e2ea40 (patch) | |
tree | 2a63146627b09c2d8139e4a059eea799d9052c5b /src | |
parent | cde93480099454b46cc5398c4f1cd4bd4b44062a (diff) |
Haiku: add version info to the resources like win32 does
Diffstat (limited to 'src')
-rw-r--r-- | src/haiku/meson.build | 17 | ||||
-rw-r--r-- | src/haiku/mpd.rdef.in (renamed from src/haiku/mpd.rdef) | 10 |
2 files changed, 25 insertions, 2 deletions
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 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" |