From 40f4eb4ad2255e75ab3166a962732d4c2e019cba Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 25 Sep 2014 20:10:16 +0200 Subject: [PATCH] Fix package description generation --HG-- branch : feature-streamed-package --- .../tools/build_gamedata/d1_client_patch.py | 5 +++- code/ryzom/client/src/login_patch.cpp | 24 +------------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/code/nel/tools/build_gamedata/d1_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py index 080141e5f..47a952812 100755 --- a/code/nel/tools/build_gamedata/d1_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -91,6 +91,9 @@ else: inCategories = 1 cfg.write("\t<_Categories>\n") for category in InstallClientData: + packExt = ".bnp" + if (category["StreamedPackages"]): + packExt = ".snp" cfg.write("\t\t<_Category>\n") cfg.write("\t\t\t<_Name type=\"STRING\" value=\"" + category["Name"] + "\"/>\n") if category["UnpackTo"] != None: @@ -104,7 +107,7 @@ else: if (len(package[1]) > 0): cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[1][0] + "\"/>\n") else: - cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[0] + ".bnp\"/>\n") + cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + package[0] + packExt + "\"/>\n") for ref in category["Refs"]: cfg.write("\t\t\t<_Files type=\"STRING\" value=\"" + ref + "_.ref\"/>\n") cfg.write("\t\t\n") diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index d2f4d02e0..657eb8fb3 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -1176,35 +1176,13 @@ void CPatchManager::readDescFile(sint32 nVersion) std::string unpackTo = category.getUnpackTo(); - if (unpackTo == "0") - { - nlwarning("BUG: unpackTo == '0'"); - unpackTo = ClientRootPath; - category.setUnpackTo(unpackTo); - } - else if (unpackTo.substr(0, 2) == "./") + if (unpackTo.substr(0, 2) == "./") { unpackTo = ClientRootPath + unpackTo.substr(2); category.setUnpackTo(unpackTo); } } } - else - { - for (cat = 0; cat < DescFile.getCategories().categoryCount(); ++cat) - { - CBNPCategory &category = const_cast(DescFile.getCategories().getCategory(cat)); - - std::string unpackTo = category.getUnpackTo(); - - if (unpackTo == "0") - { - nlwarning("BUG: unpackTo == '0'"); - unpackTo = "./"; - category.setUnpackTo(unpackTo); - } - } - } // tmp for debug : flag some categories as 'Mainland' for (cat = 0; cat < DescFile.getCategories().categoryCount(); ++cat)