VirtualBox

source: vbox/trunk/src/libs/dxvk-2.3.1/package-release.sh@ 107044

Last change on this file since 107044 was 105107, checked in by vboxsync, 5 months ago

libs/dxvk-2.3.1: Make it build, bugref:10716

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 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=$(readlink -f "$0")
14DXVK_SRC_DIR=$(dirname "$DXVK_SRC_DIR")
15DXVK_BUILD_DIR=$(realpath "$2")"/dxvk-$DXVK_VERSION"
16DXVK_ARCHIVE_PATH=$(realpath "$2")"/dxvk-$DXVK_VERSION.tar.gz"
17
18if [ -e "$DXVK_BUILD_DIR" ]; then
19 echo "Build directory $DXVK_BUILD_DIR already exists"
20 exit 1
21fi
22
23shift 2
24
25opt_nopackage=0
26opt_devbuild=0
27opt_buildid=false
28
29crossfile="build-win"
30
31while [ $# -gt 0 ]; do
32 case "$1" in
33 "--no-package")
34 opt_nopackage=1
35 ;;
36 "--dev-build")
37 opt_nopackage=1
38 opt_devbuild=1
39 ;;
40 "--build-id")
41 opt_buildid=true
42 ;;
43 *)
44 echo "Unrecognized option: $1" >&2
45 exit 1
46 esac
47 shift
48done
49
50function build_arch {
51 export WINEARCH="win$1"
52 export WINEPREFIX="$DXVK_BUILD_DIR/wine.$1"
53
54 cd "$DXVK_SRC_DIR"
55
56 opt_strip=
57 if [ $opt_devbuild -eq 0 ]; then
58 opt_strip=--strip
59 fi
60
61 meson setup --cross-file "$DXVK_SRC_DIR/$crossfile$1.txt" \
62 --buildtype "release" \
63 --prefix "$DXVK_BUILD_DIR" \
64 $opt_strip \
65 --bindir "x$1" \
66 --libdir "x$1" \
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
80function package {
81 cd "$DXVK_BUILD_DIR/.."
82 tar -czf "$DXVK_ARCHIVE_PATH" "dxvk-$DXVK_VERSION"
83 rm -R "dxvk-$DXVK_VERSION"
84}
85
86build_arch 64
87build_arch 32
88
89if [ $opt_nopackage -eq 0 ]; then
90 package
91fi
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