mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Print the Wine version at Meson configure time
This commit is contained in:
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
and this project adheres to [Semantic
|
and this project adheres to [Semantic
|
||||||
Versioning](https://semver.org/spec/v2.0.0.html).
|
Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- When building the package from source, the targetted Wine version gets printed
|
||||||
|
at configure-time. This can make it a bit easier to diagnose Wine-related
|
||||||
|
compilation issues.
|
||||||
|
|
||||||
## [3.1.0] - 2021-04-15
|
## [3.1.0] - 2021-04-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
+15
-6
@@ -68,14 +68,23 @@ endif
|
|||||||
# convention to be specified on the `main()` functions or else `argc` and `argv`
|
# 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
|
# 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
|
# 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
|
# 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''')
|
wine_version = run_command('sh', '-c', '''wine --version | grep --only-matching -P '[0-9]+\.[0-9.]+?(?=\.)?' | head -n1''')
|
||||||
if wine_version.returncode() == 0 and \
|
if wine_version.returncode() == 0
|
||||||
wine_version.stdout().version_compare('>=5.7') and \
|
message('Targetting Wine @0@'.format(wine_version.stdout()))
|
||||||
wine_version.stdout().version_compare('<6.0')
|
if wine_version.stdout().version_compare('>=5.7') and \
|
||||||
compiler_options += '-DWINE_USE_CDECL'
|
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
|
endif
|
||||||
|
|
||||||
# Wine versions below 5.7 will segfault in `CoCreateGuid` which gets called
|
# Wine versions below 5.7 will segfault in `CoCreateGuid` which gets called
|
||||||
|
|||||||
Reference in New Issue
Block a user