-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·46 lines (36 loc) · 1.42 KB
/
build.sh
File metadata and controls
executable file
·46 lines (36 loc) · 1.42 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
#!/bin/bash
set -eu
if [ $# -eq 0 ]; then
echo "Usage: $0 \"/path/to/steamapps/common/Rhythm Doctor\""
exit 1
fi
COMPILE_ARGUMENTS=""
IS_WINE=0
if [ -f "$1/Rhythm Doctor.exe" ]; then
echo "Windows version detected"
COMPILE_ARGUMENTS="$COMPILE_ARGUMENTS -DWITH_WINE "
IS_WINE=1
elif [ -f "$1/Rhythm Doctor" ]; then
echo "Linux version detected"
if [ ! -f "$1/run_bepinex.sh" ]; then
echo "ERROR: BepInEx not installed."
exit 1
fi
if [ -f "LinuxWindowDancePlugin/bin/Debug/netstandard2.1/LinuxWindowDancePlugin.dll" ]; then
echo "Local plugin detected, not downloading."
else
echo "ERROR: Please follow the readme. (you are using the Linux version and trying to build. This will not work for the Steam Runtime)"
exit 1
fi
else
echo "ERROR: First argument must be a path to Rhythm Doctor."
exit 1
fi
if [ $IS_WINE -eq 1 ]; then
wineg++ -o multiwindow_unity.dll -shared multiwindow_unity.cpp multiwindow_unity.dll.spec `pkg-config Qt6Widgets Qt6DBus xcb --libs --cflags` -ld3d11 -O3 $COMPILE_ARGUMENTS
mv multiwindow_unity.dll.so "$1/Rhythm Doctor_Data/Plugins/x86_64/multiwindow_unity.dll"
else
g++ -o multiwindow_unity.so -fPIC -shared multiwindow_unity.cpp `pkg-config Qt6Widgets Qt6DBus xcb glew --libs --cflags` -Og $COMPILE_ARGUMENTS
mv multiwindow_unity.so "$1/Rhythm Doctor_Data/Plugins/multiwindow_unity.so"
fi
echo "Finished"