VirtualBox

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

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
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-$DXVK_VERSION"
15DXVK_ARCHIVE_PATH=$(realpath "$2")"/dxvk-$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
28crossfile="build-win"
29
30while [ $# -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
47done
48
49function 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
80function 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
85function package {
86 cd "$DXVK_BUILD_DIR/.."
87 tar -czf "$DXVK_ARCHIVE_PATH" "dxvk-$DXVK_VERSION"
88 rm -R "dxvk-$DXVK_VERSION"
89}
90
91build_arch 64
92build_arch 32
93build_script
94
95if [ $opt_nopackage -eq 0 ]; then
96 package
97fi
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