aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-07-04 18:26:54 +0200
committerShauren <shauren.trinity@gmail.com>2012-07-04 18:26:54 +0200
commit138375c0455fc0c7f1c2fc0e6b94930dea28ae9c (patch)
treeb7208fb1cea78be18c75676abacc97202cccb8bc
parent7bd0540ca436a5ca8d882a2c202e91c51e7b3a21 (diff)
Merged pull request #6873
-rw-r--r--dep/StormLib/CMakeLists.txt20
-rw-r--r--dep/StormLib/searchFix.patch49
-rw-r--r--src/tools/map_extractor/System.cpp7
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp5
4 files changed, 9 insertions, 72 deletions
diff --git a/dep/StormLib/CMakeLists.txt b/dep/StormLib/CMakeLists.txt
index c7595b9c8be..a6735e0a6a0 100644
--- a/dep/StormLib/CMakeLists.txt
+++ b/dep/StormLib/CMakeLists.txt
@@ -1,6 +1,3 @@
-project(StormLib)
-cmake_minimum_required(VERSION 2.6)
-
set(SRC_FILES
src/adpcm/adpcm.cpp
src/huffman/huff.cpp
@@ -241,23 +238,18 @@ add_definitions(-D_7ZIP_ST -DBZ_STRICT_ANSI)
if(WIN32)
if(MSVC)
- message(STATUS "Using MSVC")
add_definitions(-D_7ZIP_ST -DWIN32)
- else()
- message(STATUS "Using mingw")
endif()
set(SRC_ADDITIONAL_FILES ${ZLIB_BZIP2_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES})
set(LINK_LIBS wininet)
endif()
if(APPLE)
- message(STATUS "Using Mac OS X port")
set(LINK_LIBS z bz2)
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES})
endif()
if (${CMAKE_SYSTEM_NAME} STREQUAL Linux)
- message(STATUS "Using Linux port")
option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF)
if(WITH_LIBTOMCRYPT)
set(LINK_LIBS z bz2 tomcrypt)
@@ -267,15 +259,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL Linux)
endif()
endif()
-add_library(storm SHARED ${SRC_FILES} ${SRC_ADDITIONAL_FILES})
+add_library(storm STATIC ${SRC_FILES} ${SRC_ADDITIONAL_FILES})
target_link_libraries(storm ${LINK_LIBS})
-option(WITH_TEST "Compile Test application" OFF)
-if(WITH_TEST)
- add_executable(storm_test ${TEST_SRC_FILES})
- target_link_libraries(storm_test storm)
-endif()
-
if(APPLE)
set_target_properties(storm PROPERTIES FRAMEWORK true)
set_target_properties(storm PROPERTIES PUBLIC_HEADER "src/StormLib.h src/StormPort.h")
@@ -290,7 +276,3 @@ endif()
if(WIN32)
set_target_properties(storm PROPERTIES OUTPUT_NAME StormLib)
endif()
-
-install(TARGETS storm RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib FRAMEWORK DESTINATION /Library/Frameworks)
-install(FILES src/StormLib.h src/StormPort.h DESTINATION include)
-
diff --git a/dep/StormLib/searchFix.patch b/dep/StormLib/searchFix.patch
deleted file mode 100644
index d4ba11d8645..00000000000
--- a/dep/StormLib/searchFix.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/dep/StormLib/src/SFileFindFile.cpp b/dep/StormLib/src/SFileFindFile.cpp
-index aa065d2..542637b 100644
---- a/dep/StormLib/src/SFileFindFile.cpp
-+++ b/dep/StormLib/src/SFileFindFile.cpp
-@@ -31,7 +31,7 @@ struct TMPQSearch
- DWORD dwSearchTableItems; // Number of items in the search table
- DWORD dwNextIndex; // Next file index to be checked
- DWORD dwFlagMask; // For checking flag mask
-- char szSearchMask[1]; // Search mask (variable length)
-+ char * szSearchMask; // Search mask (variable length)
- };
-
- //-----------------------------------------------------------------------------
-@@ -69,7 +69,7 @@ bool CheckWildCard(const char * szString, const char * szWildCard)
- szString++;
- }
-
-- // If there is '*', means zero or more chars. We have to
-+ // If there is '*', means zero or more chars. We have to
- // find the sequence after '*'
- if(*szWildCard == '*')
- {
-@@ -337,6 +337,8 @@ static void FreeMPQSearch(TMPQSearch *& hs)
- {
- if(hs->pSearchTable != NULL)
- STORM_FREE(hs->pSearchTable);
-+ if(hs->szSearchMask != NULL)
-+ free(hs->szSearchMask); // allocated with strdup
- STORM_FREE(hs);
- hs = NULL;
- }
-@@ -376,7 +378,7 @@ HANDLE WINAPI SFileFindFirstFile(HANDLE hMpq, const char * szMask, SFILE_FIND_DA
- if(nError == ERROR_SUCCESS)
- {
- memset(hs, 0, sizeof(TMPQSearch));
-- strcpy(hs->szSearchMask, szMask);
-+ hs->szSearchMask = strdup(szMask);
- hs->dwFlagMask = MPQ_FILE_EXISTS;
- hs->ha = ha;
-
-@@ -406,7 +408,7 @@ HANDLE WINAPI SFileFindFirstFile(HANDLE hMpq, const char * szMask, SFILE_FIND_DA
- FreeMPQSearch(hs);
- SetLastError(nError);
- }
--
-+
- // Return the result value
- return (HANDLE)hs;
- }
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index c8d5c105af3..4f300f0ef0e 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -1019,7 +1019,9 @@ void ExtractDBCFiles(int l, bool basicLocale)
uint32 count = 0;
if (listFile)
{
- std::string outputPath = "./dbc/";
+ std::string outputPath = output_path;
+ outputPath += "/dbc/";
+
CreateDir(outputPath);
if (!basicLocale)
{
@@ -1063,7 +1065,8 @@ void ExtractDB2Files(int l, bool basicLocale)
uint32 count = 0;
if (listFile)
{
- std::string outputPath = "./dbc/";
+ std::string outputPath = output_path;
+ outputPath += "/dbc/";
if (!basicLocale)
{
outputPath += Locales[l];
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index a1fd4e8321a..1582f9d0b25 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -59,7 +59,7 @@
HANDLE WorldMpq = NULL;
HANDLE LocaleMpq = NULL;
-uint32 CONF_TargetBuild = 15595; // 4.3.4.15595
+uint32 CONF_TargetBuild = 14545; // 4.2.2.14545
// List MPQ for extract maps from
char const* CONF_mpq_list[]=
@@ -517,6 +517,7 @@ bool processArgv(int argc, char ** argv, const char *versionString)
break;
}
}
+
if(!result)
{
printf("Extract %s.\n",versionString);
@@ -524,6 +525,7 @@ bool processArgv(int argc, char ** argv, const char *versionString)
printf(" -s : (default) small size (data size optimization), ~500MB less vmap data.\n");
printf(" -l : large size, ~500MB more vmap data. (might contain more details)\n");
printf(" -d <path>: Path to the vector data source folder.\n");
+ printf(" -b : target build (default 14545)");
printf(" -? : This message.\n");
}
@@ -545,7 +547,6 @@ bool processArgv(int argc, char ** argv, const char *versionString)
int main(int argc, char ** argv)
{
- getc(stdin);
bool success=true;
const char *versionString = "V4.00 2012_02";