From 6dbe82b20ad9c23a0872c259fb3ccbf4f33dff2b Mon Sep 17 00:00:00 2001 From: sanctum32 Date: Mon, 30 Dec 2013 23:15:54 +0200 Subject: [PATCH] [12771] Fixed possible path mismatch on UNIX system in vmap extractor also initialized work for clang compiler --- .../vmap_extractor/vmapextract/vmapexport.cpp | 22 ++++++++----------- src/bindings/scripts | 2 +- src/framework/Platform/CompilerDefs.h | 1 + src/shared/revision_nr.h | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/contrib/vmap_extractor/vmapextract/vmapexport.cpp b/contrib/vmap_extractor/vmapextract/vmapexport.cpp index 29502a748..ffb092285 100644 --- a/contrib/vmap_extractor/vmapextract/vmapexport.cpp +++ b/contrib/vmap_extractor/vmapextract/vmapexport.cpp @@ -113,7 +113,7 @@ bool LoadLocaleMPQFile(int locale) { TCHAR buff[512]; memset(buff, 0, sizeof(buff)); - _stprintf(buff, _T("%s%s/locale-%s.MPQ"), input_path, LocalesT[locale], LocalesT[locale]); + _stprintf(buff, _T("%s/Data/%s/locale-%s.MPQ"), input_path, LocalesT[locale], LocalesT[locale]); if (!SFileOpenArchive(buff, 0, MPQ_OPEN_READ_ONLY, &LocaleMpq)) { if (GetLastError() != ERROR_FILE_NOT_FOUND) @@ -128,12 +128,12 @@ bool LoadLocaleMPQFile(int locale) if (Builds[i] > LAST_DBC_IN_DATA_BUILD) { prefix = ""; - _stprintf(buff, _T("%s%s/wow-update-%s-%u.MPQ"), input_path, LocalesT[locale], LocalesT[locale], Builds[i]); + _stprintf(buff, _T("%s/Data/%s/wow-update-%s-%u.MPQ"), input_path, LocalesT[locale], LocalesT[locale], Builds[i]); } else { prefix = Locales[locale]; - _stprintf(buff, _T("%swow-update-%u.MPQ"), input_path, Builds[i]); + _stprintf(buff, _T("%s/Data/wow-update-%u.MPQ"), input_path, Builds[i]); } if (!SFileOpenPatchArchive(LocaleMpq, buff, prefix, 0)) @@ -150,7 +150,7 @@ bool LoadLocaleMPQFile(int locale) void LoadCommonMPQFiles(uint32 build) { TCHAR filename[512]; - _stprintf(filename, _T("%sworld.MPQ"), input_path); + _stprintf(filename, _T("%s/Data/world.MPQ"), input_path); if (!SFileOpenArchive(filename, 0, MPQ_OPEN_READ_ONLY, &WorldMpq)) { if (GetLastError() != ERROR_FILE_NOT_FOUND) @@ -164,7 +164,7 @@ void LoadCommonMPQFiles(uint32 build) if (build < 15211 && !strcmp("world2.MPQ", CONF_mpq_list[i])) // 4.3.2 and higher MPQ continue; - _stprintf(filename, _T("%s%s"), input_path, CONF_mpq_list[i]); + _stprintf(filename, _T("%s/Data/%s"), input_path, CONF_mpq_list[i]); if (!SFileOpenPatchArchive(WorldMpq, filename, "", 0)) { if (GetLastError() != ERROR_FILE_NOT_FOUND) @@ -205,12 +205,12 @@ void LoadCommonMPQFiles(uint32 build) if (Builds[i] > LAST_DBC_IN_DATA_BUILD) { prefix = ""; - _stprintf(filename, _T("%swow-update-base-%u.MPQ"), input_path, Builds[i]); + _stprintf(filename, _T("%s/Data/wow-update-base-%u.MPQ"), input_path, Builds[i]); } else { prefix = "base"; - _stprintf(filename, _T("%swow-update-%u.MPQ"), input_path, Builds[i]); + _stprintf(filename, _T("%s/Data/wow-update-%u.MPQ"), input_path, Builds[i]); } if (!SFileOpenPatchArchive(WorldMpq, filename, prefix, 0)) @@ -247,7 +247,6 @@ void LoadCommonMPQFiles(uint32 build) printf("Scanned %d files, found patch = %d\n", count, found); } } - } @@ -277,7 +276,7 @@ void ReadLiquidTypeTableDBC() { printf("Read LiquidType.dbc file..."); - DBCFile dbc(LocaleMpq, "DBFilesClient\\LiquidType.dbc"); + DBCFile dbc(LocaleMpq, "DBFilesClient/LiquidType.dbc"); if (!dbc.open()) { printf("Fatal error: Invalid LiquidType.dbc file format!\n"); @@ -411,7 +410,7 @@ void ParsMapFiles() for (unsigned int i = 0; i < map_count; ++i) { sprintf(id, "%03u", map_ids[i].id); - sprintf(fn, "World\\Maps\\%s\\%s.wdt", map_ids[i].name, map_ids[i].name); + sprintf(fn, "World/Maps/%s/%s.wdt", map_ids[i].name, map_ids[i].name); WDTFile WDT(fn, map_ids[i].name); if (WDT.init(id, map_ids[i].id)) { @@ -539,9 +538,6 @@ bool processArgv(int argc, char** argv) printf(" -? : This message.\n"); } - if (!hasInputPathParam) - getGamePath(); - return result; } diff --git a/src/bindings/scripts b/src/bindings/scripts index c0b82a9b0..d6f85bdd3 160000 --- a/src/bindings/scripts +++ b/src/bindings/scripts @@ -1 +1 @@ -Subproject commit c0b82a9b0637a9f510c0164df3c6173420ef73b9 +Subproject commit d6f85bdd312ca4704c7ad45dd35ebecfef54c313 diff --git a/src/framework/Platform/CompilerDefs.h b/src/framework/Platform/CompilerDefs.h index 51541a955..7ce6e9fbd 100644 --- a/src/framework/Platform/CompilerDefs.h +++ b/src/framework/Platform/CompilerDefs.h @@ -42,6 +42,7 @@ #define COMPILER_GNU 1 #define COMPILER_BORLAND 2 #define COMPILER_INTEL 3 +#define COMPILER_CLANG 4 #ifdef _MSC_VER # define COMPILER COMPILER_MICROSOFT diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 00ea6a325..07f150cf3 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12770" + #define REVISION_NR "12771" #endif // __REVISION_NR_H__