-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackage-release.sh
executable file
·43 lines (33 loc) · 1.07 KB
/
package-release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: package-release.sh destdir"
exit 1
fi
NVAPI_SRC_DIR=`dirname $(readlink -f $0)`
NVAPI_BUILD_DIR=$(realpath "$1")"/nvapi"
if [ -e "$NVAPI_BUILD_DIR" ]; then
echo "Build directory $NVAPI_BUILD_DIR already exists"
exit 1
fi
function build_arch {
export WINEARCH="win$1"
export WINEPREFIX="$NVAPI_BUILD_DIR/wine.$1"
cd "$NVAPI_SRC_DIR"
meson --cross-file "$NVAPI_SRC_DIR/build-wine$1.txt" \
--buildtype "release" \
--prefix "$NVAPI_BUILD_DIR/install.$1" \
--libdir="lib$1" \
--strip \
"$NVAPI_BUILD_DIR/build.$1"
cd "$NVAPI_BUILD_DIR/build.$1"
ninja install
mv "$NVAPI_BUILD_DIR/install.$1/lib$1" "$NVAPI_BUILD_DIR"
mv "$NVAPI_BUILD_DIR/install.$1/fakedlls" "$NVAPI_BUILD_DIR/fakedlls$1"
cp "$NVAPI_SRC_DIR/setup_nvapi.sh" "$NVAPI_BUILD_DIR/setup_nvapi.sh"
chmod +x "$NVAPI_BUILD_DIR/setup_nvapi.sh"
rm -R "$NVAPI_BUILD_DIR/build.$1"
rm -R "$NVAPI_BUILD_DIR/install.$1"
}
build_arch 64
build_arch 32