Last change
on this file since 104448 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:
2.0 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-$DXVK_VERSION"
|
---|
15 | DXVK_ARCHIVE_PATH=$(realpath "$2")"/dxvk-$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 | crossfile="build-win"
|
---|
29 |
|
---|
30 | while [ $# -gt 0 ]; do
|
---|
31 | case "$1" in
|
---|
32 | "--no-package")
|
---|
33 | opt_nopackage=1
|
---|
34 | ;;
|
---|
35 | "--dev-build")
|
---|
36 | opt_nopackage=1
|
---|
37 | opt_devbuild=1
|
---|
38 | ;;
|
---|
39 | "--build-id")
|
---|
40 | opt_buildid=true
|
---|
41 | ;;
|
---|
42 | *)
|
---|
43 | echo "Unrecognized option: $1" >&2
|
---|
44 | exit 1
|
---|
45 | esac
|
---|
46 | shift
|
---|
47 | done
|
---|
48 |
|
---|
49 | function build_arch {
|
---|
50 | export WINEARCH="win$1"
|
---|
51 | export WINEPREFIX="$DXVK_BUILD_DIR/wine.$1"
|
---|
52 |
|
---|
53 | cd "$DXVK_SRC_DIR"
|
---|
54 |
|
---|
55 | opt_strip=
|
---|
56 | if [ $opt_devbuild -eq 0 ]; then
|
---|
57 | opt_strip=--strip
|
---|
58 | fi
|
---|
59 |
|
---|
60 | meson --cross-file "$DXVK_SRC_DIR/$crossfile$1.txt" \
|
---|
61 | --buildtype "release" \
|
---|
62 | --prefix "$DXVK_BUILD_DIR" \
|
---|
63 | $opt_strip \
|
---|
64 | --bindir "x$1" \
|
---|
65 | --libdir "x$1" \
|
---|
66 | -Denable_tests=false \
|
---|
67 | -Dbuild_id=$opt_buildid \
|
---|
68 | "$DXVK_BUILD_DIR/build.$1"
|
---|
69 |
|
---|
70 | cd "$DXVK_BUILD_DIR/build.$1"
|
---|
71 | ninja install
|
---|
72 |
|
---|
73 | if [ $opt_devbuild -eq 0 ]; then
|
---|
74 | # get rid of some useless .a files
|
---|
75 | rm "$DXVK_BUILD_DIR/x$1/"*.!(dll)
|
---|
76 | rm -R "$DXVK_BUILD_DIR/build.$1"
|
---|
77 | fi
|
---|
78 | }
|
---|
79 |
|
---|
80 | function build_script {
|
---|
81 | cp "$DXVK_SRC_DIR/setup_dxvk.sh" "$DXVK_BUILD_DIR/setup_dxvk.sh"
|
---|
82 | chmod +x "$DXVK_BUILD_DIR/setup_dxvk.sh"
|
---|
83 | }
|
---|
84 |
|
---|
85 | function package {
|
---|
86 | cd "$DXVK_BUILD_DIR/.."
|
---|
87 | tar -czf "$DXVK_ARCHIVE_PATH" "dxvk-$DXVK_VERSION"
|
---|
88 | rm -R "dxvk-$DXVK_VERSION"
|
---|
89 | }
|
---|
90 |
|
---|
91 | build_arch 64
|
---|
92 | build_arch 32
|
---|
93 | build_script
|
---|
94 |
|
---|
95 | if [ $opt_nopackage -eq 0 ]; then
|
---|
96 | package
|
---|
97 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.