forked from ATTWoWAddon/AllTheThings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Link ATT to WoW.bat
111 lines (101 loc) · 2.92 KB
/
Link ATT to WoW.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
:: Run this batch script to link the AllTheThings addon with all non-PTR versions of the game.
@echo off
SETLOCAL
pushd %~dp0
call :link_wowfolder "C:\Program Files\World of Warcraft"
call :link_wowfolder "C:\Program Files (x86)\World of Warcraft"
call :link_wowfolder "..\World of Warcraft"
call :report_taskcomplete
EXIT /B 0
:link_wowfolder
if exist "%~1\" (
call :link_expansion "%~1\_classic_"
call :link_expansion "%~1\_classic_era_"
call :link_expansion "%~1\_classic_beta_"
call :link_expansion "%~1\_classic_ptr_"
call :link_expansion "%~1\_classic_era_ptr_"
call :link_expansion "%~1\_retail_"
call :link_beta "%~1\_beta_"
call :link_ptr "%~1\_ptr_"
call :link_ptr "%~1\_xptr_"
)
EXIT /B 0
:link_expansion
if exist "%~1\" (
echo Linking Expansion "%~1\"
if exist "%~1\Interface\AddOns\AllTheThings" (
rmdir /s /q "%~1\Interface\AddOns\AllTheThings"
)
if NOT exist "%~1\Interface\AddOns\AllTheThings" (
mklink /J "%~1\Interface\AddOns\AllTheThings" "%cd%"
)
)
EXIT /B 0
:link_beta
if exist "%~1\" (
echo Linking BETA "%~1\"
net session >nul 2>&1
if %errorLevel% == 0 (
call :link_beta_files "%~1\Interface\AddOns\AllTheThings"
)
)
EXIT /B 0
:link_beta_files
echo Linking BETA Files "%~1\"
if exist "%~1\" (
rmdir /s /q "%~1\"
)
if NOT exist "%~1\" (
mkdir "%~1\"
mkdir "%~1\db"
mklink "%~1\db\AccountWideQuestsDB.lua" "%cd%\db\AccountWideQuestsDB.lua"
mklink "%~1\db\Presets.lua" "%cd%\db\Presets.lua"
mklink "%~1\db\RaceDB.lua" "%cd%\db\RaceDB.lua"
mklink "%~1\db\ReagentsDB.lua" "%cd%\db\ReagentsDB.lua"
mklink /J "%~1\db\Retail" "%cd%\.beta_db"
mklink /J "%~1\assets" "%cd%\assets"
mklink /J "%~1\lib" "%cd%\lib"
mklink /J "%~1\locales" "%cd%\locales"
mklink /J "%~1\src" "%cd%\src"
mklink "%~1\AllTheThings.lua" "%cd%\AllTheThings.lua"
mklink "%~1\AllTheThings.toc" "%cd%\AllTheThings.toc"
mklink "%~1\Bindings.xml" "%cd%\Bindings.xml"
mklink "%~1\Settings.lua" "%cd%\Settings.lua"
)
EXIT /B 0
:link_ptr
if exist "%~1\" (
echo Linking PTR "%~1\"
net session >nul 2>&1
if %errorLevel% == 0 (
call :link_ptr_files "%~1\Interface\AddOns\AllTheThings"
)
)
EXIT /B 0
:link_ptr_files
echo Linking PTR Files "%~1\"
if exist "%~1\" (
rmdir /s /q "%~1\"
)
if NOT exist "%~1\" (
mkdir "%~1\"
mkdir "%~1\db"
mklink "%~1\db\AccountWideQuestsDB.lua" "%cd%\db\AccountWideQuestsDB.lua"
mklink "%~1\db\Presets.lua" "%cd%\db\Presets.lua"
mklink "%~1\db\RaceDB.lua" "%cd%\db\RaceDB.lua"
mklink "%~1\db\ReagentsDB.lua" "%cd%\db\ReagentsDB.lua"
mklink /J "%~1\db\Retail" "%cd%\.ptr_db"
mklink /J "%~1\assets" "%cd%\assets"
mklink /J "%~1\lib" "%cd%\lib"
mklink /J "%~1\locales" "%cd%\locales"
mklink /J "%~1\src" "%cd%\src"
mklink "%~1\AllTheThings.lua" "%cd%\AllTheThings.lua"
mklink "%~1\AllTheThings.toc" "%cd%\AllTheThings.toc"
mklink "%~1\Bindings.xml" "%cd%\Bindings.xml"
mklink "%~1\Settings.lua" "%cd%\Settings.lua"
)
EXIT /B 0
:report_taskcomplete
echo Task Complete!
set /p DUMMY=Hit ENTER to close...
EXIT /B 0