VirtualBox

source: vbox/trunk/src/libs/dxvk-native-1.9.2a/package-native.sh@ 104835

Last change on this file since 104835 was 96497, checked in by vboxsync, 2 years ago

libs/dxvk-native-1.9.2a: export to OSE

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/usr/bin/env bash
2
3set -e
4
5shopt -s extglob
6
7if [ -z "$1" ] || [ -z "$2" ]; then
8 echo "Usage: $0 version destdir [--no-package] [--dev-build]"
9 exit 1
10fi
11
12DXVK_VERSION="$1"
13DXVK_SRC_DIR=`dirname $(readlink -f $0)`
14DXVK_BUILD_DIR=$(realpath "$2")"/dxvk-native-$DXVK_VERSION"
15DXVK_ARCHIVE_PATH=$(realpath "$2")"/dxvk-native-$DXVK_VERSION.tar.gz"
16
17if [ -e "$DXVK_BUILD_DIR" ]; then
18 echo "Build directory $DXVK_BUILD_DIR already exists"
19 exit 1
20fi
21
22shift 2
23
24opt_nopackage=0
25opt_devbuild=0
26opt_buildid=false
27
28while [ $# -gt 0 ]; do
29 case "$1" in
30 "--no-package")
31 opt_nopackage=1
32 ;;
33 "--dev-build")
34 opt_nopackage=1
35 opt_devbuild=1
36 ;;
37 "--build-id")
38 opt_buildid=true
39 ;;
40 *)
41 echo "Unrecognized option: $1" >&2
42 exit 1
43 esac
44 shift
45done
46
47function build_arch {
48 cd "$DXVK_SRC_DIR"
49
50 opt_strip=
51 if [ $opt_devbuild -eq 0 ]; then
52 opt_strip=--strip
53 fi
54
55 meson --buildtype "release" \
56 --prefix "$DXVK_BUILD_DIR" \
57 $opt_strip \
58 -Denable_tests=true \
59 -Dbuild_id=$opt_buildid \
60 "$DXVK_BUILD_DIR/build"
61
62 cd "$DXVK_BUILD_DIR/build"
63 ninja install
64
65 if [ $opt_devbuild -eq 0 ]; then
66 # get rid of some useless .a files
67 rm -R "$DXVK_BUILD_DIR/build"
68 fi
69}
70
71function package {
72 cd "$DXVK_BUILD_DIR/.."
73 tar -czf "$DXVK_ARCHIVE_PATH" "dxvk-native-$DXVK_VERSION"
74 rm -R "dxvk-native-$DXVK_VERSION"
75}
76
77build_arch
78
79if [ $opt_nopackage -eq 0 ]; then
80 package
81fi
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette