This commit is contained in:
mattraykowski 2010-09-21 07:03:17 -05:00
commit c425329719
235 changed files with 6587 additions and 999 deletions

View file

@ -151,6 +151,7 @@ code/snowballs/build/*
code/ryzom/build/*
code/build/*
build/*
install/*
# Linux nel compile
code/nel/build/nel-config

View file

@ -23,12 +23,26 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
$ENV{SystemDrive}/MySQL/*/include)
IF(WIN32 AND MSVC)
FIND_LIBRARY(MYSQL_LIBRARIES NAMES libmysql mysqlclient
FIND_LIBRARY(MYSQL_LIBRARY_RELEASE NAMES libmysql mysqlclient
PATHS
$ENV{ProgramFiles}/MySQL/*/lib/opt
$ENV{SystemDrive}/MySQL/*/lib/opt)
FIND_LIBRARY(MYSQL_LIBRARY_DEBUG NAMES libmysqld mysqlclientd
PATHS
$ENV{ProgramFiles}/MySQL/*/lib/opt
$ENV{SystemDrive}/MySQL/*/lib/opt)
ELSE(WIN32 AND MSVC)
FIND_LIBRARY(MYSQL_LIBRARIES NAMES mysqlclient
FIND_LIBRARY(MYSQL_LIBRARY_RELEASE NAMES mysqlclient
PATHS
/usr/lib
/usr/local/lib
/usr/lib/mysql
/usr/local/lib/mysql
/opt/local/lib/mysql5/mysql
)
FIND_LIBRARY(MYSQL_LIBRARY_DEBUG NAMES mysqlclientd
PATHS
/usr/lib
/usr/local/lib
@ -38,6 +52,15 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
)
ENDIF(WIN32 AND MSVC)
IF(MYSQL_INCLUDE_DIR)
IF(MYSQL_LIBRARY_RELEASE)
SET(MYSQL_LIBRARIES "optimized;${MYSQL_LIBRARY_RELEASE}")
IF(MYSQL_LIBRARY_DEBUG)
SET(MYSQL_LIBRARIES "${MYSQL_LIBRARIES};debug;${MYSQL_LIBRARY_DEBUG}")
ENDIF(MYSQL_LIBRARY_DEBUG)
ENDIF(MYSQL_LIBRARY_RELEASE)
ENDIF(MYSQL_INCLUDE_DIR)
IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
SET(MYSQL_FOUND TRUE)
MESSAGE(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
@ -46,6 +69,6 @@ ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
MESSAGE(STATUS "MySQL not found.")
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
MARK_AS_ADVANCED(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
MARK_AS_ADVANCED(MYSQL_LIBRARY_RELEASE MYSQL_LIBRARY_DEBUG)
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)

View file

@ -34,7 +34,6 @@
# include <process.h>
# include <intrin.h>
#else
# include <cmath>
# include <unistd.h>
# include <sys/types.h>
#endif
@ -205,9 +204,13 @@ inline double isValidDouble (double v)
{
#ifdef NL_OS_WINDOWS
return _finite(v) && !_isnan(v);
#else
#ifdef _STLPORT_VERSION
return !isnan(v) && !isinf(v);
#else
return !std::isnan(v) && !std::isinf(v);
#endif
#endif
}

View file

@ -19,6 +19,7 @@
#include "types_nl.h"
#include "time_nl.h"
#include "common.h"
#include <map>
#ifdef NL_OS_UNIX
@ -280,7 +281,7 @@ public:
break;
#ifdef NL_OS_WINDOWS
Sleep (wait_time);
nlSleep (wait_time);
#else
//std::cout << "Sleeping i=" << i << std::endl;
usleep( wait_time*1000 );
@ -390,7 +391,7 @@ public:
break;
#ifdef NL_OS_WINDOWS
Sleep (wait_time);
nlSleep (wait_time);
#else
//std::cout << "Sleeping i=" << i << std::endl;
usleep( wait_time*1000 );

View file

@ -187,6 +187,10 @@ inline std::string toString(const uint32 &val) { return toString("%u", val); }
inline std::string toString(const sint32 &val) { return toString("%d", val); }
inline std::string toString(const uint64 &val) { return toString("%"NL_I64"u", val); }
inline std::string toString(const sint64 &val) { return toString("%"NL_I64"d", val); }
#ifdef NL_COMP_GCC
# if GCC_VERSION == 40102
// error fix for size_t? gcc 4.1.2 requested this type instead of size_t ...
inline std::string toString(const long unsigned int &val)
{
@ -194,10 +198,16 @@ inline std::string toString(const long unsigned int &val)
return toString((uint64)val);
return toString((uint32)val);
}
# endif
#endif
#if (SIZEOF_SIZE_T) == 8
inline std::string toString(const size_t &val) { return toString("%"NL_I64"u", val); }
//#else
//inline std::string toString(const size_t &val) { return toString("%u", val); }
#else
#ifdef NL_OS_MAC
inline std::string toString(const size_t &val) { return toString("%u", val); }
#endif
#endif
inline std::string toString(const float &val) { return toString("%f", val); }
inline std::string toString(const double &val) { return toString("%lf", val); }

View file

@ -40,8 +40,10 @@
# define FINAL_VERSION 0
#endif // FINAL_VERSION
// Operating systems definition
// This way we know about _HAS_TR1 and _STLPORT_VERSION
#include <string>
// Operating systems definition
#ifdef _WIN32
# define NL_OS_WINDOWS
# define NL_LITTLE_ENDIAN
@ -51,7 +53,6 @@
# endif
# if _MSC_VER >= 1500
# define NL_COMP_VC9
# include <string> // This way we know about _HAS_TR1 :O
# ifndef _STLPORT_VERSION // STLport doesn't depend on MS STL features
# if defined(_HAS_TR1) && (_HAS_TR1 + 0) // VC9 TR1 feature pack
# define NL_ISO_STDTR1_AVAILABLE
@ -88,7 +89,7 @@
# ifdef _WIN64
# define NL_OS_WIN64
# ifndef NL_NO_ASM
// Windows 64bits platform SDK compilers doesn't support inline assemblers
// Windows 64bits platform SDK compilers doesn't support inline assembler
# define NL_NO_ASM
# endif
# endif
@ -131,9 +132,12 @@
#endif
// gcc 4.1+ provides std::tr1
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 1))
#ifdef NL_COMP_GCC
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# if GCC_VERSION > 40100
# define NL_ISO_STDTR1_AVAILABLE
# define NL_ISO_STDTR1_HEADER(header) <tr1/header>
# endif
#endif
// Remove stupid Visual C++ warnings
@ -261,22 +265,6 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
#define NL_I64 "I64"
#ifndef NL_ISO_STDTR1_AVAILABLE
# include <hash_map>
# include <hash_set>
# ifdef _STLP_HASH_MAP
# define CHashMap ::std::hash_map
# define CHashSet ::std::hash_set
# define CHashMultiMap ::std::hash_multimap
# elif defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) // VC7 through 9
# define CHashMap stdext::hash_map
# define CHashSet stdext::hash_set
# define CHashMultiMap stdext::hash_multimap
# else
# pragma error("You need to update your compiler")
# endif
#endif // NL_ISO_STDTR1_AVAILABLE
#elif defined (NL_OS_UNIX)
#include <sys/types.h>
@ -284,20 +272,45 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
#include <climits>
typedef int8_t sint8;
typedef u_int8_t uint8;
typedef uint8_t uint8;
typedef int16_t sint16;
typedef u_int16_t uint16;
typedef uint16_t uint16;
typedef int32_t sint32;
typedef u_int32_t uint32;
typedef long long int sint64;
typedef unsigned long long int uint64;
typedef uint32_t uint32;
typedef int64_t sint64;
typedef uint64_t uint64;
typedef int sint; // at least 32bits (depend of processor)
typedef unsigned int uint; // at least 32bits (depend of processor)
#define NL_I64 "ll"
#if __SIZEOF_LONG__ == 8
# define NL_I64 "l"
#else
# define NL_I64 "ll"
#endif // __SIZEOF_LONG__ == 8
#if defined(NL_COMP_GCC) && !defined(NL_ISO_STDTR1_AVAILABLE) // GCC4
#endif // NL_OS_UNIX
// CHashMap, CHashSet and CHashMultiMap definitions
#if defined(_STLPORT_VERSION) // STLport detected
# include <hash_map>
# include <hash_set>
# ifdef _STLP_HASH_MAP
# define CHashMap ::std::hash_map
# define CHashSet ::std::hash_set
# define CHashMultiMap ::std::hash_multimap
# endif // _STLP_HASH_MAP
#elif defined(NL_ISO_STDTR1_AVAILABLE) // use std::tr1 for CHash* classes, if available (gcc 4.1+ and VC9 with TR1 feature pack)
# include NL_ISO_STDTR1_HEADER(unordered_map)
# include NL_ISO_STDTR1_HEADER(unordered_set)
# define CHashMap std::tr1::unordered_map
# define CHashSet std::tr1::unordered_set
# define CHashMultiMap std::tr1::unordered_multimap
#elif defined(NL_COMP_VC7) || defined(NL_COMP_VC71) || defined(NL_COMP_VC8) || defined(NL_COMP_VC9) // VC7 through 9
# define CHashMap stdext::hash_map
# define CHashSet stdext::hash_set
# define CHashMultiMap stdext::hash_multimap
#elif defined(NL_COMP_GCC) // GCC4
# include <ext/hash_map>
# include <ext/hash_set>
# define CHashMap ::__gnu_cxx::hash_map
@ -324,18 +337,9 @@ template<> struct hash<uint64>
} // END NAMESPACE __GNU_CXX
#endif // NL_COMP_GCC && !NL_ISO_STDTR1_AVAILABLE
#endif // NL_OS_UNIX
// use std::tr1 for CHash* classes, if available (gcc 4.1+ and VC9 with TR1 feature pack)
#ifdef NL_ISO_STDTR1_AVAILABLE
# include NL_ISO_STDTR1_HEADER(unordered_map)
# include NL_ISO_STDTR1_HEADER(unordered_set)
# define CHashMap std::tr1::unordered_map
# define CHashSet std::tr1::unordered_set
# define CHashMultiMap std::tr1::unordered_multimap
#endif
#else
# pragma error("You need to update your compiler")
#endif // _STLPORT_VERSION
/**
* \typedef ucchar

View file

@ -1,4 +1,5 @@
FILE(GLOB SRC *.cpp *.h ../../include/nel/3d/*.h)
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/3d/*.h)
SOURCE_GROUP(Traversals FILES
anim_detail_trav.cpp
@ -662,7 +663,7 @@ SOURCE_GROUP(Shadows FILES
shadow_poly_receiver.cpp
../../include/nel/3d/shadow_poly_receiver.h)
NL_TARGET_LIB(nel3d ${SRC})
NL_TARGET_LIB(nel3d ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS})

View file

@ -72,9 +72,9 @@ void CHLSTextureBank::addTextureInstance(const std::string &name, uint32 color
uint32 colSize= (uint32)cols.size()*sizeof(CHLSColorDelta);
_TextureInstanceData.resize(_TextureInstanceData.size() + nameSize + colSize);
// copy name
memcpy(&_TextureInstanceData[textInst._DataIndex], nameLwr.c_str(), nameSize);
if (nameSize != 0) memcpy(&_TextureInstanceData[textInst._DataIndex], nameLwr.c_str(), nameSize);
// copy cols
memcpy(&_TextureInstanceData[textInst._DataIndex+nameSize], &cols[0], colSize);
if (colSize != 0) memcpy(&_TextureInstanceData[textInst._DataIndex+nameSize], &cols[0], colSize);
// add the instance.
_TextureInstances.push_back(textInst);

View file

@ -1973,7 +1973,7 @@ void CPSConstraintMesh::newElement(const CPSEmitterInfo &info)
NL_PS_FUNC(CPSConstraintMesh_newElement)
newSizeElement(info);
newPlaneBasisElement(info);
// TODO : avoid code cuplication with CPSFace ...
// TODO : avoid code duplication with CPSFace ...
const uint32 nbConf = (uint32)_PrecompBasis.size();
if (nbConf) // do we use precomputed basis ?
{

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp ../../include/nel/cegui/*.h)
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/cegui/*.h)
ADD_LIBRARY(nelceguirenderer SHARED ${SRC} nelceguirenderer.def)
ADD_LIBRARY(nelceguirenderer SHARED ${HEADERS} ${SRC} nelceguirenderer.def)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INC} ${CEGUI_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(nelceguirenderer nelmisc nel3d ${CEGUI_LIBRARY})

View file

@ -1,10 +1,9 @@
FILE(GLOB SRC *.cpp)
FILE(GLOB PRIV_H *.h)
FILE(GLOB PUB_H ../../include/nel/georges/*.h)
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/georges/*.h)
SOURCE_GROUP(headers FILES ${PRIV_H} ${PUB_H})
# SOURCE_GROUP(headers FILES ${HEADERS})
NL_TARGET_LIB(nelgeorges ${SRC})
NL_TARGET_LIB(nelgeorges ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/ligo/*.h)
NL_TARGET_LIB(nelligo ${SRC})
NL_TARGET_LIB(nelligo ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/logic/*.h)
NL_TARGET_LIB(nellogic ${SRC})
NL_TARGET_LIB(nellogic ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h)
FILE(GLOB HEADERS ../../include/nel/misc/*.h)
NL_TARGET_LIB(nelmisc ${SRC})
NL_TARGET_LIB(nelmisc ${HEADERS} ${SRC})
IF(WITH_GTK)
IF(GTK2_FOUND)
@ -41,6 +42,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file)
TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES})
SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "")
NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc")
NL_ADD_RUNTIME_FLAGS(nelmisc)
NL_ADD_LIB_SUFFIX(nelmisc)

View file

@ -402,6 +402,8 @@ FILE* CBigFile::getFile (const std::string &sFileName, uint32 &rFileSize,
if(handle.File== NULL)
{
handle.File = fopen (bnp->BigFileName.c_str(), "rb");
if (handle.File == NULL)
nlwarning ("bnp: can't fopen big file '%s' error %d '%s'", bnp->BigFileName.c_str(), errno, strerror(errno));
if (handle.File == NULL)
return NULL;
}

View file

@ -1,8 +1,9 @@
FILE(GLOB SRC "*.cpp")
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/net/*.h)
FILE(GLOB NET_MANAGER "net_manager.*")
LIST(REMOVE_ITEM SRC ${NET_MANAGER})
NL_TARGET_LIB(nelnet ${SRC})
NL_TARGET_LIB(nelnet ${HEADERS} ${SRC})
IF(WITH_GTK)
IF(GTK2_FOUND)

View file

@ -2326,9 +2326,9 @@ namespace NLNET
// recall the dump for the module class
NLMISC_CLASS_COMMAND_CALL_BASE(CModuleBase, dump);
log.displayNL("------------------------------");
log.displayNL("-----------------------------");
log.displayNL("Dumping gateway information :");
log.displayNL("------------------------------");
log.displayNL("-----------------------------");
log.displayNL("The gateway has %u locally plugged module :", _PluggedModules.getAToBMap().size());
{

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/pacs/*.h)
NL_TARGET_LIB(nelpacs ${SRC})
NL_TARGET_LIB(nelpacs ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/sound/*.h)
NL_TARGET_LIB(nelsound ${SRC})
NL_TARGET_LIB(nelsound ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})

View file

@ -1,6 +1,7 @@
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../../include/nel/sound/driver/*.h)
NL_TARGET_LIB(nelsnd_lowlevel ${SRC})
NL_TARGET_LIB(nelsnd_lowlevel ${HEADERS} ${SRC})
IF(WITH_STATIC)
# Add libogg dependency only if target is static because to libvorbisfile

View file

@ -25,5 +25,6 @@
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
#include <windows.h>
#endif

View file

@ -38,7 +38,7 @@ using namespace std;
string DivideBy2Dir= "/d4/";
string HlsInfoDir= "hlsInfo/";
//string HlsInfoDir= "hlsInfo/";
// ========================================================================================================
@ -57,6 +57,7 @@ struct CBuildInfo
{
std::string InputPath;
std::string OutputPath;
std::string HlsInfoPath;
std::string CachePath;
std::vector<std::string> BitmapExtensions; // the supported extension for bitmaps
std::string OutputFormat; // png or tga
@ -277,6 +278,16 @@ int main(int argc, char* argv[])
{
}
/// hls info path
try
{
bi.HlsInfoPath = NLMISC::CPath::standardizePath(cf.getVar("hls_info_path").asString());
}
catch (NLMISC::EUnknownVar &)
{
bi.HlsInfoPath = "hlsInfo/";
}
/// output
try
{
@ -533,7 +544,7 @@ static bool CheckIfNeedRebuildColoredVersionForOneBitmap(const CBuildInfo &bi, c
}
// get hls info version that is in the cache. if not possible, must rebuild
std::string outputHLSInfo = HlsInfoDir + fileName + ".hlsinfo";
std::string outputHLSInfo = bi.HlsInfoPath + fileName + ".hlsinfo";
std::string cacheHLSInfo = bi.CachePath + fileName + ".hlsinfo";
if (!NLMISC::CFile::fileExists(cacheHLSInfo.c_str()) )
return true;
@ -843,13 +854,13 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
// **** save the TMP hlsInfo
NLMISC::COFile os;
if (os.open(HlsInfoDir + fileName + ".hlsinfo"))
if (os.open(bi.HlsInfoPath + fileName + ".hlsinfo"))
{
os.serial(hlsInfo);
}
else
{
nlwarning(("Couldn't write " + HlsInfoDir + fileName + ".hlsinfo").c_str());
nlwarning(("Couldn't write " + bi.HlsInfoPath + fileName + ".hlsinfo").c_str());
}
}

View file

@ -36,11 +36,18 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
{
// Result to return
bool bRet = false;
char tempName[L_tmpnam];
tmpnam(tempName);
char tempFileName[MAX_PATH] = { 0 };
char tempPathBuffer[MAX_PATH] = { 0 };
try
{
DWORD dwRetVal = GetTempPathA(MAX_PATH, tempPathBuffer);
if (dwRetVal > MAX_PATH || (dwRetVal == 0))
nlerror("GetTempPath failed");
UINT uRetVal = GetTempFileNameA(tempPathBuffer, TEXT("_nel_export_mesh_"), 0, tempFileName);
if (uRetVal == 0)
nlerror("GetTempFileName failed");
// Eval the object a time
ObjectState os = node.EvalWorldState(time);
@ -48,7 +55,7 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
if (os.obj)
{
// Skeleton shape
CSmartPtr<CSkeletonShape> skeletonShape = NULL;
CSkeletonShape * skeletonShape = NULL;
TInodePtrInt *mapIdPtr=NULL;
TInodePtrInt mapId;
@ -69,7 +76,7 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
CExportNel::addSkeletonBindPos (node, boneBindPos);
// Build the skeleton based on the bind pos information
_ExportNel->buildSkeletonShape(*skeletonShape.getPtr(), *skeletonRoot, &boneBindPos, mapId, time);
_ExportNel->buildSkeletonShape(*skeletonShape, *skeletonRoot, &boneBindPos, mapId, time);
// Set the pointer to not NULL
mapIdPtr=&mapId;
@ -83,16 +90,16 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
if (InfoLog)
InfoLog->display("Beg buildShape %s \n", node.GetName());
// Export in mesh format
CSmartPtr<IShape> pShape = _ExportNel->buildShape(node, time, mapIdPtr, true);
IShape *pShape = _ExportNel->buildShape(node, time, mapIdPtr, true);
if (InfoLog)
InfoLog->display("End buildShape in %d ms \n", timeGetTime()-t);
// Conversion success ?
if (pShape.getPtr())
if (pShape)
{
// Open a file
COFile file;
if (file.open(tempName))
if (file.open(tempFileName))
{
try
{
@ -102,6 +109,9 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
// Serial the shape
shapeStream.serial(file);
// Close the file
file.close();
// All is good
bRet = true;
}
@ -116,29 +126,61 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
{
}
remove(tempName);
remove(tempFileName);
}
}
else
{
nlwarning("Failed to create file %s", tempName);
nlwarning("Failed to create file %s", tempFileName);
}
// Delete the pointer
nldebug ("Delete the pointer");
nldebug("Delete the pointer");
try
{
bool tempBRet = bRet;
bRet = false;
pShape = NULL;
// delete pShape; // FIXME: there is a delete bug with CMeshMultiLod exported from max!!!
bRet = tempBRet;
}
catch (...)
{
nlwarning("Failed to delete pShape pointer! Something might be wrong.");
remove(tempName);
remove(tempFileName);
bRet = false;
}
// Verify the file
nldebug("Verify exported shape file");
try
{
bool tempBRet = bRet;
bRet = false;
CIFile vf;
if (vf.open(tempFileName))
{
nldebug("File opened, size: %u", vf.getFileSize());
CShapeStream s;
s.serial(vf);
nldebug("Shape serialized");
vf.close();
nldebug("File closed");
delete s.getShapePointer();
nldebug("Shape deleted");
bRet = tempBRet;
}
else
{
nlwarning("Failed to open file: %s", tempFileName);
}
}
catch (...)
{
nlwarning("Failed to verify shape. Must crash now.");
remove(tempFileName);
bRet = false;
}
}
}
}
@ -158,8 +200,8 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
{
}
CFile::moveFile(sPath, tempName);
nlinfo("MOVE %s -> %s", tempName, sPath);
CFile::moveFile(sPath, tempFileName);
nlinfo("MOVE %s -> %s", tempFileName, sPath);
}
return bRet;

View file

@ -55,6 +55,9 @@ def_visible_primitive ( mirror_physique, "NelMirrorPhysique" );
def_visible_primitive ( get_file_modification_date, "NeLGetFileModificationDate" );
def_visible_primitive ( set_file_modification_date, "NeLSetFileModificationDate" );
def_visible_primitive ( force_quit_on_msg_displayer, "NelForceQuitOnMsgDisplayer");
def_visible_primitive ( force_quit_right_now, "NelForceQuitRightNow");
char *sExportShapeErrorMsg = "NeLExportShape [Object] [Filename.shape]";
char *sExportShapeExErrorMsg = "NeLExportShapeEx [Object] [Filename.shape] [bShadow] [bExportLighting] [sLightmapPath] [nLightingLimit] [fLumelSize] [nOverSampling] [bExcludeNonSelected] [bShowLumel]";
char *sExportAnimationErrorMsg = "NelExportAnimation [node array] [Filename.anim] [bool_scene_animation]";
@ -933,6 +936,55 @@ Value* set_file_modification_date_cf (Value** arg_list, int count)
return &false_value;
}
class CSuicideMsgBoxDisplayer : public CMsgBoxDisplayer
{
public:
CSuicideMsgBoxDisplayer (const char *displayerName = "") : CMsgBoxDisplayer(displayerName) { }
protected:
/// Put the string into the file.
virtual void doDisplay( const CLog::TDisplayInfo& args, const char *message )
{
DWORD ec = 0;
HANDLE h = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId());
GetExitCodeProcess(h, &ec);
TerminateProcess(h, ec);
}
};
Value* force_quit_on_msg_displayer_cf(Value** arg_list, int count)
{
nlwarning("Enable force quit on NeL report msg displayer");
// disable the Windows popup telling that the application aborted and disable the dr watson report.
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
putenv("NEL_IGNORE_ASSERT=1");
if (NLMISC::DefaultMsgBoxDisplayer || INelContext::getInstance().getDefaultMsgBoxDisplayer())
{
if (!NLMISC::DefaultMsgBoxDisplayer)
NLMISC::DefaultMsgBoxDisplayer = INelContext::getInstance().getDefaultMsgBoxDisplayer();
nldebug("Disable NeL report msg displayer");
INelContext::getInstance().getAssertLog()->removeDisplayer(NLMISC::DefaultMsgBoxDisplayer);
INelContext::getInstance().getErrorLog()->removeDisplayer(NLMISC::DefaultMsgBoxDisplayer);
// TODO: Delete original NLMISC::DefaultMsgBoxDisplayer?
}
NLMISC::DefaultMsgBoxDisplayer = new CSuicideMsgBoxDisplayer("FORCEQUIT_MDB");
INelContext::getInstance().setDefaultMsgBoxDisplayer(NLMISC::DefaultMsgBoxDisplayer);
INelContext::getInstance().getAssertLog()->addDisplayer(NLMISC::DefaultMsgBoxDisplayer);
INelContext::getInstance().getErrorLog()->addDisplayer(NLMISC::DefaultMsgBoxDisplayer);
return &true_value;
}
Value* force_quit_right_now_cf(Value** arg_list, int count)
{
// because quitMAX can fail
nlwarning("Force quit");
DWORD ec = 0;
HANDLE h = OpenProcess(PROCESS_ALL_ACCESS, 0, GetCurrentProcessId());
GetExitCodeProcess(h, &ec);
TerminateProcess(h, ec);
return &true_value;
}
/*===========================================================================*\
| MAXScript Plugin Initialization
\*===========================================================================*/

View file

@ -131,7 +131,7 @@ static void copyMultiLodMeshBaseLod0Infos(CMeshBase::CMeshBaseBuild &dst, const
// ***************************************************************************
// Export a mesh
NLMISC::CSmartPtr<NL3D::IShape> CExportNel::buildShape (INode& node, TimeValue time, const TInodePtrInt *nodeMap, bool buildLods)
NL3D::IShape *CExportNel::buildShape (INode& node, TimeValue time, const TInodePtrInt *nodeMap, bool buildLods)
{
// Is this a multi lod object ?
@ -139,7 +139,7 @@ NLMISC::CSmartPtr<NL3D::IShape> CExportNel::buildShape (INode& node, TimeValue t
// Here, we must check what kind of node we can build with this mesh.
// For the time, just Triobj is supported.
CSmartPtr<IShape> retShape = NULL;
NL3D::IShape *retShape = NULL;
// If skinning, disable skin modifier
if (nodeMap)
@ -206,7 +206,7 @@ NLMISC::CSmartPtr<NL3D::IShape> CExportNel::buildShape (INode& node, TimeValue t
else
{
// Mesh base ?
CSmartPtr<CMeshBase> meshBase = NULL;
CMeshBase *meshBase = NULL;
// Get the node matrix
Matrix3 nodeMatrixMax;
@ -317,8 +317,7 @@ NLMISC::CSmartPtr<NL3D::IShape> CExportNel::buildShape (INode& node, TimeValue t
// Make a CMeshMultiLod mesh object
CMeshMultiLod *multiMesh = new CMeshMultiLod;
++multiMesh->crefs; // hack
CMeshMultiLod *multiMesh = new CMeshMultiLod; // FIXME: there is a delete bug with CMeshMultiLod exported from max!!!
// Build it
multiMesh->build(multiLodBuild);
@ -461,7 +460,7 @@ NLMISC::CSmartPtr<NL3D::IShape> CExportNel::buildShape (INode& node, TimeValue t
enableSkinModifier (node, true);
// Set the dist max for this shape
if (retShape.getPtr() && !multiLodObject && buildLods)
if (retShape && !multiLodObject && buildLods)
{
// Get the dist max for this node
float distmax = getScriptAppData (&node, NEL3D_APPDATA_LOD_DIST_MAX, NEL3D_APPDATA_LOD_DIST_MAX_DEFAULT);

View file

@ -292,7 +292,7 @@ public:
*
* skeletonShape must be NULL if no bones.
*/
NLMISC::CSmartPtr<NL3D::IShape> buildShape (INode& node, TimeValue time, const TInodePtrInt *nodeMap,
NL3D::IShape* buildShape (INode& node, TimeValue time, const TInodePtrInt *nodeMap,
bool buildLods);
/**

View file

@ -31,9 +31,105 @@ if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
try:
from buildsite import *
except ImportError:
printLog(log, "*** FIRST RUN ***")
from tools import *
try:
BuildQuality
except NameError:
BuildQuality = 1
try:
ToolDirectories
except NameError:
ToolDirectories = [ 'R:/code/nel', 'R:/code/ryzom/tools' ]
try:
ToolSuffix
except NameError:
ToolSuffix = "_r.exe"
try:
ScriptDirectory
except NameError:
ScriptDirectory = "R:/code/nel/tools/build_gamedata"
try:
WorkspaceDirectory
except NameError:
WorkspaceDirectory = "R:/code/ryzom/tools/build_gamedata/workspace"
try:
DatabaseDirectory
except NameError:
DatabaseDirectory = "W:/database"
try:
ExportBuildDirectory
except NameError:
ExportBuildDirectory = "W:/export"
try:
InstallDirectory
except NameError:
InstallDirectory = "W:/install"
try:
DataShardDirectory
except NameError:
DataShardDirectory = "R:/code/ryzom/server/data_shard"
try:
ClientDevDirectory
except NameError:
ClientDevDirectory = "W:/client_dev"
try:
ClientPatchDirectory
except NameError:
ClientPatchDirectory = "W:/client_patch"
try:
ClientInstallDirectory
except NameError:
ClientInstallDirectory = "W:/client_install"
try:
LeveldesignDirectory
except NameError:
LeveldesignDirectory = "L:/leveldesign"
try:
LeveldesignDfnDirectory
except NameError:
LeveldesignDfnDirectory = "L:/leveldesign/dfn"
try:
LeveldesignWorldDirectory
except NameError:
LeveldesignWorldDirectory = "L:/leveldesign/world"
try:
PrimitivesDirectory
except NameError:
PrimitivesDirectory = "L:/primitives"
try:
GamedevDirectory
except NameError:
GamedevDirectory = "R:/code/ryzom/client/data/gamedev"
try:
DataCommonDirectory
except NameError:
DataCommonDirectory = "R:/code/ryzom/common/data_common"
try:
WindowsExeDllCfgDirectories
except NameError:
WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/source/external_local/bin/x86', 'D:/source/external_shared/bin/x86', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/client', 'R:/code/ryzom/tools/client/client_config/bin' ]
try:
MaxAvailable
except NameError:
MaxAvailable = 1
try:
MaxDirectory
except NameError:
MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010"
try:
MaxUserDirectory
except NameError:
MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu"
try:
MaxExecutable
except NameError:
MaxExecutable = "3dsmax.exe"
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup build site")
@ -52,10 +148,24 @@ ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")
WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/")
DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/")
ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/")
ClientDataDirectory = askVar(log, "Client Data Directory", ClientDataDirectory).replace("\\", "/")
InstallDirectory = askVar(log, "Install Directory", InstallDirectory).replace("\\", "/")
DataShardDirectory = askVar(log, "Data Shard Directory", DataShardDirectory).replace("\\", "/")
ClientDevDirectory = askVar(log, "Client Dev Directory", ClientDevDirectory).replace("\\", "/")
ClientPatchDirectory = askVar(log, "Client Patch Directory", ClientPatchDirectory).replace("\\", "/")
ClientInstallDirectory = askVar(log, "Client Install Directory", ClientInstallDirectory).replace("\\", "/")
LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/")
LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/")
LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/")
PrimitivesDirectory = askVar(log, "Primitives Directory", PrimitivesDirectory).replace("\\", "/")
GamedevDirectory = askVar(log, "Gamedev Directory", GamedevDirectory).replace("\\", "/")
DataCommonDirectory = askVar(log, "Data Common Directory", DataCommonDirectory).replace("\\", "/")
WindowsExeDllCfgDirectories[0] = askVar(log, "Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/")
WindowsExeDllCfgDirectories[1] = askVar(log, "Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/")
WindowsExeDllCfgDirectories[2] = askVar(log, "Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/")
WindowsExeDllCfgDirectories[3] = askVar(log, "Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/")
WindowsExeDllCfgDirectories[4] = askVar(log, "Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/")
WindowsExeDllCfgDirectories[5] = askVar(log, "Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/")
WindowsExeDllCfgDirectories[6] = askVar(log, "Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/")
MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable)))
if MaxAvailable:
MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/")
@ -111,8 +221,12 @@ sf.write("# Data build directories\n")
sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n")
sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n")
sf.write("\n")
sf.write("# Client data install directory (client/data)\n")
sf.write("ClientDataDirectory = \"" + str(ClientDataDirectory) + "\"\n")
sf.write("# Install directories\n")
sf.write("InstallDirectory = \"" + str(InstallDirectory) + "\"\n")
sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n")
sf.write("ClientDevDirectory = \"" + str(ClientDevDirectory) + "\"\n")
sf.write("ClientPatchDirectory = \"" + str(ClientPatchDirectory) + "\"\n")
sf.write("ClientInstallDirectory = \"" + str(ClientInstallDirectory) + "\"\n")
sf.write("\n")
sf.write("# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)\n")
sf.write("\n")
@ -120,6 +234,12 @@ sf.write("# Leveldesign directories\n")
sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n")
sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n")
sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n")
sf.write("PrimitivesDirectory = \"" + str(PrimitivesDirectory) + "\"\n")
sf.write("\n")
sf.write("# Misc data directories\n")
sf.write("GamedevDirectory = \"" + str(GamedevDirectory) + "\"\n")
sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n")
sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n")
sf.write("\n")
sf.write("# 3dsMax directives\n")
sf.write("MaxAvailable = " + str(MaxAvailable) + "\n")

View file

@ -0,0 +1,64 @@
#!/usr/bin/python
#
# \file 4_data_shard.py
# \brief Install to data shard
# \date 2009-02-18 16:19GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install to data shard
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install to data shard")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
for dir in InstallShardDataDirectories:
printLog(log, "SHARD DIRECTORY " + dir)
mkPath(log, InstallDirectory + "/" + dir)
mkPath(log, DataShardDirectory + "/" + dir)
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, DataShardDirectory + "/" + dir)
for dir in InstallShardDataCollisionsDirectories:
printLog(log, "SHARD COLLISIONS " + dir)
mkPath(log, InstallDirectory + "/" + dir)
mkPath(log, DataShardDirectory + "/collisions/" + dir)
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, DataShardDirectory + "/collisions/" + dir)
printLog(log, "")
log.close()
if os.path.isfile("4_data_shard.log"):
os.remove("4_data_shard.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_data_shard.log")
shutil.move("log.log", "4_data_shard.log")

View file

@ -0,0 +1,75 @@
#!/usr/bin/python
#
# \file 5_client_dev.py
# \brief Install to client dev
# \date 2009-02-18 16:19GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install to client dev
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install to client dev")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
if not os.path.isfile(ClientDevDirectory + "/client.cfg"):
printLog(log, ">>> Generate client.cfg <<<")
cfg = open(ClientDevDirectory + "/client.cfg", "w")
cfg.write("RootConfigFilename = \"client_default.cfg\";\n")
cfg.write("PreDataPath = {\n")
cfg.write("\t\"W:/install\", \"user\", \"patch\", \"data\", \"examples\" \n")
cfg.write("};\n")
printLog(log, "")
printLog(log, ">>> Install data <<<")
for category in InstallClientData:
if (category["UnpackTo"] != None):
printLog(log, "CATEGORY " + category["Name"])
targetPath = ClientDevDirectory
if (category["UnpackTo"] != ""):
targetPath += "/" + category["UnpackTo"]
mkPath(log, targetPath)
for package in category["Packages"]:
printLog(log, "PACKAGE " + package[0])
mkPath(log, InstallDirectory + "/" + package[0])
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath)
printLog(log, "")
log.close()
if os.path.isfile("5_client_dev.log"):
os.remove("5_client_dev.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_dev.log")
shutil.move("log.log", "5_client_dev.log")

View file

@ -0,0 +1,149 @@
#!/usr/bin/python
#
# \file 6_client_patch.py
# \brief Install to client patch
# \date 2009-02-18 16:19GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install to client patch
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install to client patch")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix)
PatchGen = findTool(log, ToolDirectories, PatchGenTool, ToolSuffix)
printLog(log, "")
# Find **** HARDCODED **** WINDOWS **** tools ... TODO: fix patch_gen tool !!!
Lzma = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, "lzma.exe")
printLog(log, "LZMA " + Lzma)
XDelta = findFileMultiDir(log, ToolDirectories + WindowsExeDllCfgDirectories, "xdelta.exe")
printLog(log, "XDELTA " + XDelta)
printLog(log, "")
if BnpMake == "":
toolLogFail(log, BnpMakeTool, ToolSuffix)
elif PatchGen == "":
toolLogFail(log, PatchGenTool, ToolSuffix)
elif Lzma == "":
toolLogFail(log, "LZMA", ToolSuffix)
elif XDelta == "":
toolLogFail(log, "XDELTA", ToolSuffix)
elif os.path.dirname(Lzma) != os.path.dirname(XDelta):
printLog(log, "FAIL lzma.exe and xdelta.exe must be in the same directory")
else:
mkPath(log, ClientPatchDirectory)
productXml = ClientPatchDirectory + "/" + ProductName + ".xml"
if not os.path.isfile(productXml):
printLog(log, ">>> Create new product <<<")
subprocess.call([ PatchGen, "createNewProduct", productXml ])
printLog(log, "")
printLog(log, ">>> Rewrite " + ProductName + ".xml <<<") # because we know better.
shutil.move(productXml, productXml + ".old")
oldCfg = open(productXml + ".old", "r")
cfg = open(productXml, "w")
inCategories = 0
for line in oldCfg:
if not inCategories:
if line.strip() == "<_Categories>":
inCategories = 1
cfg.write("\t<_Categories>\n")
for category in InstallClientData:
cfg.write("\t\t<_Category>\n")
cfg.write("\t\t\t<_Name type=\"STRING\" value=\"" + category["Name"] + "\"/>\n")
if category["UnpackTo"] != None:
if category["UnpackTo"] != "":
cfg.write("\t\t\t<_UnpackTo type=\"STRING\" value=\"./" + category["UnpackTo"] + "/\"/>\n")
else:
cfg.write("\t\t\t<_UnpackTo type=\"SINT32\" value=\"./\"/>\n")
cfg.write("\t\t\t<_IsOptional type=\"SINT32\" value=\"" + str(category["IsOptional"]) + "\"/>\n")
cfg.write("\t\t\t<_IsIncremental type=\"SINT32\" value=\"" + str(category["IsIncremental"]) + "\"/>\n")
for package in category["Packages"]:
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</_Category>\n")
cfg.write("\t</_Categories>\n")
else:
cfg.write(line)
else:
if line.strip() == "</_Categories>":
inCategories = 0
oldCfg.close()
cfg.close()
os.remove(productXml + ".old")
printLog(log, "")
printLog(log, ">>> Make bnp <<<")
targetPath = ClientPatchDirectory + "/bnp"
mkPath(log, targetPath)
for category in InstallClientData:
for package in category["Packages"]:
printLog(log, "PACKAGE " + package[0])
sourcePath = InstallDirectory + "/" + package[0]
mkPath(log, sourcePath)
targetBnp = targetPath + "/" + package[0] + ".bnp"
if (len(package[1]) > 0):
targetBnp = targetPath + "/" + package[1][0]
printLog(log, "TARGET " + package[1][0])
needUpdateBnp = 1
if (len(package) > 2):
needUpdateBnp = needUpdate(log, sourcePath + "/" + package[2], targetBnp)
else:
needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp)
if (needUpdateBnp):
printLog(log, "BNP " + targetBnp)
subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1])
else:
printLog(log, "SKIP " + targetBnp)
printLog(log, "")
printLog(log, ">>> Update product <<<")
cwDir = os.getcwd().replace("\\", "/")
toolDir = os.path.dirname(Lzma).replace("\\", "/")
os.chdir(toolDir)
subprocess.call([ PatchGen, "updateProduct", productXml ])
os.chdir(cwDir)
printLog(log, "")
log.close()
if os.path.isfile("6_client_patch.log"):
os.remove("6_client_patch.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_patch.log")
shutil.move("log.log", "6_client_patch.log")

View file

@ -0,0 +1,93 @@
#!/usr/bin/python
#
# \file 7_client_install.py
# \brief Install to client install
# \date 2009-02-18 16:19GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install to client install
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install to client install")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
BnpMake = findTool(log, ToolDirectories, BnpMakeTool, ToolSuffix)
printLog(log, "")
if BnpMake == "":
toolLogFail(log, BnpMakeTool, ToolSuffix)
else:
for category in InstallClientData:
printLog(log, "CATEGORY " + category["Name"])
if (category["UnpackTo"] != None):
targetPath = ClientInstallDirectory
if (category["UnpackTo"] != ""):
targetPath += "/" + category["UnpackTo"]
mkPath(log, targetPath)
for package in category["Packages"]:
printLog(log, "PACKAGE " + package[0])
mkPath(log, InstallDirectory + "/" + package[0])
copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + package[0], targetPath)
else:
targetPath = ClientInstallDirectory + "/data"
mkPath(log, targetPath)
for package in category["Packages"]:
printLog(log, "PACKAGE " + package[0])
sourcePath = InstallDirectory + "/" + package[0]
mkPath(log, sourcePath)
targetBnp = targetPath + "/" + package[0] + ".bnp"
if (len(package[1]) > 0):
targetBnp = targetPath + "/" + package[1][0]
printLog(log, "TARGET " + package[1][0])
needUpdateBnp = 1
if (len(package) > 2):
needUpdateBnp = needUpdate(log, sourcePath + "/" + package[2], targetBnp)
else:
needUpdateBnp = needUpdateDirNoSubdirFile(log, sourcePath, targetBnp)
if (needUpdateBnp):
printLog(log, "BNP " + targetBnp)
subprocess.call([ BnpMake, "/p", sourcePath, targetPath ] + package[1])
else:
printLog(log, "SKIP " + targetBnp)
printLog(log, "")
log.close()
if os.path.isfile("7_client_install.log"):
os.remove("7_client_install.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_install.log")
shutil.move("log.log", "7_client_install.log")

View file

@ -1,65 +0,0 @@
#!/usr/bin/python
#
# \file site.py
# \brief Site configuration
# \date 2010-06-04-21-25-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Site configuration.
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# *** SITE INSTALLATION ***
# Use '/' in path name, not ''
# Don't put '/' at the end of a directory name
# Quality option for this site (1 for BEST, 0 for DRAFT)
BuildQuality = 1
ToolDirectories = ['R:/code/nel', 'R:/code/ryzom/tools']
ToolSuffix = "_r.exe"
# Build script directory
ScriptDirectory = "W:/build_gamedata"
WorkspaceDirectory = "R:/code/ryzom/tools/build_gamedata/workspace"
# Data build directories
DatabaseDirectory = "W:/database"
ExportBuildDirectory = "W:/export"
# Client data install directory (client/data)
ClientDataDirectory = "S:/ryzom_client_open/user"
# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)
# Leveldesign directories
LeveldesignDirectory = "L:/leveldesign"
LeveldesignDfnDirectory = "L:/leveldesign/dfn"
LeveldesignWorldDirectory = "L:/leveldesign/world"
# 3dsMax directives
MaxAvailable = 1
MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010"
MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu"
MaxExecutable = "3dsmax.exe"
# end of file

View file

@ -44,7 +44,7 @@ def needUpdate(log, source, dest):
else:
return 0
return 1
printLog(log, "needUpdate: source doest not exist?! " + source)
printLog(log, "MISSING " + source)
return 0
def needUpdateRemoveDest(log, source, dest):
@ -56,7 +56,7 @@ def needUpdateRemoveDest(log, source, dest):
else:
return 0
return 1
printLog(log, "needUpdate: source doest not exist?! " + source)
printLog(log, "MISSING " + source)
return 0
def needUpdateLogRemoveDest(log, source, dest):
@ -71,25 +71,28 @@ def needUpdateLogRemoveDest(log, source, dest):
return 0
printLog(log, source + " -> " + dest)
return 1
printLog(log, "needUpdate: source doest not exist?! " + source)
printLog(log, "MISSING " + source)
printLog(log, "SKIP " + dest)
return 0
def copyFileList(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn":
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
if (os.path.isfile(dir_source + "/" + fileName)):
if needUpdateLogRemoveDest(log, dir_source + "/" + fileName, dir_target + "/" + fileName):
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
def copyFileListNoTree(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn":
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
if (os.path.isfile(dir_source + "/" + fileName)):
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName))
def copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
if (os.path.isfile(dir_source + "/" + fileName)):
srcFile = dir_source + "/" + fileName
destFile = dir_target + "/" + os.path.basename(fileName)
if needUpdateLogRemoveDest(log, srcFile, destFile):
@ -98,18 +101,30 @@ def copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files):
def removeFilesRecursive(log, dir_files):
files = os.listdir(dir_files)
for fileName in files:
if (fileName != ".svn"):
if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"):
if os.path.isdir(dir_files + "/" + fileName):
removeFilesRecursive(log, dir_files + "/" + fileName)
else:
printLog(log, "RM " + dir_files + "/" + fileName)
os.remove(dir_files + "/" + fileName)
def removeFilesDirsRecursive(log, dir_files):
files = os.listdir(dir_files)
for fileName in files:
if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"):
if os.path.isdir(dir_files + "/" + fileName):
removeFilesRecursive(log, dir_files + "/" + fileName)
else:
printLog(log, "RM " + dir_files + "/" + fileName)
os.remove(dir_files + "/" + fileName)
printLog(log, "RMDIR " + dir_files)
os.rmdir(dir_files)
def removeFilesRecursiveExt(log, dir_files, file_ext):
files = os.listdir(dir_files)
len_file_ext = len(file_ext)
for fileName in files:
if (fileName != ".svn"):
if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"):
if os.path.isdir(dir_files + "/" + fileName):
removeFilesRecursiveExt(log, dir_files + "/" + fileName, file_ext)
elif (fileName[-len_file_ext:].lower() == file_ext.lower()):
@ -120,7 +135,7 @@ def copyFilesRecursive(log, dir_source, dir_target):
files = os.listdir(dir_source)
mkPath(log, dir_target)
for fileName in files:
if (fileName != ".svn"):
if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"):
if os.path.isdir(dir_source + "/" + fileName):
copyFilesRecursive(log, dir_source + "/" + fileName, dir_target + "/" + fileName)
else:
@ -134,7 +149,8 @@ def copyFilesExt(log, dir_source, dir_target, file_ext):
files = os.listdir(dir_source)
len_file_ext = len(file_ext)
for fileName in files:
if (fileName != ".svn") and (fileName[-len_file_ext:].lower() == file_ext.lower()):
if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*") and (fileName[-len_file_ext:].lower() == file_ext.lower()):
if (os.path.isfile(dir_source + "/" + fileName)):
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
@ -143,7 +159,8 @@ def copyFilesRenamePrefixExt(log, dir_source, dir_target, old_prefix, new_prefix
len_file_ext = len(file_ext)
len_prefix = len(old_prefix)
for fileName in files:
if (fileName != ".svn") and (fileName[-len_file_ext:].lower() == file_ext.lower()) and ((fileName[:len_prefix].lower() == old_prefix.lower())):
if (fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*") and (fileName[-len_file_ext:].lower() == file_ext.lower()) and ((fileName[:len_prefix].lower() == old_prefix.lower())):
if (os.path.isfile(dir_source + "/" + fileName)):
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + new_prefix + fileName[-(len(fileName) - len_prefix):])
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + new_prefix + fileName[-(len(fileName) - len_prefix):])
@ -166,9 +183,14 @@ def copyFilesExtNoSubdirIfNeeded(log, dir_source, dir_target, file_ext):
def copyFilesNoTreeIfNeeded(log, dir_source, dir_target):
copyFileListNoTreeIfNeeded(log, dir_source, dir_target, os.listdir(dir_source))
def copyFilesRecursiveNoTreeIfNeeded(log, dir_source, dir_target):
files = findFilesRecursive(log, dir_source, "")
copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files)
def copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext):
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
if (os.path.isfile(dir_source + "/" + fileName)):
srcFile = dir_source + "/" + fileName
destFile = dir_target + "/" + os.path.basename(fileName)[0:-len(file_ext)] + target_ext
if needUpdateLogRemoveDest(log, srcFile, destFile):
@ -184,20 +206,44 @@ def copyFileIfNeeded(log, srcFile, destFile):
def moveFileListNoTree(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn":
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
if (os.path.isfile(dir_source + "/" + fileName)):
printLog(log, "MOVE " + dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
shutil.move(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName))
def moveFilesExtNoTree(log, dir_source, dir_target, file_ext):
files = findFiles(log, dir_source, "", file_ext)
moveFileListNoTree(log, dir_source, dir_target, files)
def moveFilesNoSubdir(log, dir_source, dir_target):
files = os.listdir(dir_source)
moveFileListNoTree(log, dir_source, dir_target, files)
def moveDir(log, dir_source, dir_target):
printLog(log, "MOVE " + dir_source + " -> " + dir_target)
shutil.move(dir_source, dir_target)
def findFilesRecursive(log, dir_where, dir_sub):
result = [ ]
files = os.listdir(dir_where + "/" + dir_sub)
for fileName in files:
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
filePath = dir_sub + fileName
fileFull = dir_where + "/" + dir_sub + fileName
if os.path.isfile(fileFull):
result += [ filePath ]
elif os.path.isdir(fileFull):
result += findFilesRecursive(log, dir_where, filePath + "/")
else:
printLog(log, "findFilesRecursive: file not dir or file?!" + filePath)
return result
def findFiles(log, dir_where, dir_sub, file_ext):
result = [ ]
files = os.listdir(dir_where + "/" + dir_sub)
len_file_ext = len(file_ext)
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
filePath = dir_sub + fileName
fileFull = dir_where + "/" + dir_sub + fileName
if os.path.isfile(fileFull):
@ -209,12 +255,15 @@ def findFiles(log, dir_where, dir_sub, file_ext):
printLog(log, "findFiles: file not dir or file?!" + filePath)
return result
def isLegalFileName(fileName):
return fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*"
def findFilesNoSubdir(log, dir_where, file_ext):
result = [ ]
files = os.listdir(dir_where)
len_file_ext = len(file_ext)
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
fileFull = dir_where + "/" + fileName
if os.path.isfile(fileFull):
if fileName[-len_file_ext:].lower() == file_ext.lower():
@ -226,7 +275,7 @@ def findFilesNoSubdir(log, dir_where, file_ext):
def findFile(log, dir_where, file_name):
files = os.listdir(dir_where)
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
if fileName != ".svn" and fileName != ".." and fileName != "." and fileName != "*.*":
filePath = dir_where + "/" + fileName
if os.path.isfile(filePath):
if fileName == file_name:
@ -264,6 +313,26 @@ def needUpdateDirByTagLog(log, dir_source, ext_source, dir_dest, ext_dest):
printLog(log, "SKIP " + str(skipCount) + " / " + str(len(sourceFiles)) + "; DEST " + str(len(destFiles)))
return 0
def needUpdateDirNoSubdirFile(log, dir_source, file_dest):
if not os.path.isfile(file_dest):
return 1
destTime = os.stat(file_dest).st_mtime
sourceFiles = os.listdir(dir_source)
for file in sourceFiles:
filePath = dir_source + "/" + file
if os.path.isfile(filePath):
fileTime = os.stat(filePath).st_mtime
if fileTime > destTime:
return 1
else:
return 0
def needUpdateMultiDirNoSubdirFile(log, root_dir, dirs_source, file_dest):
for dir_source in dirs_source:
if needUpdateDirNoSubdirFile(log, root_dir + "/" + dir_source, file_dest):
return 1
return 0
def needUpdateDirNoSubdir(log, dir_source, dir_dest):
latestSourceFile = 0
oldestDestFile = 0
@ -329,6 +398,17 @@ def needUpdateDirNoSubdirLogExtMultidir(log, all_dir_base, all_dir_source, dir_s
printLog(log, "SKIP *")
return 0
def findFileMultiDir(log, dirs_where, file_name):
try:
for dir in dirs_where:
file = findFile(log, dir, file_name)
if file != "":
return file
except Exception, e:
printLog(log, "EXCEPTION " + str(e))
printLog(log, "FILE NOT FOUND " + file_name)
return ""
def findTool(log, dirs_where, file_name, suffix):
try:
for dir in dirs_where:

View file

@ -37,7 +37,6 @@ SmallbankBuildTimeout = 60000
FarbankBuildTimeout = 180000
AnimExportTimeout = 1800000
IgExportTimeout = 600000
MapsBuildTimeout = 10000
CmbExportTimeout = 60000
RbankBuildTesselTimeout = 6000000
RbankBuildSmoothTimeout = 6000000
@ -49,6 +48,7 @@ LigoExportTimeout = 3600000
LigoBuildTimeout = 1800000
PacsPrimExportTimeout = 600000
MapsBuildTimeout = 60000 # 1min
MaxShapeExportTimeout = 600000 # 10min
# *** TOOLS CONFIGURATION ***
@ -63,7 +63,6 @@ ZoneWelderTool = "zone_welder"
BuildRbankTool = "build_rbank"
BuildIndoorRbankTool = "build_indoor_rbank"
BuildIgBoxesTool = "build_ig_boxes"
AiBuildWmapTool = "ai_build_wmap"
GetNeighborsTool = "get_neighbors"
ZoneLighterTool = "zone_lighter"
ZoneIgLighterTool = "zone_ig_lighter"
@ -85,3 +84,8 @@ PrimExportTool = "prim_export"
IgElevationTool = "ig_elevation"
IgAddTool = "ig_add"
BuildClodBankTool = "build_clod_bank"
SheetsPackerTool = "sheets_packer"
BnpMakeTool = "bnp_make"
AiBuildWmapTool = "ai_build_wmap"
TgaCutTool = "tga_cut"
PatchGenTool = "patch_gen"

View file

@ -26,7 +26,7 @@
import shutil, subprocess
# subprocess.call([ "python", "0_setup.py" ])
subprocess.call([ "python", "1_export.py" ])
subprocess.call([ "python", "2_build.py" ])
subprocess.call([ "python", "3_install.py" ])

View file

@ -99,6 +99,22 @@ PacsPrimSourceDirectories = [ ]
PacsPrimSourceDirectories += [ DatabaseRootPath + "/decors/vegetations" ]
# *** LOOKUP DIRECTORIES WITHIN THE BUILD PIPELINE *** (TODO: use these instead of search_pathes in properties(_base).cfg)
# Ig lookup directories used by rbank
IgLookupDirectories = [ ]
# Shape lookup directories used by rbank
ShapeLookupDirectories = [ ]
ShapeLookupDirectories += [ EcosystemPath + "/shape_clodtex_build" ]
ShapeLookupDirectories += [ EcosystemPath + "/shape_with_coarse_mesh" ]
# Map lookup directories not yet used
MapLookupDirectories = [ ]
MapLookupDirectories += [ EcosystemPath + "/map_export" ]
MapLookupDirectories += [ EcosystemPath + "/map_uncompressed" ]
# *** EXPORT DIRECTORIES FOR THE BUILD PIPELINE ***
# Map directories
@ -148,6 +164,10 @@ PacsPrimExportDirectory = CommonPath + "/pacs_prim"
# Map directories
MapBuildDirectory = CommonPath + "/map"
MapPanoplyBuildDirectory = CommonPath + "/map_panoply"
MapPanoplyHlsInfoBuildDirectory = CommonPath + "/map_panoply_hls_info"
MapPanoplyHlsBankBuildDirectory = CommonPath + "/map_panoply_hls_bank"
MapPanoplyCacheBuildDirectory = CommonPath + "/map_panoply_cache"
MapTagBuildDirectory = CommonPath + "/map_tag"
# Shape directories
ShapeClodtexBuildDirectory = CommonPath + "/shape_clodtex_build"
@ -171,29 +191,29 @@ RbankOutputBuildDirectory = "_invalid"
# *** INSTALL DIRECTORIES IN THE CLIENT DATA ***
# Map directory
MapClientDirectory = CommonName + "_maps"
BitmapClientDirectory = MapClientDirectory
MapInstallDirectory = CommonName + "_maps"
BitmapInstallDirectory = MapInstallDirectory
# Shape directory
ShapeClientDirectory = CommonName + "_shapes"
ShapeInstallDirectory = CommonName + "_shapes"
# Lightmap directory
LightmapClientDirectory = CommonName + "_lightmaps"
LightmapInstallDirectory = CommonName + "_lightmaps"
# Tile directory
TilesClientDirectory = CommonName + "_tiles"
TilesInstallDirectory = CommonName + "_tiles"
# Displace directory
DisplaceClientDirectory = CommonName + "_displaces"
DisplaceInstallDirectory = CommonName + "_displaces"
# Bank directory
BankClientDirectory = CommonName + "_bank"
BankInstallDirectory = CommonName + "_bank"
# Vegetable set directory
VegetSetClientDirectory = CommonName + "_vegetable_sets"
VegetSetInstallDirectory = CommonName + "_vegetable_sets"
# Vegetable shape directory
VegetClientDirectory = CommonName + "_vegetables"
VegetInstallDirectory = CommonName + "_vegetables"
# PACS primitives directories
PacsPrimClientDirectory = CommonName + "_pacs_prim"
PacsPrimInstallDirectory = CommonName + "_pacs_prim"

View file

@ -110,6 +110,10 @@ LigoExportOnePass = 0
# *** MAPS OPTIONS ***
ReduceBitmapFactor = 0
# list all panoply files
MapPanoplyFileList = None
# name of the .hlsbank to build.
MapHlsBankFileName = None
# *** SHAPE BUILD OPTIONS *

View file

@ -47,7 +47,7 @@ def processLine(line, processName, fileExtension, sourceDirectoriesVariable, exp
newline = newline.replace("%PreGenFileExtension%", fileExtension)
newline = newline.replace("%PreGenSourceDirectoriesVariable%", sourceDirectoriesVariable)
newline = newline.replace("%PreGenExportDirectoryVariable%", exportDirectoryVariable)
newline = newline.replace("%PreGenClientDirectoryVariable%", clientDirectoryVariable)
newline = newline.replace("%PreGenInstallDirectoryVariable%", clientDirectoryVariable)
return newline
def generateSimpleMaxExporterFile(sourceFile, destFile, writeMode, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, clientDirectoryVariable, dateTimeStamp):
@ -88,15 +88,15 @@ def generateSimpleMaxExporter(processName, fileExtension, sourceDirectoriesVaria
generateSimpleMaxExporter("pacs_prim", "pacs_prim", "PacsPrimSourceDirectories", "PacsPrimExportDirectory", "PacsPrimClientDirectory")
generateSimpleMaxExporter("pacs_prim", "pacs_prim", "PacsPrimSourceDirectories", "PacsPrimExportDirectory", "PacsPrimInstallDirectory")
generateSimpleMaxExporter("anim", "anim", "AnimSourceDirectories", "AnimExportDirectory", "AnimClientDirectory")
generateSimpleMaxExporter("anim", "anim", "AnimSourceDirectories", "AnimExportDirectory", "AnimInstallDirectory")
generateSimpleMaxExporter("skel", "skel", "SkelSourceDirectories", "SkelExportDirectory", "SkelClientDirectory")
generateSimpleMaxExporter("skel", "skel", "SkelSourceDirectories", "SkelExportDirectory", "SkelInstallDirectory")
generateSimpleMaxExporter("swt", "swt", "SwtSourceDirectories", "SwtExportDirectory", "SwtClientDirectory")
generateSimpleMaxExporter("swt", "swt", "SwtSourceDirectories", "SwtExportDirectory", "SwtInstallDirectory")
generateSimpleMaxExporter("zone", "zone", "ZoneSourceDirectory", "ZoneExportDirectory", "ZoneClientDirectory")
generateSimpleMaxExporter("zone", "zone", "ZoneSourceDirectory", "ZoneExportDirectory", "ZoneInstallDirectory")

View file

@ -53,7 +53,7 @@ def processLine(line, processName, fileExtension, sourceDirectoriesVariable, exp
newline = newline.replace("%PreGenSourceDirectoriesVariable%", sourceDirectoriesVariable)
newline = newline.replace("%PreGenExportDirectoryVariable%", exportDirectoryVariable)
newline = newline.replace("%PreGenTagExportDirectoryVariable%", tagExportDirectoryVariable)
newline = newline.replace("%PreGenClientDirectoryVariable%", clientDirectoryVariable)
newline = newline.replace("%PreGenInstallDirectoryVariable%", clientDirectoryVariable)
return newline
def generateTaggedMaxExporterFile(sourceFile, destFile, writeMode, processName, fileExtension, sourceDirectoriesVariable, exportDirectoryVariable, tagExportDirectoryVariable, clientDirectoryVariable, dateTimeStamp):
@ -100,13 +100,13 @@ def generateTaggedMaxExporter(processName, fileExtension, sourceDirectoriesVaria
generateTaggedMaxExporter("clodbank", "clod", "ClodSourceDirectories", "ClodExportDirectory", "ClodTagExportDirectory", "ClodClientDirectory")
generateTaggedMaxExporter("clodbank", "clod", "ClodSourceDirectories", "ClodExportDirectory", "ClodTagExportDirectory", "ClodInstallDirectory")
generateTaggedMaxScript("ig", "ig")
generateTaggedMaxExporter("rbank", "cmb", "RBankCmbSourceDirectories", "RBankCmbExportDirectory", "RBankCmbTagExportDirectory", "PacsClientDirectory")
generateTaggedMaxExporter("rbank", "cmb", "RBankCmbSourceDirectories", "RBankCmbExportDirectory", "RBankCmbTagExportDirectory", "PacsInstallDirectory")
generateTaggedMaxExporter("veget", "veget", "VegetSourceDirectories", "VegetExportDirectory", "VegetTagExportDirectory", "VegetClientDirectory")
generateTaggedMaxExporter("veget", "veget", "VegetSourceDirectories", "VegetExportDirectory", "VegetTagExportDirectory", "VegetInstallDirectory")

View file

@ -57,7 +57,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + %PreGenClientDirectoryVariable%)
mkPath(log, InstallDirectory + "/" + %PreGenInstallDirectoryVariable%)
log.close()

View file

@ -46,9 +46,9 @@ printLog(log, "")
printLog(log, ">>> Install %PreGenProcessName% <<<")
exportPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%
mkPath(log, exportPath)
clientPath = ClientDataDirectory + "/" + %PreGenClientDirectoryVariable%
mkPath(log, clientPath)
copyFilesExtNoSubdirIfNeeded(log, exportPath, clientPath, ".%PreGenFileExtension%")
installPath = InstallDirectory + "/" + %PreGenInstallDirectoryVariable%
mkPath(log, installPath)
copyFilesExtNoSubdirIfNeeded(log, exportPath, installPath, ".%PreGenFileExtension%")
printLog(log, "")
log.close()

View file

@ -58,7 +58,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + %PreGenClientDirectoryVariable%)
mkPath(log, InstallDirectory + "/" + %PreGenInstallDirectoryVariable%)
log.close()

View file

@ -46,9 +46,9 @@ printLog(log, "")
printLog(log, ">>> Install %PreGenProcessName% <<<")
exportPath = ExportBuildDirectory + "/" + %PreGenExportDirectoryVariable%
mkPath(log, exportPath)
clientPath = ClientDataDirectory + "/" + %PreGenClientDirectoryVariable%
mkPath(log, clientPath)
copyFilesNoTreeIfNeeded(log, exportPath, clientPath)
installPath = InstallDirectory + "/" + %PreGenInstallDirectoryVariable%
mkPath(log, installPath)
copyFilesNoTreeIfNeeded(log, exportPath, installPath)
printLog(log, "")
log.close()

View file

@ -0,0 +1,31 @@
#!/usr/bin/python
#
# \file export_build_install.py
# \brief Run all processes
# \date 2009-02-18 15:28GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all processes
#
# NeL - MMORPG Framework <http:#dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
#
import shutil, subprocess
subprocess.call([ "python", "3_install.py" ])
subprocess.call([ "python", "5_client_dev.py" ])

View file

@ -0,0 +1,31 @@
#!/usr/bin/python
#
# \file export_build_install.py
# \brief Run all processes
# \date 2009-02-18 15:28GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all processes
#
# NeL - MMORPG Framework <http:#dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
#
import shutil, subprocess
subprocess.call([ "python", "3_install.py" ])
subprocess.call([ "python", "4_data_shard.py" ])

View file

@ -49,7 +49,7 @@ from directories import *
#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
#printLog(log, "")
#for dir in ClientSetupDirectories:
# mkPath(log, ClientDataDirectory + "/" + dir)
# mkPath(log, InstallDirectory + "/" + dir)
#printLog(log, "")
printLog(log, "")

View file

@ -58,7 +58,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
#mkPath(log, ClientDataDirectory + "/" + DummyClientDirectory)
#mkPath(log, InstallDirectory + "/" + DummyInstallDirectory)
log.close()

View file

@ -43,18 +43,18 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
#clientPath = ClientDataDirectory + "/" + DummyClientDirectory
#mkPath(log, clientPath)
#installPath = InstallDirectory + "/" + DummyInstallDirectory
#mkPath(log, installPath)
printLog(log, ">>> Install dummy <<<")
#mkPath(log, ExportBuildDirectory + "/" + DummyExportDirectory)
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyExportDirectory, clientPath, ".dummy")
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyExportDirectory, installPath, ".dummy")
#mkPath(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory)
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, clientPath, ".dummy")
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, clientPath, ".dds")
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, installPath, ".dummy")
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyWithCoarseMeshBuildDirectory, installPath, ".dds")
#mkPath(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory)
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory, clientPath, ".anim")
#copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DummyAnimExportDirectory, installPath, ".anim")
printLog(log, "")
log.close()

View file

@ -0,0 +1,98 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief setup ai_wmap
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup ai_wmap
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup ai_wmap")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildTagDirectory)
# Setup lookup directories
printLog(log, ">>> Setup lookup directories <<<")
for dir in IgLookupDirectories:
mkPath(log, ExportBuildDirectory + "/" + dir)
for dir in PacsPrimLookupDirectories:
mkPath(log, ExportBuildDirectory + "/" + dir)
# Setup client directories
printLog(log, ">>> Setup install directories <<<")
mkPath(log, InstallDirectory + "/" + AiWmapInstallDirectory)
# Setup client directories
printLog(log, ">>> Setup configuration <<<")
mkPath(log, InstallDirectory + "/" + AiWmapInstallDirectory)
mkPath(log, ActiveProjectDirectory + "/generated")
cfg = open(ActiveProjectDirectory + "/generated/ai_build_wmap.cfg", "w")
cfg.write("\n")
cfg.write("// AI BUILD WMAP CONFIGURATION\n")
cfg.write("\n")
cfg.write("Paths = {\n")
for dir in IgLookupDirectories:
cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n")
cfg.write("\t\"" + ExportBuildDirectory + "/" + RbankOutputBuildDirectory + "\", \n")
cfg.write("\t\"" + LeveldesignDirectory + "\", \n")
cfg.write("};\n")
cfg.write("\n")
cfg.write("NoRecursePaths = { };\n")
cfg.write("\n")
cfg.write("PacsPrimPaths = {\n")
for dir in PacsPrimLookupDirectories:
cfg.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n")
cfg.write("};\n")
cfg.write("\n")
cfg.write("OutputPath = \"" + ExportBuildDirectory + "/" + AiWmapBuildDirectory + "\";\n")
cfg.write("\n")
cfg.write("Commands = {\n")
cfg.write("\t\"Verbose " + str(AiWmapVerbose) + "\", \n")
for startPoint in AiWmapStartPoints:
cfg.write("\t\"setStartPoint " + startPoint + "\", \n")
cfg.write("};\n")
cfg.write("\n")
cfg.close()
log.close()
# end of file

View file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export ai_wmap
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export ai_wmap
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export ai_wmap")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,95 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build ai_wmap
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build ai_wmap
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build ai_wmap")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
AiBuildWmap = findTool(log, ToolDirectories, AiBuildWmapTool, ToolSuffix)
TgaCut = findTool(log, ToolDirectories, TgaCutTool, ToolSuffix)
if AiBuildWmap == "":
toolLogFail(log, AiBuildWmapTool, ToolSuffix)
if TgaCut == "":
toolLogFail(log, TgaCutTool, ToolSuffix)
else:
printLog(log, ">>> Copy ai_build_wmap.cfg <<<")
cfgPath = ActiveProjectDirectory + "/generated/ai_build_wmap.cfg"
tagPath = ExportBuildDirectory + "/" + AiWmapBuildTagDirectory + "/ai_wmap_build.tag"
shutil.copy(cfgPath, "ai_build_wmap.cfg")
printLog(log, ">>> Check up packed sheets <<<")
subprocess.call([ AiBuildWmap, "checkPackedSheets" ])
printLog(log, ">>> Build ai_wmap <<<")
mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildTagDirectory)
if (needUpdate(log, "continents.packed_sheets", tagPath) or needUpdateMultiDirNoSubdirFile(log, ExportBuildDirectory, [ RbankOutputBuildDirectory ] + IgLookupDirectories + PacsPrimLookupDirectories, tagPath)):
printLog(log, ">>> Generate wmap <<<")
subprocess.call([ AiBuildWmap, "pacsCrunch " + AiWmapContinentName ])
printLog(log, ">>> Generate sized wmap <<<")
subprocess.call([ AiBuildWmap, "pacsBuildGabarit " + AiWmapContinentName ])
printLog(log, ">>> Generate cwmaps for each size <<<")
subprocess.call([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_0" ])
subprocess.call([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_1" ])
subprocess.call([ AiBuildWmap, "pacsBuildWmap " + AiWmapContinentName + "_2" ])
printLog(log, ">>> Generate bitmap for each size <<<")
subprocess.call([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_0" ])
subprocess.call([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_1" ])
subprocess.call([ AiBuildWmap, "pacsBuildBitmap " + AiWmapContinentName + "_2" ])
printLog(log, ">>> Clear height maps for size 1 and 2 <<<")
subprocess.call([ AiBuildWmap, "pacsClearHeightmap " + AiWmapContinentName ])
printLog(log, ">>> Cut tga for world editor <<<")
subprocess.call([ TgaCut, ExportBuildDirectory + "/" + AiWmapBuildDirectory + "/" + AiWmapContinentName + "_0.tga" ])
moveFilesExtNoTree(log, ".", ExportBuildDirectory + "/" + AiWmapBuildDirectory, ".tga")
printLog(log, ">>> Remove wmap <<<")
removeFilesRecursiveExt(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory, ".wmap")
tagFile = open(tagPath, "w")
tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n")
tagFile.close()
else:
printLog("SKIP *")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,57 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install ai_wmap
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install ai_wmap
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install ai_wmap")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
installPath = InstallDirectory + "/" + AiWmapInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install ai_wmap <<<")
mkPath(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + AiWmapBuildDirectory, installPath)
printLog(log, "")
log.close()
# end of file

View file

@ -58,7 +58,7 @@ mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + AnimClientDirectory)
mkPath(log, InstallDirectory + "/" + AnimInstallDirectory)
log.close()

View file

@ -6,7 +6,7 @@
#
# \file 1_export.py
# \brief Export anim
# \date 2010-09-03-12-46-GMT
# \date 2010-09-19-14-19-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export anim

View file

@ -46,7 +46,7 @@ printLog(log, "")
printLog(log, ">>> Install anim <<<")
srcDir = ExportBuildDirectory + "/" + AnimBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + AnimClientDirectory
destDir = InstallDirectory + "/" + AnimInstallDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)

View file

@ -57,7 +57,7 @@ mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + CeguiImagesetClientDirectory)
mkPath(log, InstallDirectory + "/" + CeguiImagesetInstallDirectory)
log.close()

View file

@ -45,7 +45,7 @@ printLog(log, "")
printLog(log, ">>> Install cegui imagesets <<<")
srcDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + CeguiImagesetClientDirectory
destDir = InstallDirectory + "/" + CeguiImagesetInstallDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)

View file

@ -61,7 +61,7 @@ mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + ShapeClientDirectory)
mkPath(log, InstallDirectory + "/" + ShapeInstallDirectory)
# Setup configuration files
printLog(log, ">>> Setup configuration files <<<")

View file

@ -6,7 +6,7 @@
#
# \file 1_export.py
# \brief Export clodbank
# \date 2010-09-03-12-46-GMT
# \date 2010-09-19-14-19-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export clodbank

View file

@ -46,7 +46,7 @@ printLog(log, "")
printLog(log, ">>> Install clodbank <<<")
srcDir = ExportBuildDirectory + "/" + ClodBankBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + ShapeClientDirectory
destDir = InstallDirectory + "/" + ShapeInstallDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)

View file

@ -0,0 +1,76 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief setup copy
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup copy
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup copy")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for dir in CopyDirectSourceDirectories:
mkPath(log, dir)
for file in CopyDirectSourceFiles:
mkPath(log, os.path.dirname(file))
for dir in CopyLeveldesignSourceDirectories:
mkPath(log, LeveldesignDirectory + "/" + dir)
for file in CopyLeveldesignSourceFiles:
mkPath(log, os.path.dirname(LeveldesignDirectory + "/" + file))
for dir in CopyLeveldesignWorldSourceDirectories:
mkPath(log, LeveldesignWorldDirectory + "/" + dir)
for file in CopyLeveldesignWorldSourceFiles:
mkPath(log, os.path.dirname(LeveldesignWorldDirectory + "/" + file))
for dir in CopyLeveldesignDfnSourceDirectories:
mkPath(log, LeveldesignDfnDirectory + "/" + dir)
for file in CopyLeveldesignDfnSourceFiles:
mkPath(log, os.path.dirname(LeveldesignDfnDirectory + "/" + file))
for dir in CopyDatabaseSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
for file in CopyDatabaseSourceFiles:
mkPath(log, os.path.dirname(DatabaseDirectory + "/" + file))
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, InstallDirectory + "/" + CopyInstallDirectory)
log.close()
# end of file

View file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export copy
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export copy
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export copy")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build copy
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build copy
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build copy")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,85 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install copy
# \date 2010-05-24 13:42GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install copy
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install copy")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
installPath = InstallDirectory + "/" + CopyInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install copy <<<")
for dir in CopyDirectSourceDirectories:
copyFilesRecursiveNoTreeIfNeeded(log, dir, installPath)
for file in CopyDirectSourceFiles:
copyFileIfNeeded(log, file, installPath + "/" + os.path.basename(file))
for dir in CopyLeveldesignSourceDirectories:
copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignDirectory + "/" + dir, installPath)
for file in CopyLeveldesignSourceFiles:
copyFileIfNeeded(log, LeveldesignDirectory + "/" + file, installPath + "/" + os.path.basename(file))
for dir in CopyLeveldesignWorldSourceDirectories:
copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignWorldDirectory + "/" + dir, installPath)
for file in CopyLeveldesignWorldSourceFiles:
copyFileIfNeeded(log, LeveldesignWorldDirectory + "/" + file, installPath + "/" + os.path.basename(file))
for dir in CopyLeveldesignDfnSourceDirectories:
copyFilesRecursiveNoTreeIfNeeded(log, LeveldesignDfnDirectory + "/" + dir, installPath)
for file in CopyLeveldesignDfnSourceFiles:
copyFileIfNeeded(log, LeveldesignDfnDirectory + "/" + file, installPath + "/" + os.path.basename(file))
for dir in CopyDatabaseSourceDirectories:
copyFilesRecursiveNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, installPath)
for file in CopyDatabaseSourceFiles:
copyFileIfNeeded(log, DatabaseDirectory + "/" + file, installPath + "/" + os.path.basename(file))
try:
CopyWindowsExeDllCfgSourceFiles
except NameError:
CopyWindowsExeDllCfgSourceFiles = [ ]
for file in CopyWindowsExeDllCfgSourceFiles:
filePath = findFileMultiDir(log, WindowsExeDllCfgDirectories, file)
if (filePath != ""):
copyFileIfNeeded(log, filePath, installPath + "/" + os.path.basename(file))
printLog(log, "")
log.close()
# end of file

View file

@ -57,7 +57,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + DisplaceClientDirectory)
mkPath(log, InstallDirectory + "/" + DisplaceInstallDirectory)
log.close()

View file

@ -44,11 +44,11 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install displace <<<")
clientPath = ClientDataDirectory + "/" + DisplaceClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + DisplaceInstallDirectory
mkPath(log, installPath)
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, clientPath, ".tga")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, clientPath, ".png")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, installPath, ".tga")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, installPath, ".png")
printLog(log, "")
log.close()

View file

@ -58,7 +58,7 @@ mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + BankClientDirectory)
mkPath(log, InstallDirectory + "/" + BankInstallDirectory)
log.close()

View file

@ -45,8 +45,8 @@ printLog(log, "")
printLog(log, ">>> Install farbank <<<")
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
mkPath(log, ClientDataDirectory + "/" + BankClientDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + FarbankBuildDirectory, ClientDataDirectory + "/" + BankClientDirectory, ".farbank")
mkPath(log, InstallDirectory + "/" + BankInstallDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + FarbankBuildDirectory, InstallDirectory + "/" + BankInstallDirectory, ".farbank")
printLog(log, "")
log.close()

View file

@ -57,7 +57,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + FontClientDirectory)
mkPath(log, InstallDirectory + "/" + FontInstallDirectory)
log.close()

View file

@ -43,16 +43,16 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + FontClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + FontInstallDirectory
mkPath(log, installPath)
fontExportDir = ExportBuildDirectory + "/" + FontExportDirectory
mkPath(log, fontExportDir)
printLog(log, ">>> Install font <<<")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, clientPath, ".ttf")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, clientPath, ".afm")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, clientPath, ".pfb")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, clientPath, ".pfm")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".ttf")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".afm")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".pfb")
copyFilesExtNoTreeIfNeeded(log, fontExportDir, installPath, ".pfm")
printLog(log, "")
log.close()

View file

@ -70,7 +70,7 @@ mkPath(log, ExportBuildDirectory + "/" + IgOtherBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
#mkPath(log, ClientDataDirectory + "/" + IgClientDirectory)
#mkPath(log, InstallDirectory + "/" + IgInstallDirectory)
log.close()

View file

@ -43,7 +43,7 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPathIg = ClientDataDirectory + "/" + IgClientDirectory
clientPathIg = InstallDirectory + "/" + IgInstallDirectory
mkPath(log, clientPathIg)
printLog(log, ">>> Install ig <<<")

View file

@ -56,7 +56,7 @@ mkPath(log, ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + IgClientDirectory)
mkPath(log, InstallDirectory + "/" + IgInstallDirectory)
log.close()

View file

@ -46,7 +46,7 @@ printLog(log, "")
printLog(log, ">>> Install ig_light <<<")
srcDir = ExportBuildDirectory + "/" + IgOtherLightedBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + IgClientDirectory
destDir = InstallDirectory + "/" + IgInstallDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)

View file

@ -69,7 +69,7 @@ mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + InterfaceClientDirectory)
mkPath(log, InstallDirectory + "/" + InterfaceInstallDirectory)
log.close()

View file

@ -56,8 +56,8 @@ for dirs in InterfaceSourceDirectories:
mkPath(log, newpath)
for dir in dirs:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".tga")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".png")
copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".tga")
copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".png")
printLog(log, "")
# For each interface directory to compress in one DXTC
@ -65,8 +65,8 @@ printLog(log, ">>> Export interface dxtc <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory)
for dir in InterfaceDxtcSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".tga")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".png")
copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".tga")
copyFilesExtNoSubdirIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".png")
printLog(log, "")
# For each interface fullscreen directory compress independently all in dds
@ -96,8 +96,7 @@ printLog(log, ">>> Export interface 3d <<<")
mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory)
for dir in Interface3DSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory, ".tga")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory, ".png")
copyFiles(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory)
printLog(log, "")
log.close()

View file

@ -43,24 +43,24 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + InterfaceClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + InterfaceInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install interface <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory, clientPath)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory, installPath)
printLog(log, ">>> Install interface dxtc <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory, clientPath)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory, installPath)
printLog(log, ">>> Install interface fullscreen <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory, clientPath)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory, installPath)
printLog(log, ">>> Install interface 3d <<<")
mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + Interface3DExportDirectory, clientPath)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + Interface3DExportDirectory, installPath)
printLog(log, "")
log.close()

View file

@ -49,6 +49,10 @@ for dir in MapSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
for dir in MapUncompressedSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
if MapHlsBankFileName != None or MapPanoplyFileList != None:
for panoplyCfg in MapPanoplySourceDirectories:
mkPath(log, DatabaseDirectory + "/" + panoplyCfg[2])
mkPath(log, DatabaseDirectory + "/" + panoplyCfg[3])
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
@ -58,11 +62,16 @@ mkPath(log, ExportBuildDirectory + "/" + MapUncompressedExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + MapBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory)
if MapHlsBankFileName != None or MapPanoplyFileList != None:
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + MapClientDirectory)
mkPath(log, InstallDirectory + "/" + MapInstallDirectory)
log.close()

View file

@ -50,10 +50,61 @@ PanoplyMaker = findTool(log, ToolDirectories, PanoplyMakerTool, ToolSuffix)
HlsBankMaker = findTool(log, ToolDirectories, HlsBankMakerTool, ToolSuffix)
printLog(log, "")
printLog(log, ">>> Panoply <<<")
printLog(log, "********************************")
printLog(log, "******** TODO ********")
printLog(log, "********************************")
buildPanoplyTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_panoply.tag"
buildCompressTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_compress.tag"
if MapPanoplyFileList != None:
printLog(log, ">>> Panoply build <<<")
mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory)
directoriesCheck = [ ]
for panoplyCfg in MapPanoplySourceDirectories:
directoriesCheck += [ panoplyCfg[2] ]
directoriesCheck += [ panoplyCfg[3] ]
if (needUpdateMultiDirNoSubdirFile(log, DatabaseDirectory, directoriesCheck, buildPanoplyTagPath)):
mkPath(log, ActiveProjectDirectory + "/generated")
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory)
printLog(log, "")
printLog(log, ">>> Move panoply and hls to cache <<<")
removeFilesDirsRecursive(log, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory)
moveDir(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory)
moveFilesNoSubdir(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory, ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory)
printLog(log, "")
for panoplyCfg in MapPanoplySourceDirectories:
printLog(log, ">>> Panoply " + panoplyCfg[1] + " <<<")
mkPath(log, DatabaseDirectory + "/" + panoplyCfg[2])
mkPath(log, DatabaseDirectory + "/" + panoplyCfg[3])
cfg = open(ActiveProjectDirectory + "/generated/current_panoply.cfg", "w")
cfgCommon = open(ActiveProjectDirectory + "/" + panoplyCfg[0], "r")
cfgRace = open(ActiveProjectDirectory + "/" + panoplyCfg[1], "r")
cfg.write("\n")
cfg.write("// CURRENT PANOPLY CONFIGURATION\n")
cfg.write("\n")
cfg.write("input_path = \"" + DatabaseDirectory + "/" + panoplyCfg[2] + "\";\n")
cfg.write("additionnal_paths = \"" + DatabaseDirectory + "/" + panoplyCfg[3] + "\";\n")
cfg.write("output_path = \"" + ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + "\";\n")
cfg.write("hls_info_path = \"" + ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory + "\";\n")
cfg.write("cache_path = \"" + ExportBuildDirectory + "/" + MapPanoplyCacheBuildDirectory + "\";\n")
cfg.write("\n")
cfg.write("/////////////////////////////////////////////\n")
cfg.write("\n")
for line in cfgCommon:
cfg.write(line)
for line in cfgRace:
cfg.write(line)
cfg.close()
cfgCommon.close()
cfgRace.close()
subprocess.call([ PanoplyMaker, ActiveProjectDirectory + "/generated/current_panoply.cfg" ])
printLog(log, "")
tagFile = open(buildPanoplyTagPath, "w")
tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n")
tagFile.close()
else:
printLog(log, "SKIP *.*")
printLog(log, "")
printLog(log, ">>> Compress TGA and PNG maps to DDS <<<")
if TgaToDds == "":
@ -61,34 +112,55 @@ if TgaToDds == "":
elif ExecTimeout == "":
toolLogFail(log, ExecTimeoutTool, ToolSuffix)
else:
sourcePath = ExportBuildDirectory + "/" + MapExportDirectory
mkPath(log, sourcePath)
destPath = ExportBuildDirectory + "/" + MapBuildDirectory
mkPath(log, destPath)
files = findFilesNoSubdir(log, sourcePath, ".tga")
for file in files:
sourceFile = sourcePath + "/" + file
destFile = destPath + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds"
sourcePaths = [ ExportBuildDirectory + "/" + MapExportDirectory ]
writeTag = 0
if MapPanoplyFileList != None:
if needUpdate(log, buildPanoplyTagPath, buildCompressTagPath):
sourcePaths += [ ExportBuildDirectory + "/" + MapPanoplyBuildDirectory ]
else:
printLog(log, "SKIP " + ExportBuildDirectory + "/" + MapPanoplyBuildDirectory + "/*.*")
for sourcePath in sourcePaths:
mkPath(log, sourcePath)
files = os.listdir(sourcePath)
len_tga_png = len(".tga")
len_dds = len(".dds")
for fileName in files:
if isLegalFileName(fileName):
sourceFile = sourcePath + "/" + fileName
if os.path.isfile(sourceFile):
if (fileName[-len_tga_png:].lower() == ".tga") or (fileName[-len_tga_png:].lower() == ".png"):
destFile = destPath + "/" + os.path.basename(fileName)[0:-len_tga_png] + ".dds"
if needUpdateLogRemoveDest(log, sourceFile, destFile):
subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-m", "-r" + str(ReduceBitmapFactor) ])
files = findFilesNoSubdir(log, sourcePath, ".png")
for file in files:
sourceFile = sourcePath + "/" + file
destFile = destPath + "/" + os.path.basename(file)[0:-len(".png")] + ".dds"
if needUpdateLogRemoveDest(log, sourceFile, destFile):
subprocess.call([ ExecTimeout, str(MapsBuildTimeout), TgaToDds, sourceFile, "-o", destFile, "-m", "-r" + str(ReduceBitmapFactor) ])
copyFilesExtNoSubdirIfNeeded(log, sourcePath, destPath, ".dds")
writeTag = 1
elif fileName[-len_dds:].lower() == ".dds":
copyFileIfNeeded(log, sourceFile, destPath + "/" + os.path.basename(fileName))
writeTag = 1
elif not os.path.isdir(sourceFile):
printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile)
if writeTag:
tagFile = open(buildCompressTagPath, "w")
tagFile.write(time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())) + "\n")
tagFile.close()
printLog(log, "")
printLog(log, ">>> Compress panoply maps to DDS <<<")
printLog(log, "********************************")
printLog(log, "******** TODO ********")
printLog(log, "********************************")
printLog(log, ">>> Build the HLSBank (if hlsInfo present, and if build wanted) <<<")
printLog(log, "********************************")
printLog(log, "******** TODO ********")
printLog(log, "********************************")
if MapHlsBankFileName != None:
printLog(log, ">>> Build the HLSBank <<<")
if HlsBankMaker == "":
toolLogFail(log, HlsBankMakerTool, ToolSuffix)
else:
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory)
hlsBankPath = ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory + "/" + MapHlsBankFileName
if (needUpdate(log, buildPanoplyTagPath, hlsBankPath) or needUpdate(log, buildCompressTagPath, hlsBankPath)):
if os.path.isfile(hlsBankPath):
os.remove(hlsBankPath)
subprocess.call([ HlsBankMaker, ExportBuildDirectory + "/" + MapPanoplyHlsInfoBuildDirectory, hlsBankPath ])
else:
printLog(log,"SKIP " + hlsBankPath)
printLog(log, "")
log.close()

View file

@ -43,32 +43,46 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + MapClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + MapInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install map <<<")
sourcePath = ExportBuildDirectory + "/" + MapBuildDirectory
mkPath(log, sourcePath)
copyFilesExtNoSubdirIfNeeded(log, sourcePath, clientPath, ".dds")
copyFilesExtNoSubdirIfNeeded(log, sourcePath, clientPath, ".png")
copyFilesExtNoSubdirIfNeeded(log, sourcePath, clientPath, ".tga")
sourcePath = ExportBuildDirectory + "/" + MapUncompressedExportDirectory
mkPath(log, sourcePath)
copyFilesExtNoSubdirIfNeeded(log, sourcePath, clientPath, ".dds")
copyFilesExtNoSubdirIfNeeded(log, sourcePath, clientPath, ".png")
copyFilesExtNoSubdirIfNeeded(log, sourcePath, clientPath, ".tga")
sourcePaths = [ ExportBuildDirectory + "/" + MapBuildDirectory ] + [ ExportBuildDirectory + "/" + MapUncompressedExportDirectory ]
for sourcePath in sourcePaths:
mkPath(log, sourcePath)
files = os.listdir(sourcePath)
len_ext = 4
for fileName in files:
if isLegalFileName(fileName):
sourceFile = sourcePath + "/" + fileName
if os.path.isfile(sourceFile):
if (fileName[-len_ext:].lower() == ".tga") or (fileName[-len_ext:].lower() == ".png") or (fileName[-len_ext:].lower() == ".dds"):
copyFileIfNeeded(log, sourceFile, installPath + "/" + os.path.basename(fileName))
elif not os.path.isdir(sourceFile):
printLog(log, "FAIL ?! file not dir or file ?! " + sourceFile)
printLog(log, ">>> Install map panoply <<<")
printLog(log, "********************************")
printLog(log, "******** TODO ********")
printLog(log, "********************************")
mkPath(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory)
copyFilesExtNoSubdirIfNeeded(log, ExportBuildDirectory + "/" + MapPanoplyBuildDirectory, clientPath, ".dds")
if MapPanoplyFileList != None:
printLog(log, ">>> Install panoply file list <<<")
buildPanoplyTagPath = ExportBuildDirectory + "/" + MapTagBuildDirectory + "/build_panoply.tag"
mkPath(log, ExportBuildDirectory + "/" + MapTagBuildDirectory)
if needUpdate(log, buildPanoplyTagPath, installPath + "/" + MapPanoplyFileList):
sourcePath = ExportBuildDirectory + "/" + MapPanoplyBuildDirectory
mkPath(log, sourcePath)
printLog(log, "WRITE " + installPath + "/" + MapPanoplyFileList)
lf = open(installPath + "/" + MapPanoplyFileList, "w")
files = os.listdir(sourcePath)
for file in files:
if isLegalFileName(file):
lf.write(file + "\n")
lf.close()
else:
printLog(log, "SKIP " + installPath + "/" + MapPanoplyBuildDirectory)
printLog(log, ">>> Install map hlsbank <<<")
printLog(log, "********************************")
printLog(log, "******** TODO ********")
printLog(log, "********************************")
if MapHlsBankFileName != None:
printLog(log, ">>> Install map hlsbank <<<")
sourcePath = ExportBuildDirectory + "/" + MapPanoplyHlsBankBuildDirectory
mkPath(log, sourcePath)
copyFilesExtNoSubdirIfNeeded(log, sourcePath, installPath, ".hlsbank")
printLog(log, "")
log.close()

View file

@ -57,7 +57,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + PacsPrimClientDirectory)
mkPath(log, InstallDirectory + "/" + PacsPrimInstallDirectory)
log.close()

View file

@ -6,7 +6,7 @@
#
# \file 1_export.py
# \brief Export pacs_prim
# \date 2010-09-03-12-46-GMT
# \date 2010-09-19-14-19-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export pacs_prim

View file

@ -43,12 +43,12 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + PacsPrimClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + PacsPrimInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install pacs_prim <<<")
mkPath(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory)
copyFilesExtNoSubdirIfNeeded(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory, clientPath, ".pacs_prim")
copyFilesExtNoSubdirIfNeeded(log, ExportBuildDirectory + "/" + PacsPrimExportDirectory, installPath, ".pacs_prim")
printLog(log, "")
log.close()

View file

@ -57,7 +57,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + PsClientDirectory)
mkPath(log, InstallDirectory + "/" + PsInstallDirectory)
log.close()

View file

@ -46,7 +46,7 @@ printLog(log, "")
printLog(log, ">>> Install ps <<<")
srcDir = ExportBuildDirectory + "/" + PsExportDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + PsClientDirectory
destDir = InstallDirectory + "/" + PsInstallDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)

View file

@ -74,7 +74,7 @@ mkPath(log, ExportBuildDirectory + "/" + RbankOutputBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + PacsClientDirectory)
mkPath(log, InstallDirectory + "/" + PacsInstallDirectory)
log.close()

View file

@ -6,7 +6,7 @@
#
# \file 1_export.py
# \brief Export rbank
# \date 2010-09-03-12-46-GMT
# \date 2010-09-19-14-19-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export rbank

View file

@ -44,21 +44,21 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install rbank <<<")
clientPath = ClientDataDirectory + "/" + PacsClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + PacsInstallDirectory
mkPath(log, installPath)
srcPath = ExportBuildDirectory + "/" + RbankOutputBuildDirectory
mkPath(log, srcPath)
copyFilesNoTreeIfNeeded(log, srcPath, clientPath)
#clientPath = ClientDataDirectory + "/" + PacsClientDirectory
#mkPath(log, clientPath)
copyFilesNoTreeIfNeeded(log, srcPath, installPath)
#installPath = InstallDirectory + "/" + PacsInstallDirectory
#mkPath(log, installPath)
#srcPath = ExportBuildDirectory + "/" + RbankRetrieversBuildDirectory
#mkPath(log, srcPath)
#copyFileIfNeeded(log, srcPath + "/tempMerged.rbank", clientPath + "/" + RbankRbankName + ".rbank")
#copyFileIfNeeded(log, srcPath + "/tempMerged.gr", clientPath + "/" + RbankRbankName + ".gr")
#copyFileIfNeeded(log, srcPath + "/tempMerged.rbank", installPath + "/" + RbankRbankName + ".rbank")
#copyFileIfNeeded(log, srcPath + "/tempMerged.gr", installPath + "/" + RbankRbankName + ".gr")
#for file in findFiles(log, srcPath, "", ".lr"):
# copyFileIfNeeded(log, srcPath + "/" + file, clientPath + "/" + file.replace("tempMerged", RbankRbankName))
# copyFileIfNeeded(log, srcPath + "/" + file, installPath + "/" + file.replace("tempMerged", RbankRbankName))
# mkPath(log, ExportBuildDirectory + "/" + rbankBuildDirectory)
# copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + rbankBuildDirectory, clientPath)
# copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + rbankBuildDirectory, installPath)
#copyFileIfNeeded
printLog(log, "")

View file

@ -47,8 +47,11 @@ printLog(log, "")
printLog(log, ">>> Setup source directories <<<")
for dir in ShapeSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
for dir in MapSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
# Setup pipeline lookup directories
printLog(log, ">>> Setup pipeline lookup directories <<<")
for dir in MapLookupDirectories:
mkPath(log, ExportBuildDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
@ -69,8 +72,8 @@ mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + ShapeClientDirectory)
mkPath(log, ClientDataDirectory + "/" + LightmapClientDirectory)
mkPath(log, InstallDirectory + "/" + ShapeInstallDirectory)
mkPath(log, InstallDirectory + "/" + LightmapInstallDirectory)
log.close()

View file

@ -111,8 +111,8 @@ if len(CoarseMeshTextureNames) > 0:
cf.write("search_path = \n")
cf.write("{\n")
cf.write("\t\"" + shapeWithCoarseMesh + "\", \n")
for dir in MapSourceDirectories:
cf.write("\t\"" + DatabaseDirectory + "/" + dir + "\", \n")
for dir in MapLookupDirectories:
cf.write("\t\"" + ExportBuildDirectory + "/" + dir + "\", \n")
cf.write("};\n")
cf.write("\n")
cf.write("list_mesh = \n")

View file

@ -44,24 +44,24 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install shape <<<")
clientPath = ClientDataDirectory + "/" + ShapeClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + ShapeInstallDirectory
mkPath(log, installPath)
mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, clientPath, ".shape")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, installPath, ".shape")
mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, clientPath, ".shape")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, clientPath, ".dds")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds")
mkPath(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory, clientPath, ".anim")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeAnimExportDirectory, installPath, ".anim")
# ls anim | grep ".anim" >> $client_directory/auto_animations_list.txt
printLog(log, ">>> Install shape lightmaps <<<")
clientPath = ClientDataDirectory + "/" + LightmapClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + LightmapInstallDirectory
mkPath(log, installPath)
mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory, clientPath, ".tga")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory, installPath, ".tga")
printLog(log, "")
log.close()

View file

@ -46,18 +46,16 @@ printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignDfnDirectory)
mkPath(log, LeveldesignWorldDirectory)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetIdBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + SheetIdClientDirectory)
log.close()

View file

@ -53,9 +53,8 @@ if MakeSheetId == "":
toolLogFail(log, MakeSheetIdTool, ToolSuffix)
else:
mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignDfnDirectory)
mkPath(log, ExportBuildDirectory + "/" + SheetIdBuildDirectory)
subprocess.call([ MakeSheetId, "-c" + ScriptDirectory + "/configuration/make_sheet_id.cfg", "-o" + ExportBuildDirectory + "/" + SheetIdBuildDirectory + "/" + "sheet_id.bin", LeveldesignDirectory ])
mkPath(log, LeveldesignWorldDirectory)
subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory ])
printLog(log, "")
log.close()

View file

@ -43,13 +43,6 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + SheetIdClientDirectory
mkPath(log, clientPath)
printLog(log, ">>> Install sheet_id <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetIdBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetIdBuildDirectory, clientPath, ".bin")
printLog(log, "")
log.close()

View file

@ -47,18 +47,20 @@ printLog(log, "")
printLog(log, ">>> Setup source directories <<<")
mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignDfnDirectory)
mkPath(log, DataCommonDirectory)
mkPath(log, GamedevDirectory)
mkPath(log, PrimitivesDirectory)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetIdBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + SheetsClientDirectory)
mkPath(log, InstallDirectory + "/" + SheetsInstallDirectory)
log.close()

View file

@ -44,19 +44,39 @@ printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
BuildSheets = findTool(log, ToolDirectories, BuildSheetsTool, ToolSuffix)
SheetsPacker = findTool(log, ToolDirectories, SheetsPackerTool, ToolSuffix)
printLog(log, "")
# For each sheets directory
printLog(log, ">>> Build sheets <<<")
if BuildSheets == "":
toolLogFail(log, BuildSheetsTool, ToolSuffix)
if SheetsPacker == "":
toolLogFail(log, SheetsPackerTool, ToolSuffix)
else:
mkPath(log, LeveldesignDirectory)
mkPath(log, LeveldesignDfnDirectory)
mkPath(log, ExportBuildDirectory + "/" + SheetIdBuildDirectory)
mkPath(log, DataCommonDirectory)
mkPath(log, GamedevDirectory)
mkPath(log, PrimitivesDirectory)
mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory)
subprocess.call([ BuildSheets, LeveldesignDirectory, LeveldesignDfnDirectory, ExportBuildDirectory + "/" + SheetIdBuildDirectory, ExportBuildDirectory + "/" + SheetsBuildDirectory ])
cf = open("sheets_packer.cfg", "w")
cf.write("\n")
cf.write("// SHEETS PACKER CONFIG FILE\n")
cf.write("\n")
cf.write("DataPath = \n")
cf.write("{\n")
cf.write("\t\"" + LeveldesignDirectory + "\", \n")
cf.write("\t\"" + LeveldesignDfnDirectory + "\", \n")
cf.write("\t\"" + DataCommonDirectory + "\", \n")
cf.write("\t\"" + GamedevDirectory + "\", \n")
cf.write("\t\"" + PrimitivesDirectory + "\", \n")
cf.write("};\n")
cf.write("WorldSheet = \"" + WorldSheet + "\";\n")
cf.write("PrimitivesPath = \"" + PrimitivesDirectory + "\";\n")
cf.write("OutputDataPath = \"" + ExportBuildDirectory + "/" + SheetsBuildDirectory + "\";\n")
cf.write("LigoPrimitiveClass = \"" + LigoPrimitiveClass + "\";\n")
cf.write("\n")
cf.close()
subprocess.call([ SheetsPacker ])
printLog(log, "")
log.close()

View file

@ -43,12 +43,12 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + SheetsClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + SheetsInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install sheets <<<")
mkPath(log, ExportBuildDirectory + "/" + SheetsBuildDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, clientPath, ".packed_sheets")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsBuildDirectory, installPath, ".packed_sheets")
printLog(log, "")
log.close()

View file

@ -57,7 +57,7 @@ printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + SkelClientDirectory)
mkPath(log, InstallDirectory + "/" + SkelInstallDirectory)
log.close()

View file

@ -6,7 +6,7 @@
#
# \file 1_export.py
# \brief Export skel
# \date 2010-09-03-12-46-GMT
# \date 2010-09-19-14-19-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export skel

View file

@ -43,12 +43,12 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + SkelClientDirectory
mkPath(log, clientPath)
installPath = InstallDirectory + "/" + SkelInstallDirectory
mkPath(log, installPath)
printLog(log, ">>> Install skel <<<")
mkPath(log, ExportBuildDirectory + "/" + SkelExportDirectory)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SkelExportDirectory, clientPath)
copyFilesNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SkelExportDirectory, installPath)
printLog(log, "")
log.close()

Some files were not shown because too many files have changed in this diff Show more