aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorKent Slaney2024-09-12 21:56:49 -0700
committerKent Slaney2024-09-12 21:56:49 -0700
commit50a8d7814343c82e738123b409079d457a34b351 (patch)
treeb8a49d23d122296b83be4e603b4d4eb218063fee /PKGBUILD
parentcee7dc8d2b812c95f90fa28b0442fcdebabe0953 (diff)
downloadaur-50a8d7814343c82e738123b409079d457a34b351.tar.gz
use wine bin from heroic config if available
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD14
1 files changed, 11 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a5be90e78163..e3094428edb8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Kent Slaney <kent@slaney.org>
pkgname=bakkesmod-legendary
pkgver=2.43
-pkgrel=6
+pkgrel=7
pkgdesc="A mod aimed at making you better at Rocket League!"
arch=('x86_64')
url="https://bakkesmod.com/"
@@ -194,6 +194,7 @@ package() {
# heroic env variables
import json
if not env.is_file():
+ print("wine")
exit(0)
with open(env) as fp:
opt = json.load(fp)
@@ -212,10 +213,14 @@ package() {
if changed:
with open(env, "w") as fp:
json.dump(opt, fp, indent=2)
+ try:
+ print(opt["Sugar"]["wineVersion"]["bin"])
+ except:
+ print("wine")
EOF
)
cfg="$(dirname "$installed")/config.ini"
- PFX="$bm_pfx" FP="$cfg" SUGAR_ENV="$(heroic_env)" python -c "$py"
+ wine_bin=`PFX="$bm_pfx" FP="$cfg" SUGAR_ENV="$(heroic_env)" python -c "$py"`
sed "s/^ \{8\}//" <<" EOF" > "$bm_pfx/runner.py"
import argparse, os, shlex, pathlib
@@ -263,7 +268,10 @@ package() {
ln -sf "$dll_path/bakkesmod_official.dll" "$dll_path/bakkesmod.dll"
cp -f "$srcdir/inject.exe" "$bm_pfx"
- ( cd "$srcdir/powershell-wrapper-for-wine-$pwsh_sum" && WINEPREFIX="$pfx" powershell "wine64" ) 2> /dev/null
+ (
+ cd "$srcdir/powershell-wrapper-for-wine-$pwsh_sum" &&
+ LD_PRELOAD= WINEPREFIX="$pfx" powershell "$wine_bin"
+ ) 2> >(grep --color=NEVER mismatch >&2)
}
pre_remove() {