Skip to content

Commit 651d58e

Browse files
authored
Merge pull request #33 from Off-World-Live/feature/buildReleaseScript
Feature/build release script
2 parents 3d78d4f + b00a2aa commit 651d58e

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

scripts/Release.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ -z "$1" ]
6+
then
7+
echo "Please specify the plugin version (i.e. 1.1)"
8+
exit 1
9+
fi
10+
11+
VERSION="$1"
12+
13+
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
14+
OBS_ROOT_DIR="$SCRIPTS_DIR/../../.."
15+
16+
echo ""
17+
echo "*** Build Plugin for Release ***"
18+
echo ""
19+
20+
MSBUILD_PATH="c:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe"
21+
SOLUTION="$OBS_ROOT_DIR/build64/plugins/win-spout/win-spout.sln"
22+
BUILD_ARGS="/target:Rebuild /property:Configuration=Release /maxcpucount:8 /verbosity:quiet /consoleloggerparameters:Summary;ErrorsOnly;WarningsOnly"
23+
24+
"$MSBUILD_PATH" "$SOLUTION" $BUILD_ARGS
25+
26+
echo ""
27+
echo "*** Prepare Manual Installation Directory ***"
28+
echo ""
29+
30+
MANUAL_INSTALL_PLUGIN_DIR="$SCRIPTS_DIR/../manual-install-$VERSION"
31+
32+
mkdir -p "$MANUAL_INSTALL_PLUGIN_DIR";
33+
if [ "$(ls -A "$MANUAL_INSTALL_PLUGIN_DIR")" ]; then
34+
rm -r -f "$MANUAL_INSTALL_PLUGIN_DIR"/*
35+
fi
36+
37+
MANUAL_INSTALL_BIN_DIR="$MANUAL_INSTALL_PLUGIN_DIR/Bin"
38+
mkdir -p "$MANUAL_INSTALL_BIN_DIR";
39+
40+
OBS_RELEASE_BIN_DIR="$OBS_ROOT_DIR/build64/rundir/Release/obs-plugins/64bit"
41+
42+
cp "$OBS_RELEASE_BIN_DIR/win-spout.dll" "$MANUAL_INSTALL_BIN_DIR"
43+
cp "$OBS_RELEASE_BIN_DIR/Spout.dll" "$MANUAL_INSTALL_BIN_DIR"
44+
cp "$OBS_RELEASE_BIN_DIR/SpoutDX.dll" "$MANUAL_INSTALL_BIN_DIR"
45+
cp "$OBS_RELEASE_BIN_DIR/SpoutLibrary.dll" "$MANUAL_INSTALL_BIN_DIR"
46+
47+
MANUAL_INSTALL_DATA_DIR="$MANUAL_INSTALL_PLUGIN_DIR/Data"
48+
mkdir -p "$MANUAL_INSTALL_DATA_DIR";
49+
50+
OBS_RELEASE_DATA_DIR="$OBS_ROOT_DIR/build64/rundir/Release/data/obs-plugins/win-spout/locale"
51+
52+
cp -R "$OBS_RELEASE_DATA_DIR" "$MANUAL_INSTALL_DATA_DIR"
53+
54+
echo ""
55+
echo "*** Prepare NSI Installer ***"
56+
echo ""
57+
58+
NSI_FILE="$SCRIPTS_DIR/../win-spout-installer.nsi"
59+
60+
sed -i 's/^!define APPVERSION .*$/!define APPVERSION "'$VERSION'"/' $NSI_FILE
61+
62+
MAKENSIS_PATH="c:/Program Files (x86)/NSIS/makensis.exe"
63+
64+
"$MAKENSIS_PATH" $NSI_FILE
65+
66+
echo ""
67+
echo "*** Release Finished ***"
68+
echo ""

0 commit comments

Comments
 (0)