-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
install.bat
40 lines (27 loc) · 836 Bytes
/
install.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
:: Clone the repo in your addons folder then run this file
@echo off
set "joymodMainDir=Joystick"
set "joymodInstall=%~dp0"
:: Clean install parameter
set /p joymodClean="Install joystick module [y/N]?"
cd /d "%joymodInstall%"
cd ..\..
if /I "%joymodClean%" EQU "y" (
rd /s /q "addons\%joymodMainDir%"
del /s /q "lua\bin\gmcl_joystick_*.dll"
) else (
if /I "%joymodClean%" EQU "Y" (
rd /s /q "addons\%joymodMainDir%"
del /s /q "lua\bin\gmcl_joystick_*.dll"
)
)
if not exist "lua" mkdir lua
if not exist "lua\bin" mkdir lua\bin
:: Copy files relative to base /garrysmod/ folder
xcopy /v /y "%joymodInstall%lua\bin\*.dll" "lua\bin"
xcopy /v /y /s "%joymodInstall%addons" "addons"
echo Joystick module has been installed!
echo Please remove the cloned repo manually!
cd /d "%joymodInstall%"
timeout 100
exit 0