Last change
on this file since 98879 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 |
|
---|
3 | set -e
|
---|
4 |
|
---|
5 | shopt -s extglob
|
---|
6 |
|
---|
7 | if [ -z "$1" ] || [ -z "$2" ]; then
|
---|
8 | echo "Usage: $0 version destdir [--no-package] [--dev-build]"
|
---|
9 | exit 1
|
---|
10 | fi
|
---|
11 |
|
---|
12 | DXVK_VERSION="$1"
|
---|
13 | DXVK_SRC_DIR=`dirname $(readlink -f $0)`
|
---|
14 | DXVK_BUILD_DIR=$(realpath "$2")"/dxvk-native-$DXVK_VERSION"
|
---|
15 | DXVK_ARCHIVE_PATH=$(realpath "$2")"/dxvk-native-$DXVK_VERSION.tar.gz"
|
---|
16 |
|
---|
17 | if [ -e "$DXVK_BUILD_DIR" ]; then
|
---|
18 | echo "Build directory $DXVK_BUILD_DIR already exists"
|
---|
19 | exit 1
|
---|
20 | fi
|
---|
21 |
|
---|
22 | shift 2
|
---|
23 |
|
---|
24 | opt_nopackage=0
|
---|
25 | opt_devbuild=0
|
---|
26 | opt_buildid=false
|
---|
27 |
|
---|
28 | while [ $# -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
|
---|
45 | done
|
---|
46 |
|
---|
47 | function 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 |
|
---|
71 | function 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 |
|
---|
77 | build_arch
|
---|
78 |
|
---|
79 | if [ $opt_nopackage -eq 0 ]; then
|
---|
80 | package
|
---|
81 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.