-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.bat
54 lines (42 loc) · 1.2 KB
/
setup.bat
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
@echo off
REM Check for admin privileges
NET SESSION >nul 2>&1
if %errorLevel% neq 0 (
echo This script requires administrator privileges. Please run it as administrator.
pause
exit /b 1
)
REM Change the working directory so it does not create the symlinks in System32
cd /d "%~dp0"
set /p bl_path=Where is BONELAB installed?
if not exist "%bl_path%" (
echo Path '%bl_path%' does not exist! Do you have permissions to read it? Did you enter the path wrong?
exit /b 1
)
set "ml_path=%bl_path%\MelonLoader"
if not exist "%ml_path%" (
echo MelonLoader folder was not found! Have you installed MelonLoader?
exit /b 1
)
set "mod_path=%bl_path%\Mods"
if not exist "%mod_path%" (
echo Mods folder was not found! Have you launched MelonLoader at least once?
exit /b 1
)
echo Linking files and folders...
if not exist ".\Links" (
mkdir ".\Links"
)
mklink /D ".\Links\Mods" "%mod_path%"
mklink /D ".\Links\MelonLoader" "%ml_path%"
mklink /D ".\Links\Game" "%bl_path%"
echo Finding BONELAB executable...
for %%F in ("%bl_path%\BONELAB*.exe") do (
echo Found '%%~nxF'
mklink ".\Links\BONELAB.exe" "%%~fF"
goto :found
)
echo No BONELAB executable found!
exit /b 1
:found
exit /b 0