【无标题】

#!/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")"/dxvknativeDXVK_VERSION”
DXVK_ARCHIVE_PATH=$(realpath “ 2 " ) " / d x v k − n a t i v e − 2")"/dxvk-native- 2")"/dxvknativeDXVK_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/.."tarczf"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"rmR"dxvknativeDXVK_VERSION”
}

build_arch

if [ $opt_nopackage -eq 0 ]; then
package
fi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值