diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f50e38b..f818901b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,6 +310,38 @@ IF(EXISTS "${PROJECT_SOURCE_DIR}/data/glest_game/") ADD_SUBDIRECTORY( ${PROJECT_SOURCE_DIR}/data/glest_game ) ENDIF() +SET(CPACK_GENERATOR "DEB") +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mark Vejvoda") #required +SET(CPACK_DEBIAN_PACKAGE_DEPENDS " + libcurl4-gnutls-dev | libcurl4-nss-dev, + libfontconfig1-dev, + libftgl-dev, + libglew-dev, + libircclient-dev, + libjpeg-dev, + liblua5.1-0-dev, + libminiupnpc-dev, + libogg-dev, + libopenal-dev, + libpng12-dev, + libsdl1.2-dev, + libvlc-dev, + libvorbis-dev, + libwxgtk2.8-dev, + libxerces-c2-dev, + libxml2-dev, + libz-dev, + libfribidi-dev") + +#find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems") +#if(DPKG_PROGRAM) +# execute_process( +# COMMAND ${DPKG_PROGRAM} --print-architecture +# OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE +# OUTPUT_STRIP_TRAILING_WHITESPACE +# ) +#endif(DPKG_PROGRAM) + SET(CPACK_PACKAGE_NAME ${PKG_NAME}) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MegaGlest") SET(CPACK_PACKAGE_VENDOR "megaglest.org") diff --git a/source/shared_lib/sources/xml/xml_parser.cpp b/source/shared_lib/sources/xml/xml_parser.cpp index 191f6762..5015f818 100644 --- a/source/shared_lib/sources/xml/xml_parser.cpp +++ b/source/shared_lib/sources/xml/xml_parser.cpp @@ -9,6 +9,7 @@ // License, or (at your option) any later version // ============================================================== +#include "data_types.h" #include "xml_parser.h" #include @@ -21,7 +22,6 @@ #include #include #include "util.h" -#include "data_types.h" #include "properties.h" #include "platform_common.h" #include "platform_util.h" @@ -283,7 +283,7 @@ XmlNode *XmlIoRapid::load(const string &path, const std::map &map throw megaglest_runtime_error("Can not open file: [" + path + "]"); } - if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); + if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); xmlFile.unsetf(ios::skipws); @@ -292,7 +292,7 @@ XmlNode *XmlIoRapid::load(const string &path, const std::map &map streampos size = xmlFile.tellg(); xmlFile.seekg(0); - if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); + if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); // Load data and add terminating 0 vector buffer; @@ -300,21 +300,21 @@ XmlNode *XmlIoRapid::load(const string &path, const std::map &map xmlFile.read(&buffer.front(), static_cast(size)); buffer[(unsigned int)size] = 0; - if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); + if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); // This is required because rapidxml seems to choke when we load lua // scenarios that have lua + xml style comments replaceAllBetweenTokens(buffer, "", "", true); - if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); + if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); doc->parse(&buffer.front()); - if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); + if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); rootNode= new XmlNode(doc->first_node(),mapTagReplacementValues); - if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); + if(showPerfStats) printf("In [%s::%s Line: %d] took msecs: " MG_I64_SPECIFIER "\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis()); #if defined(WIN32) && !defined(__MINGW32__) if(fp) {