mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 13:40:05 +02:00
Print the Wine version at Meson configure time
This commit is contained in:
+15
-6
@@ -68,14 +68,23 @@ endif
|
||||
# convention to be specified on the `main()` functions or else `argc` and `argv`
|
||||
# will point to the wrong memory. Similarly, with other versions of Wine this
|
||||
# should _not_ be specified for the same reason. We'll try to figure out the
|
||||
# current Wine version and add this calling convention based on that.
|
||||
# current Wine version and add this calling convention based on that. Also,
|
||||
# printing the configure-time Wine version might be useful in diagnosing build
|
||||
# issues so we'll do just that. The regexp looks a bit weird because of the
|
||||
# lookahead. That's purely for aesthetics so we don't end up printing trailing
|
||||
# dots when parsing Wine version strings like `wine-6.4.r0.g7ec998e1 ( TkG Staging Esync Fsync )`.
|
||||
#
|
||||
# https://bugs.winehq.org/show_bug.cgi?id=49138
|
||||
wine_version = run_command('sh', '-c', '''wine --version | grep --only-matching -E '[0-9]+\.[0-9.]+' | head -n1''')
|
||||
if wine_version.returncode() == 0 and \
|
||||
wine_version.stdout().version_compare('>=5.7') and \
|
||||
wine_version.stdout().version_compare('<6.0')
|
||||
compiler_options += '-DWINE_USE_CDECL'
|
||||
wine_version = run_command('sh', '-c', '''wine --version | grep --only-matching -P '[0-9]+\.[0-9.]+?(?=\.)?' | head -n1''')
|
||||
if wine_version.returncode() == 0
|
||||
message('Targetting Wine @0@'.format(wine_version.stdout()))
|
||||
if wine_version.stdout().version_compare('>=5.7') and \
|
||||
wine_version.stdout().version_compare('<6.0')
|
||||
message('- Using the cdecl calling convention')
|
||||
compiler_options += '-DWINE_USE_CDECL'
|
||||
endif
|
||||
else
|
||||
warning('Unable to determine the current Wine version')
|
||||
endif
|
||||
|
||||
# Wine versions below 5.7 will segfault in `CoCreateGuid` which gets called
|
||||
|
||||
Reference in New Issue
Block a user