mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 11:49:09 +00:00
Merge pull request #474 from zrax/targets
Build target cleanup for Linux
This commit is contained in:
@ -106,7 +106,16 @@ option(PLASMA_BUILD_RESOURCE_DAT "Do we want to build resource.dat?" ON)
|
||||
option(PLASMA_BUILD_LAUNCHER "Do we want to build plUruLauncher?" ON)
|
||||
option(PLASMA_BUILD_TOOLS "Do we want to build the Plasma tools?" ON)
|
||||
option(PLASMA_BUILD_TESTS "Do we want to build the unit tests?" OFF)
|
||||
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF)
|
||||
if(WIN32)
|
||||
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF)
|
||||
else()
|
||||
set(3dsm_BUILD_PLUGIN OFF)
|
||||
endif()
|
||||
|
||||
if(PLASMA_BUILD_TOOLS)
|
||||
# Custom dummy target for compiling all tools
|
||||
add_custom_target(tools)
|
||||
endif()
|
||||
|
||||
if(3dsm_BUILD_PLUGIN)
|
||||
find_package(MaxSDK REQUIRED)
|
||||
|
@ -1,8 +1,10 @@
|
||||
add_subdirectory(plClient)
|
||||
add_subdirectory(plCrashHandler)
|
||||
if(WIN32)
|
||||
add_subdirectory(plClient)
|
||||
add_subdirectory(plCrashHandler)
|
||||
|
||||
if(PLASMA_BUILD_LAUNCHER)
|
||||
if(PLASMA_BUILD_LAUNCHER)
|
||||
add_subdirectory(plUruLauncher)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PLASMA_BUILD_TOOLS)
|
||||
@ -11,4 +13,12 @@ if(PLASMA_BUILD_TOOLS)
|
||||
add_subdirectory(plFileEncrypt)
|
||||
add_subdirectory(plPageInfo)
|
||||
add_subdirectory(plPageOptimizer)
|
||||
|
||||
add_dependencies(tools
|
||||
plPythonPack
|
||||
plFileSecure
|
||||
plFileEncrypt
|
||||
plPageInfo
|
||||
plPageOptimizer
|
||||
)
|
||||
endif()
|
||||
|
@ -8,7 +8,9 @@ add_subdirectory(pfCharacter)
|
||||
add_subdirectory(pfConditional)
|
||||
add_subdirectory(pfConsole)
|
||||
add_subdirectory(pfConsoleCore)
|
||||
add_subdirectory(pfCrashHandler)
|
||||
if(WIN32)
|
||||
add_subdirectory(pfCrashHandler)
|
||||
endif()
|
||||
add_subdirectory(pfGameGUIMgr)
|
||||
add_subdirectory(pfGameMgr)
|
||||
add_subdirectory(pfGameScoreMgr)
|
||||
@ -18,7 +20,9 @@ add_subdirectory(pfJournalBook)
|
||||
add_subdirectory(pfLocalizationMgr)
|
||||
add_subdirectory(pfMessage)
|
||||
add_subdirectory(pfMoviePlayer)
|
||||
add_subdirectory(pfPasswordStore)
|
||||
if(WIN32 OR APPLE)
|
||||
add_subdirectory(pfPasswordStore)
|
||||
endif()
|
||||
add_subdirectory(pfPatcher)
|
||||
add_subdirectory(pfPython)
|
||||
add_subdirectory(pfSurface)
|
||||
|
@ -2,12 +2,16 @@ add_definitions(-D_LIB)
|
||||
|
||||
add_subdirectory(inc)
|
||||
add_subdirectory(pnAsyncCore)
|
||||
add_subdirectory(pnAsyncCoreExe)
|
||||
if(WIN32)
|
||||
add_subdirectory(pnAsyncCoreExe)
|
||||
endif()
|
||||
add_subdirectory(pnDispatch)
|
||||
add_subdirectory(pnEncryption)
|
||||
add_subdirectory(pnFactory)
|
||||
add_subdirectory(pnGameMgr)
|
||||
add_subdirectory(pnInputCore)
|
||||
if(WIN32)
|
||||
add_subdirectory(pnInputCore)
|
||||
endif()
|
||||
add_subdirectory(pnKeyedObject)
|
||||
add_subdirectory(pnMessage)
|
||||
add_subdirectory(pnModifier)
|
||||
|
@ -678,7 +678,7 @@ static void ClientConnect (NetCli * cli) {
|
||||
memset(&cli->seed, 0, sizeof(cli->seed));
|
||||
unsigned bytes;
|
||||
unsigned char * data = clientSeed.GetData_LE(&bytes);
|
||||
memcpy(cli->seed, data, std::min(bytes, sizeof(cli->seed)));
|
||||
memcpy(cli->seed, data, std::min(size_t(bytes), sizeof(cli->seed)));
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
@ -740,7 +740,7 @@ static bool ServerRecvConnect (
|
||||
memset(&clientSeed, 0, sizeof(clientSeed));
|
||||
unsigned bytes;
|
||||
unsigned char * data = clientSeedValue.GetData_LE(&bytes);
|
||||
memcpy(clientSeed, data, std::min(bytes, sizeof(clientSeed)));
|
||||
memcpy(clientSeed, data, std::min(size_t(bytes), sizeof(clientSeed)));
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
@ -960,7 +960,7 @@ static NetCli * ConnCreate (
|
||||
//===========================================================================
|
||||
static void SetConnSeed (
|
||||
NetCli * cli,
|
||||
unsigned seedBytes,
|
||||
size_t seedBytes,
|
||||
const uint8_t seedData[]
|
||||
) {
|
||||
if (seedBytes)
|
||||
|
@ -72,7 +72,7 @@ const unsigned kNumBlobFields = 4;
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void IReadValue (T * value, uint8_t ** buffer, unsigned * bufsz) {
|
||||
inline void IReadValue (T * value, uint8_t ** buffer, unsigned * bufsz) {
|
||||
ASSERT(*bufsz >= sizeof(T));
|
||||
*value = *(T *)*buffer;
|
||||
*buffer += sizeof(T);
|
||||
@ -81,7 +81,7 @@ static inline void IReadValue (T * value, uint8_t ** buffer, unsigned * bufsz) {
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void IReadArray (T ** buf, unsigned * elems, uint8_t ** buffer, unsigned * bufsz) {
|
||||
inline void IReadArray (T ** buf, unsigned * elems, uint8_t ** buffer, unsigned * bufsz) {
|
||||
uint32_t bytes;
|
||||
IReadValue(&bytes, buffer, bufsz);
|
||||
ASSERT(bytes % sizeof(T) == 0);
|
||||
@ -96,7 +96,7 @@ static inline void IReadArray (T ** buf, unsigned * elems, uint8_t ** buffer, un
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void IReadString (T ** buf, uint8_t ** buffer, unsigned * bufsz) {
|
||||
inline void IReadString (T ** buf, uint8_t ** buffer, unsigned * bufsz) {
|
||||
unsigned elems;
|
||||
IReadArray(buf, &elems, buffer, bufsz);
|
||||
// ensure the string is null-terminated
|
||||
@ -106,14 +106,14 @@ static inline void IReadString (T ** buf, uint8_t ** buffer, unsigned * bufsz) {
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void IWriteValue (const T & value, ARRAY(uint8_t) * buffer) {
|
||||
inline void IWriteValue (const T & value, ARRAY(uint8_t) * buffer) {
|
||||
T * ptr = (T *) buffer->New(sizeof(T));
|
||||
*ptr = value;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void IWriteArray (const T buf[], unsigned elems, ARRAY(uint8_t) * buffer) {
|
||||
inline void IWriteArray (const T buf[], unsigned elems, ARRAY(uint8_t) * buffer) {
|
||||
unsigned bytes = elems * sizeof(T);
|
||||
IWriteValue(bytes, buffer);
|
||||
T * dst = (T *) buffer->New(bytes);
|
||||
@ -122,19 +122,19 @@ static inline void IWriteArray (const T buf[], unsigned elems, ARRAY(uint8_t) *
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void IWriteString (const T str[], ARRAY(uint8_t) * buffer) {
|
||||
inline void IWriteString (const T str[], ARRAY(uint8_t) * buffer) {
|
||||
IWriteArray(str, StrLen(str) + 1, buffer);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline bool ICompareValue (const T & lhs, const T & rhs) {
|
||||
inline bool ICompareValue (const T & lhs, const T & rhs) {
|
||||
return lhs == rhs;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline bool ICompareString (const T lhs[], const T rhs[]) {
|
||||
inline bool ICompareString (const T lhs[], const T rhs[]) {
|
||||
if (!lhs && !rhs)
|
||||
return true;
|
||||
if (!lhs || !rhs)
|
||||
@ -144,7 +144,7 @@ static inline bool ICompareString (const T lhs[], const T rhs[]) {
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline bool ICompareStringI (const T lhs[], const T rhs[]) {
|
||||
inline bool ICompareStringI (const T lhs[], const T rhs[]) {
|
||||
if (!lhs && !rhs)
|
||||
return true;
|
||||
if (!lhs || !rhs)
|
||||
@ -159,13 +159,13 @@ static inline bool ICompareArray (const uint8_t lhs[], const uint8_t rhs[]) {
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void ICopyValue (T * plhs, const T & rhs) {
|
||||
inline void ICopyValue (T * plhs, const T & rhs) {
|
||||
*plhs = rhs;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
template <typename T>
|
||||
static inline void ICopyString (T ** plhs, const T rhs[]) {
|
||||
inline void ICopyString (T ** plhs, const T rhs[]) {
|
||||
free(*plhs);
|
||||
if (rhs)
|
||||
*plhs = StrDup(rhs);
|
||||
@ -351,25 +351,25 @@ void NetVaultNode::Clear()
|
||||
|
||||
//============================================================================
|
||||
template<typename T>
|
||||
static void IZero(T& dest)
|
||||
inline void IZero(T& dest)
|
||||
{
|
||||
dest = 0;
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IZero<plString>(plString& dest)
|
||||
inline void IZero<plString>(plString& dest)
|
||||
{
|
||||
dest = "";
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IZero<plUUID>(plUUID& dest)
|
||||
inline void IZero<plUUID>(plUUID& dest)
|
||||
{
|
||||
dest = kNilUuid;
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IZero<NetVaultNode::Blob>(NetVaultNode::Blob& blob)
|
||||
inline void IZero<NetVaultNode::Blob>(NetVaultNode::Blob& blob)
|
||||
{
|
||||
delete[] blob.buffer;
|
||||
blob.buffer = nullptr;
|
||||
@ -484,7 +484,7 @@ bool NetVaultNode::Matches(const NetVaultNode* rhs) const
|
||||
|
||||
//============================================================================
|
||||
template<typename T>
|
||||
static void IRead(const uint8_t*& buf, T& dest)
|
||||
inline void IRead(const uint8_t*& buf, T& dest)
|
||||
{
|
||||
const T* ptr = reinterpret_cast<const T*>(buf);
|
||||
dest = *ptr;
|
||||
@ -492,7 +492,7 @@ static void IRead(const uint8_t*& buf, T& dest)
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IRead<plString>(const uint8_t*& buf, plString& dest)
|
||||
inline void IRead<plString>(const uint8_t*& buf, plString& dest)
|
||||
{
|
||||
uint32_t size = *(reinterpret_cast<const uint32_t*>(buf));
|
||||
uint32_t nChars = (size / sizeof(uint16_t)) - 1;
|
||||
@ -507,7 +507,7 @@ static void IRead<plString>(const uint8_t*& buf, plString& dest)
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IRead<NetVaultNode::Blob>(const uint8_t*& buf, NetVaultNode::Blob& blob)
|
||||
inline void IRead<NetVaultNode::Blob>(const uint8_t*& buf, NetVaultNode::Blob& blob)
|
||||
{
|
||||
blob.size = *(reinterpret_cast<const uint32_t*>(buf));
|
||||
buf += sizeof(uint32_t);
|
||||
@ -563,14 +563,14 @@ void NetVaultNode::Read(const uint8_t* buf, size_t size)
|
||||
|
||||
//============================================================================
|
||||
template<typename T>
|
||||
static void IWrite(ARRAY(uint8_t)* buffer, const T& value)
|
||||
inline void IWrite(ARRAY(uint8_t)* buffer, const T& value)
|
||||
{
|
||||
uint8_t* ptr = buffer->New(sizeof(T));
|
||||
memcpy(ptr, &value, sizeof(T));
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IWrite<plString>(ARRAY(uint8_t)* buffer, const plString& value)
|
||||
inline void IWrite<plString>(ARRAY(uint8_t)* buffer, const plString& value)
|
||||
{
|
||||
plStringBuffer<uint16_t> utf16 = value.ToUtf16();
|
||||
uint32_t strsz = (utf16.GetSize() + 1) * 2;
|
||||
@ -581,7 +581,7 @@ static void IWrite<plString>(ARRAY(uint8_t)* buffer, const plString& value)
|
||||
}
|
||||
|
||||
template<>
|
||||
static void IWrite<NetVaultNode::Blob>(ARRAY(uint8_t)* buffer, const NetVaultNode::Blob& blob)
|
||||
inline void IWrite<NetVaultNode::Blob>(ARRAY(uint8_t)* buffer, const NetVaultNode::Blob& blob)
|
||||
{
|
||||
IWrite(buffer, static_cast<uint32_t>(blob.size));
|
||||
|
||||
|
@ -15,7 +15,9 @@ add_subdirectory(plDrawable)
|
||||
add_subdirectory(plFile)
|
||||
add_subdirectory(plGImage)
|
||||
add_subdirectory(plGLight)
|
||||
add_subdirectory(plInputCore)
|
||||
if(WIN32)
|
||||
add_subdirectory(plInputCore)
|
||||
endif()
|
||||
add_subdirectory(plInterp)
|
||||
add_subdirectory(plIntersect)
|
||||
add_subdirectory(plMath)
|
||||
@ -30,7 +32,9 @@ add_subdirectory(plNetMessage)
|
||||
add_subdirectory(plNetTransport)
|
||||
add_subdirectory(plParticleSystem)
|
||||
add_subdirectory(plPhysical)
|
||||
add_subdirectory(plPhysX)
|
||||
if(WIN32)
|
||||
add_subdirectory(plPhysX)
|
||||
endif()
|
||||
add_subdirectory(plPipeline)
|
||||
add_subdirectory(plProgressMgr)
|
||||
add_subdirectory(plResMgr)
|
||||
|
@ -5262,7 +5262,7 @@ void NetCliAuthAgeRequest (
|
||||
//============================================================================
|
||||
void NetCliAuthGetEncryptionKey (
|
||||
uint32_t key[],
|
||||
unsigned size
|
||||
size_t size
|
||||
) {
|
||||
unsigned memSize = std::min(arrsize(s_encryptionKey), size);
|
||||
memSize *= sizeof(uint32_t);
|
||||
|
@ -45,11 +45,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "pnFactory/plCreator.h"
|
||||
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
#include <d3d9.h>
|
||||
|
||||
#include "DX/plDXPipeline.h"
|
||||
|
||||
REGISTER_NONCREATABLE( plDXPipeline );
|
||||
#endif
|
||||
|
||||
#include "hsFogControl.h"
|
||||
|
||||
|
@ -2306,7 +2306,7 @@ void plSimpleStateVariable::DumpToObjectDebugger(bool dirtyOnly, int level) cons
|
||||
}
|
||||
|
||||
pad += "\t";
|
||||
for (size_t i=0; i<GetCount(); i++)
|
||||
for (int i=0; i<GetCount(); i++)
|
||||
{
|
||||
logMsg << pad;
|
||||
logMsg << "Var:" << i;
|
||||
@ -2349,7 +2349,7 @@ void plSimpleStateVariable::DumpToStream(hsStream* stream, bool dirtyOnly, int l
|
||||
}
|
||||
|
||||
pad += "\t";
|
||||
for (size_t i=0; i<GetCount(); i++)
|
||||
for (int i=0; i<GetCount(); i++)
|
||||
{
|
||||
logMsg << pad;
|
||||
logMsg << "Var:" << i;
|
||||
|
@ -43,6 +43,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plBufferedSocketWriter.h"
|
||||
#include "plTcpSocket.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
plBufferedSocketWriter::plBufferedSocketWriter(int size, int bytesPerFlush, bool blockOnSend, int flushPoint)
|
||||
: plRingBuffer(size)
|
||||
, fFlushPoint(flushPoint)
|
||||
|
@ -1 +1,3 @@
|
||||
add_subdirectory(pfPythonTest)
|
||||
if(WIN32)
|
||||
add_subdirectory(pfPythonTest)
|
||||
endif()
|
||||
|
@ -4,9 +4,20 @@ if(PLASMA_BUILD_TOOLS)
|
||||
|
||||
add_subdirectory(plLocalizationEditor)
|
||||
add_subdirectory(plResBrowser)
|
||||
|
||||
add_dependencies(tools
|
||||
plLocalizationEditor
|
||||
plResBrowser
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(plShaderAssembler)
|
||||
add_dependencies(tools plShaderAssembler)
|
||||
endif()
|
||||
|
||||
if(FREETYPE_FOUND)
|
||||
add_subdirectory(plFontConverter)
|
||||
add_dependencies(tools plFontConverter)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user