Haiku: add version info to the resources like win32 does

This commit is contained in:
François Revol 2019-03-26 23:44:08 +01:00 committed by Max Kellermann
parent cde9348009
commit 37a0f04712
3 changed files with 26 additions and 2 deletions

1
NEWS
View File

@ -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

View File

@ -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@'],
)

View File

@ -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"