#!/usr/bin/env bash
set -e
shopt -s extglob
if [ -z “$1” ] || [ -z “$2” ]; then
echo “Usage: $0 version destdir [–no-package] [–dev-build]”
exit 1
fi
DXVK_VERSION=“$1”
DXVK_SRC_DIR=dirname $(readlink -f $0)
DXVK_BUILD_DIR=$(realpath “
2
"
)
"
/
d
x
v
k
−
n
a
t
i
v
e
−
2")"/dxvk-native-
2")"/dxvk−native−DXVK_VERSION”
DXVK_ARCHIVE_PATH=$(realpath “
2
"
)
"
/
d
x
v
k
−
n
a
t
i
v
e
−
2")"/dxvk-native-
2")"/dxvk−native−DXVK_VERSION.tar.gz”
if [ -e “$DXVK_BUILD_DIR” ]; then
echo “Build directory $DXVK_BUILD_DIR already exists”
exit 1
fi
shift 2
opt_nopackage=0
opt_devbuild=0
opt_buildid=false
while [ $# -gt 0 ]; do
case “$1” in
“–no-package”)
opt_nopackage=1
;;
“–dev-build”)
opt_nopackage=1
opt_devbuild=1
;;
“–build-id”)
opt_buildid=true
;;
*)
echo “Unrecognized option: $1” >&2
exit 1
esac
shift
done
function build_arch {
cd “$DXVK_SRC_DIR”
opt_strip=
if [ $opt_devbuild -eq 0 ]; then
opt_strip=–strip
fi
meson --buildtype “debug”
–prefix “$DXVK_BUILD_DIR”
o
p
t
s
t
r
i
p
−
D
e
n
a
b
l
e
t
e
s
t
s
=
t
r
u
e
−
D
d
x
v
k
n
a
t
i
v
e
w
s
i
=
w
a
y
l
a
n
d
−
D
b
u
i
l
d
i
d
=
opt_strip \ -Denable_tests=true \ -Ddxvk_native_wsi=wayland \ -Dbuild_id=
optstrip −Denabletests=true −Ddxvknativewsi=wayland −Dbuildid=opt_buildid
“$DXVK_BUILD_DIR/build”
cd “$DXVK_BUILD_DIR/build”
ninja install
if [ KaTeX parse error: Expected 'EOF', got '#' at position 32: … 0 ]; then #̲ get rid of som…DXVK_BUILD_DIR/build"
fi
}
function package {
cd “
D
X
V
K
B
U
I
L
D
D
I
R
/
.
.
"
t
a
r
−
c
z
f
"
DXVK_BUILD_DIR/.." tar -czf "
DXVKBUILDDIR/.."tar−czf"DXVK_ARCHIVE_PATH” “dxvk-native-
D
X
V
K
V
E
R
S
I
O
N
"
r
m
−
R
"
d
x
v
k
−
n
a
t
i
v
e
−
DXVK_VERSION" rm -R "dxvk-native-
DXVKVERSION"rm−R"dxvk−native−DXVK_VERSION”
}
build_arch
if [ $opt_nopackage -eq 0 ]; then
package
fi