[TOOLS] Fixed mmap extractor binary name used in various scripts

This commit is contained in:
Antz 2019-05-30 22:02:58 +01:00
parent e381d55713
commit a521df114e
No known key found for this signature in database
GPG Key ID: 0DF907270598C85F
2 changed files with 9 additions and 9 deletions

View File

@ -1419,7 +1419,7 @@ function ExtractResources
cp "$INSTPATH/bin/tools/MoveMapGen.sh" "$GAMEPATH"
cp "$INSTPATH/bin/tools/offmesh.txt" "$GAMEPATH"
cp "$INSTPATH/bin/tools/mmap_excluded.txt" "$GAMEPATH"
cp "$INSTPATH/bin/tools/movemap-generator" "$GAMEPATH"
cp "$INSTPATH/bin/tools/mmap-extractor" "$GAMEPATH"
CPU=$($DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Please provide the number of CPU to be used to generate MMaps (1-4)" \
--inputbox "Default: 1" 8 80 3>&2 2>&1 1>&3)
@ -1453,7 +1453,7 @@ function ExtractResources
rm -rf "$GAMEPATH/MoveMapGen.sh"
rm -rf "$GAMEPATH/offmesh.txt"
rm -rf "$GAMEPATH/mmap_excluded.txt"
rm -rf "$GAMEPATH/movemap-generator"
rm -rf "$GAMEPATH/mmap-extractor"
Log "Changing ownership of the extracted directories"
chown -R $USER:$USER "$INSTPATH"
else
@ -1462,7 +1462,7 @@ function ExtractResources
rm -rf "$GAMEPATH/mmaps"
rm -rf "$GAMEPATH/offmesh.txt"
rm -rf "$GAMEPATH/mmap_excluded.txt"
rm -rf "$GAMEPATH/movemap-generator"
rm -rf "$GAMEPATH/mmap-extractor"
exit 1
fi
else
@ -1475,7 +1475,7 @@ function ExtractResources
cp "$INSTPATH/bin/tools/MoveMapGen.sh" "$GAMEPATH"
cp "$INSTPATH/bin/tools/offmesh.txt" "$GAMEPATH"
cp "$INSTPATH/bin/tools/mmap_excluded.txt" "$GAMEPATH"
cp "$INSTPATH/bin/tools/movemap-generator" "$GAMEPATH"
cp "$INSTPATH/bin/tools/mmap-extractor" "$GAMEPATH"
CPU=$($DLGAPP --backtitle "MaNGOS Linux Build Configuration" --title "Please provide the number of CPU to be used to generate MMaps (1-4)" \
--inputbox "Default: 1" 8 80 3>&2 2>&1 1>&3)
@ -1508,7 +1508,7 @@ function ExtractResources
rm -rf "$GAMEPATH/MoveMapGen.sh"
rm -rf "$GAMEPATH/offmesh.txt"
rm -rf "$GAMEPATH/mmap_excluded.txt"
rm -rf "$GAMEPATH/movemap-generator"
rm -rf "$GAMEPATH/mmap-extractor"
Log "Changing ownership of the extracted directories"
chown -R $USER:$USER "$INSTPATH"
else
@ -1517,7 +1517,7 @@ function ExtractResources
rm -rf "$GAMEPATH/mmaps"
rm -rf "$GAMEPATH/offmesh.txt"
rm -rf "$GAMEPATH/mmap_excluded.txt"
rm -rf "$GAMEPATH/movemap-generator"
rm -rf "$GAMEPATH/mmap-extractor"
exit 1
fi
fi

View File

@ -43,11 +43,11 @@ class workerThread(threading.Thread):
stInfo.dwFlags |= 0x00000001
stInfo.wShowWindow = 7
cFlags = subprocess.CREATE_NEW_CONSOLE
binName = "movemap-generator.exe"
binName = "mmap-extractor.exe"
else:
stInfo = None
cFlags = 0
binName = "./MoveMapGen"
binName = "./mmap-extractor"
if self.mapID == 0:
retcode = subprocess.call([binName, "%u" % (self.mapID), "--silent", "--offMeshInput", "offmesh.txt"], startupinfo=stInfo, creationflags=cFlags)
else:
@ -58,7 +58,7 @@ if __name__ == "__main__":
cpu = cpu_count() - 0 # You can reduce the load by putting 1 instead of 0 if you need to free 1 core/cpu
if cpu < 1:
cpu = 1
print "I will always maintain %u MoveMapGen tasks running in //\n" % (cpu)
print "I will always maintain %u mmap-extractor tasks running in //\n" % (cpu)
while (len(mapList) > 0):
if (threading.active_count() <= cpu):
workerThread(mapList.popleft()).start()