-
Notifications
You must be signed in to change notification settings - Fork 1
/
Setup (run before opening solution).bat
47 lines (37 loc) · 1.2 KB
/
Setup (run before opening solution).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
:: This script creates a symlink to the torch and game binaries to account for different installation directories on different systems.
@echo off
echo #############################################################
echo ## ##
echo ## Example folder location: C:\Torch Servers\My Server ##
echo ## ##
echo #############################################################
set /p path="Please enter the folder location of your Torch.Server.exe: "
echo path = %path%
cd %~dp0
echo cd = %cd%
if exist TorchBinaries (
rmdir TorchBinaries
echo TorchBinaries old symlink deleted
)
mklink /J TorchBinaries "%path%"
if errorlevel 1 (
goto ErrorTorchBinaries
)
if exist GameBinaries (
rmdir GameBinaries
echo GameBinaries old symlink deleted
)
mklink /J GameBinaries "%path%\DedicatedServer64"
if errorlevel 1 (
goto ErrorGameBinaries
)
goto EndScript
:ErrorTorchBinaries
echo An error occured creating the TorchBinaries symlink.
goto EndScript
:ErrorGameBinaries
echo An error occured creating the GameBinaries symlink.
goto EndScript
:EndScript
echo All symlinks re-created successfully!
pause