-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
44 lines (32 loc) · 764 Bytes
/
build.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
44
#!/bin/bash
set -e
CONFIG=$1
if [ "$CONFIG" == "" ]; then
echo "missing CONFIG env var"
exit 1
fi
export CONFIG
pushd ../winlose-build
rm -r *
cmake -G "Visual Studio 14 2015 Win64" ../winlose
if [ "$CONFIG" == "Debug" ]; then
cmake --build . --config Debug
elif [ "$CONFIG" == "Release" ]; then
cmake --build . --config Release
fi
cp src/$CONFIG/winlose.dll ../winlose/binding/build
cp src/$CONFIG/winlose.lib ../winlose/binding
popd
pushd binding
if [ -d build ]; then
echo "cleaning build"
rm -r build
fi
if [ "$CONFIG" == "Debug" ]; then
node-gyp --debug configure --msvs_version=2015
node-gyp --debug build
elif [ "$CONFIG" == "Release" ]; then
node-gyp --release configure --msvs_version=2015
node-gyp --release build
fi
popd