mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Start CMake-ifying NucleusLib
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
add_subdirectory(pnAddrInfo)
|
||||
add_subdirectory(pnAsyncCore)
|
||||
add_subdirectory(pnAsyncCoreExe)
|
||||
add_subdirectory(pnCrash)
|
||||
add_subdirectory(pnCrashExe)
|
||||
add_subdirectory(pnCsrCli)
|
||||
add_subdirectory(pnCsrNet)
|
||||
add_subdirectory(pnDispatch)
|
||||
add_subdirectory(pnFactory)
|
@ -0,0 +1,14 @@
|
||||
include_directories(../../CoreLib)
|
||||
|
||||
set(pnAddrInfo_SOURCES
|
||||
pnAddrInfo.cpp
|
||||
)
|
||||
|
||||
set(pnAddrInfo_HEADERS
|
||||
pnAddrInfo.h
|
||||
)
|
||||
|
||||
add_library(pnAddrInfo STATIC ${pnAddrInfo_SOURCES} ${pnAddrInfo_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnAddrInfo_SOURCES})
|
||||
source_group("Header Files" FILES ${pnAddrInfo_HEADERS})
|
@ -0,0 +1,22 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
|
||||
set(pnAsyncCore_HEADERS
|
||||
Pch.h
|
||||
)
|
||||
|
||||
set(pnAsyncCore_PRIVATE
|
||||
pnAsyncCore.h
|
||||
Private/pnAcAllIncludes.h
|
||||
Private/pnAcCore.h
|
||||
Private/pnAcIo.h
|
||||
Private/pnAcLog.cpp
|
||||
Private/pnAcLog.h
|
||||
Private/pnAcThread.h
|
||||
Private/pnAcTimer.h
|
||||
)
|
||||
|
||||
add_library(pnAsyncCore STATIC ${pnAsyncCore_PRIVATE} ${pnAsyncCore_HEADERS})
|
||||
|
||||
source_group("Header Files" FILES ${pnAsyncCore_HEADERS})
|
||||
source_group("Private" FILES ${pnAsyncCore_PRIVATE})
|
@ -0,0 +1,64 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
|
||||
set(pnAsyncCoreExe_SOURCES
|
||||
pnAceCore.cpp
|
||||
pnAceIo.cpp
|
||||
pnAceLog.cpp
|
||||
pnAceThread.cpp
|
||||
pnAceTimer.cpp
|
||||
)
|
||||
|
||||
set(pnAsyncCoreExe_HEADERS
|
||||
Pch.h
|
||||
)
|
||||
|
||||
set(pnAysncCoreExe_PRIVATE
|
||||
Private/pnAceInt.h
|
||||
)
|
||||
|
||||
# I would do platform specific stuff here,
|
||||
# but Pch.h just includes everything, so...
|
||||
|
||||
set(pnAysncCoreExe_PRIVATE_NT
|
||||
Private/Nt/pnAceNt.cpp
|
||||
Private/Nt/pnAceNt.h
|
||||
Private/Nt/pnAceNtFile.cpp
|
||||
Private/Nt/pnAceNtInt.h
|
||||
Private/Nt/pnAceNtSocket.cpp
|
||||
Private/Nt/pnAceNtThread.cpp
|
||||
)
|
||||
|
||||
set(pnAsyncCoreExe_PRIVATE_UNIX
|
||||
Private/Unix/pnAceUx.h
|
||||
)
|
||||
|
||||
set(pnAsyncCoreExe_PRIVATE_W9X
|
||||
Private/W9x/pnAceW9x.cpp
|
||||
Private/W9x/pnAceW9x.h
|
||||
Private/W9x/pnAceW9xFile.cpp
|
||||
Private/W9x/pnAceW9xInt.h
|
||||
Private/W9x/pnAceW9xSocket.cpp
|
||||
Private/W9x/pnAceW9xThread.cpp
|
||||
)
|
||||
|
||||
set(pnAsyncCoreExe_PRIVATE_WIN32
|
||||
Private/Win32/pnAceW32Dns.cpp
|
||||
Private/Win32/pnAceW32Thread.cpp
|
||||
)
|
||||
|
||||
# End questionable part
|
||||
|
||||
add_library(pnAsyncCoreExe STATIC
|
||||
${pnAsyncCoreExe_SOURCES} ${pnAsyncCoreExe_HEADERS}
|
||||
${pnAsyncCoreExe_PRIVATE} ${pnAysncCoreExe_PRIVATE_NT}
|
||||
${pnAsyncCoreExe_PRIVATE_UNIX} ${pnAsyncCoreExe_PRIVATE_W9X}
|
||||
${pnAsyncCoreExe_PRIVATE_WIN32})
|
||||
|
||||
source_group("Source Files" FILES ${pnAsyncCoreExe_SOURCES})
|
||||
source_group("Header Files" FILES ${pnAsyncCoreExe_HEADERS})
|
||||
source_group("Private" FILES ${pnAsyncCoreExe_PRIVATE})
|
||||
source_group("Private\\Nt" FILES ${pnAysncCoreExe_PRIVATE_NT})
|
||||
source_group("Private\\Unix" FILES ${pnAsyncCoreExe_PRIVATE_UNIX})
|
||||
source_group("Private\\W9x" FILES ${pnAsyncCoreExe_PRIVATE_W9X})
|
||||
source_group("Private\\Win32" FILES ${pnAsyncCoreExe_PRIVATE_WIN32})
|
@ -0,0 +1,16 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
|
||||
set(pnCrash_SOURCES
|
||||
pnCrash.cpp
|
||||
)
|
||||
|
||||
set(pnCrash_HEADERS
|
||||
Pch.h
|
||||
pnCrash.h
|
||||
)
|
||||
|
||||
add_library(pnCrash STATIC ${pnCrash_SOURCES} ${pnCrash_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnCrash_SOURCES})
|
||||
source_group("Header Files" FILES ${pnCrash_HEADERS})
|
@ -0,0 +1,28 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
|
||||
set(pnCrashExe_SOURCES
|
||||
|
||||
)
|
||||
|
||||
set(pnCrashExe_HEADERS
|
||||
Pch.h
|
||||
)
|
||||
|
||||
if(WIN32 AND NOT CYGWIN)
|
||||
set (pnCrashExe_SOURCES ${pnCrashExe_SOURCES}
|
||||
Win32/pnCreError.cpp
|
||||
Win32/pnCreGui.cpp
|
||||
Win32/pnCreMail.cpp
|
||||
Win32/pnCreTools.cpp
|
||||
)
|
||||
|
||||
set (pnCrashExe_HEADERS ${pnCrashExe_HEADERS}
|
||||
Win32/W32Int.h
|
||||
)
|
||||
endif(WIN32 AND NOT CYGWIN)
|
||||
|
||||
add_library(pnCrashExe STATIC ${pnCrashExe_SOURCES} ${pnCrashExe_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnCrashExe_SOURCES})
|
||||
source_group("Header Files" FILES ${pnCrashExe_HEADERS})
|
@ -157,8 +157,6 @@ static void ReplaceEmailParams (EmailParams * newParams) {
|
||||
|
||||
//============================================================================
|
||||
static EmailParams * GetEmailParamsIncRef () {
|
||||
ref(GetEmailParamsIncRef);
|
||||
|
||||
EmailParams * params;
|
||||
|
||||
SAFE_CRITSECT_ENTER();
|
||||
@ -259,8 +257,6 @@ static unsigned ProcessErrorLog (
|
||||
const char programName[],
|
||||
const char errorType[]
|
||||
) {
|
||||
ref(programName);
|
||||
ref(errorType);
|
||||
|
||||
LogWriteToDisk(log);
|
||||
|
||||
@ -670,8 +666,6 @@ static LONG ProcessException (const char occasion[], EXCEPTION_POINTERS * ep) {
|
||||
|
||||
//============================================================================
|
||||
static LONG WINAPI ExceptionFilter (EXCEPTION_POINTERS * ep) {
|
||||
ref(ExceptionFilter);
|
||||
|
||||
LONG result = ProcessException("Unhandled Exception", ep);
|
||||
|
||||
// If the instruction pointer is inside CrashFunc then this exception
|
||||
@ -783,9 +777,7 @@ static void ProcessDeadlock_CS (const char occasion[], bool crashIt = true) {
|
||||
|
||||
//============================================================================
|
||||
static void DeadlockCheckProc (void *) {
|
||||
ref(DeadlockCheckProc);
|
||||
|
||||
while (s_running) {
|
||||
while (s_running) {
|
||||
Sleep(5 * 1000);
|
||||
|
||||
if (!s_deadlockEnabled)
|
||||
|
@ -0,0 +1,16 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
|
||||
set(pnCsrCli_SOURCES
|
||||
pnCsrCli.cpp
|
||||
)
|
||||
|
||||
set(pnCsrCli_HEADERS
|
||||
Pch.h
|
||||
pnCsrCli.h
|
||||
)
|
||||
|
||||
add_library(pnCsrCli STATIC ${pnCsrCli_SOURCES} ${pnCsrCli_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnCsrCli_SOURCES})
|
||||
source_group("Header Files" FILES ${pnCsrCli_HEADERS})
|
@ -0,0 +1,16 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
|
||||
set(pnCsrNet_SOURCES
|
||||
pnCsrNet.cpp
|
||||
)
|
||||
|
||||
set(pnCsrNet_HEADERS
|
||||
Pch.h
|
||||
pnCsrNet.h
|
||||
)
|
||||
|
||||
add_library(pnCsrNet STATIC ${pnCsrNet_SOURCES} ${pnCsrNet_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnCsrNet_SOURCES})
|
||||
source_group("Header Files" FILES ${pnCsrNet_HEADERS})
|
@ -0,0 +1,19 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
include_directories(../../NucleusLib/inc)
|
||||
|
||||
set(pnDispatch_SOURCES
|
||||
plDispatch.cpp
|
||||
plDispatchLogBase.cpp
|
||||
)
|
||||
|
||||
set(pnDispatch_HEADERS
|
||||
plDispatch.h
|
||||
plDispatchLogBase.h
|
||||
pnDispatchCreatable.h
|
||||
)
|
||||
|
||||
add_library(pnDispatch STATIC ${pnDispatch_SOURCES} ${pnDispatch_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnDispatch_SOURCES})
|
||||
source_group("Header Files" FILES ${pnDispatch_HEADERS})
|
@ -28,15 +28,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsResMgr.h"
|
||||
#include "plDispatch.h"
|
||||
#define PLMESSAGE_PRIVATE
|
||||
#include "../pnMessage/plMessage.h"
|
||||
#include "../pnKeyedObject/hsKeyedObject.h"
|
||||
#include "pnMessage/plMessage.h"
|
||||
#include "pnKeyedObject/hsKeyedObject.h"
|
||||
#include "hsTimer.h"
|
||||
#include "../pnMessage/plTimeMsg.h"
|
||||
#include "../pnKeyedObject/plKey.h"
|
||||
#include "pnMessage/plTimeMsg.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "plDispatchLogBase.h"
|
||||
#include "../pnNetCommon/plNetApp.h"
|
||||
#include "../pnNetCommon/plSynchedObject.h"
|
||||
#include "../pnNetCommon/pnNetCommon.h"
|
||||
#include "pnNetCommon/plNetApp.h"
|
||||
#include "pnNetCommon/plSynchedObject.h"
|
||||
#include "pnNetCommon/pnNetCommon.h"
|
||||
#include "hsThread.h"
|
||||
#include "plProfile.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsStlUtils.h"
|
||||
#include "plgDispatch.h"
|
||||
#include "hsThread.h"
|
||||
#include "../pnKeyedObject/hsKeyedObject.h"
|
||||
#include "pnKeyedObject/hsKeyedObject.h"
|
||||
|
||||
#pragma warning(disable: 4284)
|
||||
|
||||
|
@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef pnDispatchCreatable_inc
|
||||
#define pnDispatchCreatable_inc
|
||||
|
||||
#include "../pnFactory/plCreatable.h"
|
||||
#include "pnFactory/plCreatable.h"
|
||||
|
||||
#include "plDispatch.h"
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
include_directories(../../CoreLib)
|
||||
include_directories(../../NucleusLib)
|
||||
include_directories(../../NucleusLib/inc)
|
||||
|
||||
set(pnFactory_SOURCES
|
||||
plFactory.cpp
|
||||
)
|
||||
|
||||
set(pnFactory_HEADERS
|
||||
plCreatable.h
|
||||
plCreator.h
|
||||
plFactory.h
|
||||
)
|
||||
|
||||
add_library(pnFactory STATIC ${pnFactory_SOURCES} ${pnFactory_HEADERS})
|
||||
|
||||
source_group("Source Files" FILES ${pnFactory_SOURCES})
|
||||
source_group("Header Files" FILES ${pnFactory_HEADERS})
|
@ -33,7 +33,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsUtils.h"
|
||||
|
||||
// For class names
|
||||
#include "../NucleusLib/inc/plCreatableStrings.h"
|
||||
#include "plCreatableStrings.h"
|
||||
|
||||
|
||||
static plFactory* theFactory = nil;
|
||||
|
Reference in New Issue
Block a user