-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·84 lines (72 loc) · 2.31 KB
/
build.sh
File metadata and controls
executable file
·84 lines (72 loc) · 2.31 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# ReaperHaptic Build Script
# Builds and optionally installs the plugin
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
CONFIG="${1:-Release}"
PLUGIN_NAME="ReaperHaptic"
REAPER_SCRIPTS="$HOME/Library/Application Support/REAPER/Scripts"
LOGI_PLUGINS="$HOME/Library/Application Support/Logi/LogiPluginService/Plugins"
echo "========================================"
echo "Building $PLUGIN_NAME ($CONFIG)"
echo "========================================"
# Check for dotnet
if ! command -v dotnet &> /dev/null; then
# Try homebrew location
if [ -f "/opt/homebrew/opt/dotnet@8/bin/dotnet" ]; then
export PATH="/opt/homebrew/opt/dotnet@8/bin:$PATH"
elif [ -f "$HOME/.dotnet/dotnet" ]; then
export PATH="$HOME/.dotnet:$PATH"
else
echo ""
echo "Error: .NET SDK not found"
echo ""
echo "Install with one of:"
echo " brew install dotnet-sdk@8"
echo " # or download from https://dotnet.microsoft.com/download"
exit 1
fi
fi
echo ""
echo "Using: $(which dotnet)"
echo ".NET version: $(dotnet --version)"
echo ""
# Build
echo "Building..."
dotnet build src/ReaperHapticPlugin.csproj -c "$CONFIG"
echo ""
echo "Build complete!"
echo ""
echo "Output: bin/$CONFIG/"
# Install Lua script
if [ -d "$REAPER_SCRIPTS" ]; then
echo ""
echo "Installing Lua script to REAPER..."
cp scripts/reaper_haptic_monitor.lua "$REAPER_SCRIPTS/"
echo " -> $REAPER_SCRIPTS/reaper_haptic_monitor.lua"
fi
# Check if logiplugintool is available for packaging
if command -v logiplugintool &> /dev/null; then
echo ""
echo "Creating plugin package..."
logiplugintool pack "./bin/$CONFIG" "./$PLUGIN_NAME.lplug4"
logiplugintool verify "./$PLUGIN_NAME.lplug4"
echo ""
echo "Package created: $PLUGIN_NAME.lplug4"
fi
echo ""
echo "========================================"
echo "Installation"
echo "========================================"
echo ""
echo "The plugin has been linked to Logi Plugin Service."
echo ""
echo "Next steps:"
echo " 1. Restart Logi Options+ (or logout/login)"
echo " 2. In REAPER: Actions > Load ReaScript > reaper_haptic_monitor.lua"
echo " 3. Run the script and enjoy haptic feedback!"
echo ""
echo "If LuaSocket is not installed, run:"
echo " ./scripts/install_luasocket.sh"
echo ""