forked from hzqst/MetaHookSv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-to-SvenCoop.bat
56 lines (38 loc) · 2.12 KB
/
install-to-SvenCoop.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
55
56
echo off
if not exist "%~dp0Build\svencoop.exe" goto fail_nobuild
set LauncherExe=svencoop.exe
set LauncherMod=svencoop
set FullGameName=Sven Co-Op
set ShortGameName=SvenCoop
for /f "delims=" %%a in ('"%~dp0SteamAppsLocation/SteamAppsLocation" 225840 InstallDir') do set GameDir=%%a
if "%GameDir%"=="" goto fail
echo -----------------------------------------------------
echo Copying files...
copy "%~dp0Build\svencoop.exe" "%GameDir%\" /y
copy "%~dp0Build\SDL2.dll" "%GameDir%\" /y
copy "%~dp0Build\FreeImage.dll" "%GameDir%\" /y
xcopy "%~dp0Build\svencoop" "%GameDir%\%LauncherMod%" /y /e
xcopy "%~dp0Build\svencoop_addon" "%GameDir%\%LauncherMod%_addon\" /y /e
mkdir "%GameDir%\%LauncherMod%_schinese\"
xcopy "%~dp0Build\svencoop_schinese" "%GameDir%\%LauncherMod%_schinese\" /y /e
xcopy "%~dp0Build\platform" "%GameDir%\platform" /y /e
if not exist "%GameDir%\%LauncherMod%\metahook\configs\plugins.lst" copy "%GameDir%\%LauncherMod%\metahook\configs\plugins_svencoop.lst" "%GameDir%\%LauncherMod%\metahook\configs\plugins.lst" /y
del "%GameDir%\%LauncherMod%\metahook\configs\plugins_goldsrc.lst"
del "%GameDir%\%LauncherMod%\metahook\configs\plugins_svencoop.lst"
del "%GameDir%\%LauncherMod%\metahook\configs\plugins_svencoop_avx2.lst"
powershell $shell = New-Object -ComObject WScript.Shell;$shortcut = $shell.CreateShortcut(\"MetaHook for %ShortGameName%.lnk\");$shortcut.TargetPath = \"%GameDir%\%LauncherExe%\";$shortcut.WorkingDirectory = \"%GameDir%\";$shortcut.Arguments = \"-insecure -game %LauncherMod%\";$shortcut.Save();
echo -----------------------------------------------------
echo Make sure that you have all plugins you want in the plugins.lst
notepad "%GameDir%\%LauncherMod%\metahook\configs\plugins.lst"
echo Done
echo Please launch game from shortcut "MetaHook for %ShortGameName%"
pause
exit
:fail
echo Failed to locate GameInstallDir of %FullGameName%, please make sure Steam is running and you have %FullGameName% installed correctly.
pause
exit
:fail_nobuild
echo Compiled binaries not found ! You have to download compiled zip from github release page or compile the sources by yourself before installing !!!
pause
exit