-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
36 lines (30 loc) · 1.26 KB
/
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
#!/bin/bash
set -e
MOD_DLL="techtonica_vr"
GAME_PATH="/c/Program Files (x86)/Steam/steamapps/common/Techtonica"
# Copy the vr dlls to the libs folder
echo "Copying the vr dlls to the libs folder..."
rm -rf libs/Managed
rm -rf libs/StreamingAssets
rm -rf libs/UnitySubsystems
mkdir -p libs/Managed
cp -r unity/build/unity_Data/StreamingAssets libs
cp -r unity/build/unity_Data/UnitySubsystems libs
cp -r unity/build/unity_Data/Managed/{SteamVR*.dll,Unity.XR.*.dll,UnityEngine.XR*.dll,UnityEngine.VR*.dll,Valve*.dll,UnityEngine.SubsystemsModule.dll,UnityEngine.AssetBundleModule.dll} libs/Managed
# Build the project
echo "Building the project..."
cd plugin
dotnet build
cd ..
# Cleanup
echo "Cleaning up..."
rm -rf "$GAME_PATH/BepInEx/plugins/$MOD_DLL"
mkdir -p "$GAME_PATH/BepInEx/plugins/$MOD_DLL/assets"
mkdir -p "$GAME_PATH/BepInEx/plugins/$MOD_DLL/vr_config"
# Copy the mod dll to the mods folder
echo "Copying the mod dll to the mods folder..."
cp ./plugin/bin/Debug/netstandard2.1/techtonica_vr.* "$GAME_PATH/BepInEx/plugins/$MOD_DLL"
# Copy the assets to the game folder
echo "Copying the assets to the game folder..."
cp -r ./unity/AssetBundles/StandaloneWindows/* "$GAME_PATH/BepInEx/plugins/$MOD_DLL/assets"
cp -r ./libs/* "$GAME_PATH/BepInEx/plugins/$MOD_DLL/vr_config"