Fix Wine version detection in build config

The non-greedy match would obviously not work with versions like `Wine
6.23`. Just matching `MAJOR.MINOR` is sufficient anyways.
This commit is contained in:
Robbert van der Helm
2021-12-07 01:07:04 +01:00
parent 35244d2c7f
commit e5c27e833b
2 changed files with 3 additions and 4 deletions
+1
View File
@@ -20,6 +20,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).
when the GUI changes. Yabridge now detects this, and removes the throttling we when the GUI changes. Yabridge now detects this, and removes the throttling we
have in place to prevent certain other plugins from getting stuck in infinite have in place to prevent certain other plugins from getting stuck in infinite
loops. loops.
- Fixed Wine version detection in the build configuration.
## [3.7.0] - 2021-11-21 ## [3.7.0] - 2021-11-21
+2 -4
View File
@@ -126,12 +126,10 @@ endif
# 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. Also, # current Wine version and add this calling convention based on that. Also,
# printing the configure-time Wine version might be useful in diagnosing build # 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 # issues so we'll do just that.
# 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 -P '[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 if wine_version.returncode() == 0
message('Targetting Wine @0@'.format(wine_version.stdout())) message('Targetting Wine @0@'.format(wine_version.stdout()))
if wine_version.stdout().version_compare('>=5.7') and \ if wine_version.stdout().version_compare('>=5.7') and \