summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xservergreps/hercules/packets.py2
-rwxr-xr-xservergreps/hercules/src/hercules.py12
-rwxr-xr-xservergreps/hercules/src/reporter.py4
3 files changed, 10 insertions, 8 deletions
diff --git a/servergreps/hercules/packets.py b/servergreps/hercules/packets.py
index ea3ee56..49368ba 100755
--- a/servergreps/hercules/packets.py
+++ b/servergreps/hercules/packets.py
@@ -24,6 +24,8 @@ packetDir = sys.argv[2]
packetVersion = sys.argv[3]
hercules = Hercules()
+hercules.dirName = "hercules"
+hercules.reportName = "hercules"
manaplus = ManaPlus()
reporter = Reporter()
reporter.packetDir = packetDir;
diff --git a/servergreps/hercules/src/hercules.py b/servergreps/hercules/src/hercules.py
index b910929..ee84a9f 100755
--- a/servergreps/hercules/src/hercules.py
+++ b/servergreps/hercules/src/hercules.py
@@ -160,10 +160,10 @@ class Hercules:
def processPackets(self, packetDir, packetVersion):
- namedPacketsPath = packetDir + "/src/hercules/packets_struct.h"
- srcPath = packetDir + "/src/hercules"
- serverInPacketsHPath = packetDir + "/src/hercules/packets.h"
- serverLoginInPackets = packetDir + "/src/hercules/lclif.c"
+ namedPacketsPath = packetDir + "/src/" + self.dirName + "/packets_struct.h"
+ srcPath = packetDir + "/src/" + self.dirName
+ serverInPacketsHPath = packetDir + "/src/" + self.dirName + "/packets.h"
+ serverLoginInPackets = packetDir + "/src/" + self.dirName + "/lclif.c"
self.collectNamedPackets(namedPacketsPath)
self.collectOutPackets(srcPath)
self.collectInPackets(serverInPacketsHPath, serverLoginInPackets)
@@ -173,11 +173,11 @@ class Hercules:
def prepareTempFiles(self, codeDir, packetDir, packetVersion):
proc = PreProc()
- proc.init(packetDir + "/src/hercules")
+ proc.init(packetDir + "/src/" + self.dirName)
proc.defines = "-DPACKETVER=" + packetVersion + " -DCOMMON_SOCKET_H -DWFIFOW\\(fd,pos\\)=WFIFOW\\(fd,pos\\) -DWBUFW\\(p,pos\\)=WBUFW\\(p,pos\\)"
proc.includes = "-I../links/" + codeDir + "/src -I../links/" + codeDir + "/3rdparty"
proc.inDir = "../links/" + codeDir + "/src/"
- proc.outDir = packetDir + "/src/hercules/"
+ proc.outDir = packetDir + "/src/" + self.dirName + "/"
proc.run("map", "packets_struct.h");
proc.run("char", "char.c");
proc.run("login", "login.c");
diff --git a/servergreps/hercules/src/reporter.py b/servergreps/hercules/src/reporter.py
index 535887e..fedb23a 100755
--- a/servergreps/hercules/src/reporter.py
+++ b/servergreps/hercules/src/reporter.py
@@ -6,7 +6,7 @@
class Reporter:
def reportManaplus(self, hercules, manaplus):
- with open(self.packetDir + "/hercules_outpackets.txt", "w") as w:
+ with open(self.packetDir + "/" + hercules.reportName + "_outpackets.txt", "w") as w:
for packet in hercules.outPacketsSorted:
data = packet
while data[0] == "0":
@@ -181,7 +181,7 @@ class Reporter:
def reportHercules(self, hercules):
- with open(self.packetDir + "/hercules_issues.txt", "w") as w:
+ with open(self.packetDir + "/" + hercules.reportName + "_issues.txt", "w") as w:
for name in hercules.functionToId:
packet = hercules.functionToId[name]
if name != hercules.inPackets[packet][1]: