forked from NeighTools/UnityDoorstop.Unix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
31 lines (25 loc) · 1.13 KB
/
run.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
#!/bin/sh
# Doorstop running script
#
# This script is used to run a Unity game with Doorstop enabled.
# Running a game with Doorstop allows to execute arbitary .NET assemblies before Unity is initialized.
#
# Usage: Configure the script below and simply run this script when you want to run your game modded.
doorstop_libname="doorstop.so"
doorstop_dir=$PWD
case "$(uname -s)" in
Linux*) export LD_LIBRARY_PATH=${doorstop_dir}:${LD_LIBRARY_PATH};
export LD_PRELOAD=$doorstop_libname;;
Darwin*) export DYLD_LIBRARY_PATH=${doorstop_dir}:${DYLD_LIBRARY_PATH};
export DYLD_INSERT_LIBRARIES=$doorstop_libname;;
*) echo "Invalid OS"; exit;;
esac
# Configuration options (EDIT THESE):
# Whether or not to enable Doorstop. Valid values: TRUE or FALSE
export DOORSTOP_ENABLE=TRUE;
# What .NET assembly to execute. Valid value is a path to a .NET DLL that mono can execute.
export DOORSTOP_INVOKE_DLL_PATH=$doorstop_dir/Doorstop.dll;
# If enabled, this will prioritize assembly resolving from the given directory
# export DOORSTOP_CORLIB_OVERRIDE_PATH=""
# Specify the name of the game's executable here!
./LinuxTest.x86_64