forked from ISeeDEDPpl/Questor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
#TransferToLiveCopy#.bat
149 lines (138 loc) · 7.73 KB
/
#TransferToLiveCopy#.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@Echo off
cls
:: delims is a TAB followed by a space
set debug=false
::Custom Path to innerspace if you have yours in another location
::set InnerSpacePath=..\..\InnerSpace\
:: Path for 32bit OSs - likely Windows XP (but could be windows vista or windows 7, but not commonly)
::set InnerSpacePath=%ProgramFiles%\InnerSpace\InnerSpace.exe
:: Path for 64bit OSs - likely windows Vista or Windows 7
set InnerSpacePath=%ProgramFiles(x86)%\InnerSpace\
::
:: if you choose not to hard code the path above we will search the registry for your innerSpace directory
::
set scripturl=%~dp0
set scripturl=%scripturl:~0,-1%
if exist "%InnerSpacePath%" goto :dequote
if not exist "%InnerSpacePath%" Echo.
if not exist "%InnerSpacePath%" Echo [before registry] Unable to Find Innerspace Path [ %InnerSpacePath% ] attempting to lookup path using the windows registry
if not exist "%InnerSpacePath%" Echo.
if not exist "%InnerSpacePath%" (set InnerSpacePath=)
if not exist "%InnerSpacePath%" if "%debug%"=="true" Echo.
if not exist "%InnerSpacePath%" if "%debug%"=="true" echo [before registry] InnerSpacePath is now [ %InnerSpacePath% ] && pause
if not exist "%InnerSpacePath%" if "%debug%"=="true" Echo.
::
:: if the directory above did not exist then check the registry for where innerspace is located and use that
::
:registrysearch
if "%InnerSpacePath%"=="" if "%debug%"=="true" Echo [about to query registry] InnerSpacePath is [ %InnerSpacePath% ] - trying to query known registry keys for innerspace.exe
if "%InnerSpacePath%"=="" FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\InnerSpace.exe" /v "Path"') DO (SET InnerSpacePath=%%B)
if "%InnerSpacePath%"=="" FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKCU\Software\Microsoft\IntelliPoint\AppSpecific\InnerSpace.exe" /v "Path"') DO (SET InnerSpacePath=%%B)
if "%InnerSpacePath%"=="" FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKCU\Software\Microsoft\IntelliType Pro\AppSpecific\InnerSpace.exe" /v "Path"') DO (SET InnerSpacePath=%%B)
if "%InnerSpacePath%"=="" if exist "%ProgramFiles(x86)%\Innerspace\Innerspace.exe" SET InnerSpacePath = %ProgramFiles(x86)%\Innerspace\
if "%InnerSpacePath%"=="" if exist "%ProgramFiles%\Innerspace\Innerspace.exe" SET InnerSpacePath = %ProgramFiles%\Innerspace\
if "%InnerSpacePath%"=="" if exist "%userprofile%\Documents\Innerspace\Innerspace.exe" SET InnerSpacePath = %systemdrive%\Innerspace\
if "%InnerSpacePath%"=="" if exist "%systemdrive%\My Documents\Innerspace\Innerspace.exe" SET InnerSpacePath = %systemdrive%\Innerspace\
if "%InnerSpacePath%"=="" if exist "%userprofile%\Innerspace\Innerspace.exe" SET InnerSpacePath = %systemdrive%\Innerspace\
if "%InnerSpacePath%"=="" if exist "%systemdrive%\Innerspace\Innerspace.exe" SET InnerSpacePath = %systemdrive%\Innerspace\
if "%InnerSpacePath%"=="" goto :ERROR
if "%debug%"=="true" Echo [registry] After registry queries: InnerSpacePath is [ %InnerSpacePath% ] && pause
if "%debug%"=="true" echo [remove exe] if "%InnerSpacePath:~-15%"=="\InnerSpace.exe" (set InnerSpacePath=%InnerSpacePath:~0,-15%)
if "%InnerSpacePath:~-15%"=="\InnerSpace.exe" (set InnerSpacePath=%InnerSpacePath:~0,-15%)
:dequote
pushd
cd %scripturl%
call dequote.cmd InnerSpacePath
call dequote.cmd InnerSpacePath
popd
:setinnerspacedotnetdirectory
if exist "%InnerSpacePath%" if "%debug%"=="true" Echo (set innerspacedotnetdirectory="%InnerSpacePath%\.Net Programs\")
if exist "%InnerSpacePath%" set innerspacedotnetdirectory=%InnerSpacePath%\.Net Programs\
@echo [finished] Innerspace Path is: [%InnerSpacePath%]
@echo [finished] innerspacedotnetdirectory Path is: [%innerspacedotnetdirectory%]
if "%debug%"=="true" pause && echo ------------------------------------------ && echo ------------------------------------------
if not exist "%Innerspacedotnetdirectory%" goto :error
:dequote2
pushd
cd %scripturl%
call dequote.cmd innerspacedotnetdirectory
call dequote.cmd innerspacedotnetdirectory
popd
:CopyQuestor
@Echo.
@Echo Starting to copy EasyHook files from [.\DirectEVE\easyhook*.dll] to [.\output\]
@Echo on
copy /y ".\DirectEVE\easyhook*.dll" ".\output\"
@Echo.
@Echo Starting to copy debug files from [.\output\*.pdb] to [%innerspacedotnetdirectory%]
@Echo on
copy /y ".\output\*.pdb" "%innerspacedotnetdirectory%"
@Echo off
@Echo.
set RandomNumber=%Random%
@Echo Rename prior Quester.exe to Questor.exe.RandomNumber.questorold
ren "%innerspacedotnetdirectory%\Questor.exe" "Questor.exe.%RandomNumber%.questorold"
@Echo off
@Echo.
@Echo Rename prior Questor.Modules.dll to Questor.Modules.dll.RandomNumber.questorold
ren "%innerspacedotnetdirectory%\Questor.Modules.dll" "Questor.Modules.dll.%RandomNumber%.questorold"
@Echo off
@Echo.@Echo Trying to delete all .questorold files
Del /Q "%innerspacedotnetdirectory%\*.questorold"
@Echo off
@Echo.
@Echo Starting to copy DLL files from [.\output\*.dll] to [%innerspacedotnetdirectory%]
@Echo on
copy /y ".\output\*.dll" "%innerspacedotnetdirectory%"
@Echo off
@Echo.
@Echo Starting to copy EXE files from [.\output\*.exe] to [%innerspacedotnetdirectory%]
@Echo on
copy /y ".\output\*.exe" "%innerspacedotnetdirectory%"
@Echo.
@Echo off
if "%debug%"=="true" pause && echo ------------------------------------------ && echo ------------------------------------------
::
if "%debug%"=="true" Echo on
:CopyXMLConfigFiles
@Echo.
@Echo *** always copy the template settings.xml file to [%innerspacedotnetdirectory%]
@Echo on
copy /y ".\output\settings.xml" "%innerspacedotnetdirectory%"
@Echo off
@Echo.
@Echo *** always copy factions.xml file to [%innerspacedotnetdirectory%]
copy /y ".\output\factions.xml" "%innerspacedotnetdirectory%"
@Echo.
@Echo *** only copy ShipTargetValues.xml if one does not already exist (it contains targeting data)
if not exist "%innerspacedotnetdirectory%\ShipTargetValues.xml" copy /y ".\output\ShipTargetValues.xml" "%innerspacedotnetdirectory%"
@Echo.
@Echo *** only copy invtypes.xml if one does not already exist (it contains pricing data)
if not exist "%innerspacedotnetdirectory%\invtypes.xml" copy /y ".\output\invtypes.xml" "%innerspacedotnetdirectory%"
@Echo.
@Echo *** only copy InvIgnore.xml if one does not already exist (it contains invtypes that will not be sold by valuedump)
if not exist "%innerspacedotnetdirectory%\InvIgnore.xml" copy /y ".\output\InvIgnore.xml" "%innerspacedotnetdirectory%"
@Echo.
@Echo *** only copy Schedules.xml if one does not already exist (it contains the schedule your toons will use to logoff and login if you start eve early)
if not exist "%innerspacedotnetdirectory%\Schedules.xml" copy /y ".\output\Schedules.xml" "%innerspacedotnetdirectory%"
@Echo.
@Echo *** only copy Skill_Prerequisites.xml if one does not already exist (it contains skill prerequisites which allows questor to determine which skills can be injected)
if not exist "%innerspacedotnetdirectory%\Skill_Prerequisites.xml" copy /y ".\output\Skill_Prerequisites.xml" "%innerspacedotnetdirectory%"
@Echo off
goto :done
:error
echo ------------------------------------------ && echo ------------------------------------------
Echo.
Echo unable to find your innerspace directory via the 3 registry keys we tried
Echo InnerSpacePath is [ %InnerSpacePath% ]
Echo innerspacedotnetdirectory is [ %innerspacedotnetdirectory% ]
Echo you can edit the script and change:
Echo (set InnerSpacePath=..\..\innerspace\)
Echo to the full path to your innerspace directory if needed.
Echo.
Echo if you want to debug this script you can set debug=true near the top of the script
echo ------------------------------------------ && echo ------------------------------------------
pause
:done
echo [done copying questor related files to: %innerspacedotnetdirectory%]
pause