Browse Source

Merge pull request #265 from zrax/product-id

Replace pnProduct with CMake settings
Adam Johnson 12 years ago
parent
commit
56f2ac69c4
  1. 10
      CMakeLists.txt
  2. 1
      Sources/Plasma/Apps/plClient/CMakeLists.txt
  3. 23
      Sources/Plasma/Apps/plClient/winmain.cpp
  4. 2
      Sources/Plasma/Apps/plClientPatcher/Pch.h
  5. 7
      Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp
  6. 1
      Sources/Plasma/Apps/plCrashHandler/CMakeLists.txt
  7. 2
      Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt
  8. 8
      Sources/Plasma/Apps/plFileEncrypt/main.cpp
  9. 2
      Sources/Plasma/Apps/plFileSecure/CMakeLists.txt
  10. 6
      Sources/Plasma/Apps/plFileSecure/main.cpp
  11. 2
      Sources/Plasma/Apps/plMD5/CMakeLists.txt
  12. 2
      Sources/Plasma/Apps/plMD5/Main.cpp
  13. 2
      Sources/Plasma/Apps/plPageInfo/CMakeLists.txt
  14. 6
      Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp
  15. 2
      Sources/Plasma/Apps/plSHA/CMakeLists.txt
  16. 2
      Sources/Plasma/Apps/plSHA/Main.cpp
  17. 2
      Sources/Plasma/Apps/plUruLauncher/CMakeLists.txt
  18. 7
      Sources/Plasma/Apps/plUruLauncher/Main.cpp
  19. 2
      Sources/Plasma/Apps/plUruLauncher/Pch.h
  20. 10
      Sources/Plasma/CoreLib/CMakeLists.txt
  21. 70
      Sources/Plasma/CoreLib/plProduct.cpp
  22. 28
      Sources/Plasma/CoreLib/plProduct.h
  23. 5
      Sources/Plasma/FeatureLib/pfCrashHandler/plCrashSrv.cpp
  24. 2
      Sources/Plasma/FeatureLib/pfGameMgr/Pch.h
  25. 2
      Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.h
  26. 3
      Sources/Plasma/FeatureLib/pfPython/pyAgeInfoStruct.cpp
  27. 1
      Sources/Plasma/NucleusLib/CMakeLists.txt
  28. 2
      Sources/Plasma/NucleusLib/pnAsyncCore/Pch.h
  29. 2
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Pch.h
  30. 2
      Sources/Plasma/NucleusLib/pnGameMgr/Pch.h
  31. 2
      Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.h
  32. 26
      Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt
  33. 53
      Sources/Plasma/NucleusLib/pnProduct/Pch.h
  34. 60
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h
  35. 60
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.h
  36. 87
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp
  37. 70
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h
  38. 67
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.cpp
  39. 61
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.h
  40. 141
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp
  41. 94
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h
  42. 5
      Sources/Plasma/NucleusLib/pnUUID/pnUUID.cpp
  43. 2
      Sources/Plasma/NucleusLib/pnUUID/pnUUID.h
  44. 4
      Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp
  45. 5
      Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp
  46. 4
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp
  47. 6
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp
  48. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Pch.h
  49. 10
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  50. 8
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp
  51. 8
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp
  52. 8
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp
  53. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp
  54. 2
      Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt
  55. 4
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp
  56. 1
      Sources/Tools/MaxMain/CMakeLists.txt
  57. 1
      Sources/Tools/MaxPlasmaLights/CMakeLists.txt
  58. 2
      Sources/Tools/plFontConverter/CMakeLists.txt
  59. 2
      Sources/Tools/plLocalizationEditor/CMakeLists.txt
  60. 2
      Sources/Tools/plResBrowser/CMakeLists.txt

10
CMakeLists.txt

@ -1,6 +1,16 @@
project(Plasma)
cmake_minimum_required(VERSION 2.8)
# Set up Product Identification parameters
set(PRODUCT_BRANCH_ID "1" CACHE STRING "Branch ID")
set(PRODUCT_BUILD_ID "912" CACHE STRING "Build ID")
set(PRODUCT_BUILD_TYPE "50" CACHE STRING "Build Type")
set(PRODUCT_CORE_NAME "UruLive" CACHE STRING "Product Core Name")
set(PRODUCT_SHORT_NAME "UruLive" CACHE STRING "Product Short Name")
set(PRODUCT_LONG_NAME "Uru Live" CACHE STRING "Product Long Name")
set(PRODUCT_UUID "ea489821-6c35-4bd0-9dae-bb17c585e680"
CACHE STRING "Product UUID")
# Detect Clang compiler
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_COMPILER_IS_CLANGXX 1)

1
Sources/Plasma/Apps/plClient/CMakeLists.txt

@ -148,7 +148,6 @@ target_link_libraries(plClient pnNetCli)
target_link_libraries(plClient pnNetCommon)
target_link_libraries(plClient pnNetProtocol)
target_link_libraries(plClient pnNucleusInc)
target_link_libraries(plClient pnProduct)
target_link_libraries(plClient pnSceneObject)
target_link_libraries(plClient pnTimer)
target_link_libraries(plClient pnUtils)

23
Sources/Plasma/Apps/plClient/winmain.cpp

@ -73,7 +73,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnEncryption/plChallengeHash.h"
#include "plStatusLog/plStatusLog.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "plNetGameLib/plNetGameLib.h"
#include "plFile/plFileUtils.h"
@ -623,14 +623,9 @@ BOOL WinInit(HINSTANCE hInst, int nCmdShow)
/// 8.11.2000 - Test for OpenGL fullscreen, and if so use no border, no caption;
/// else, use our normal styles
char windowName[256];
wchar_t productString[256];
StrCopy(productString, ProductLongName(), arrsize(productString));
StrToAnsi(windowName, productString, arrsize(windowName));
// Create a window
HWND hWnd = CreateWindow(
CLASSNAME, windowName,
CLASSNAME, plProduct::LongName().c_str(),
WS_OVERLAPPEDWINDOW,
0, 0,
800 + gWinBorderDX * 2,
@ -1011,11 +1006,8 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
showAuthFailed = true;
}
char windowName[256];
wchar_t productString[256];
ProductString(productString, arrsize(productString));
StrToAnsi(windowName, productString, arrsize(windowName));
SendMessage(GetDlgItem(hwndDlg, IDC_PRODUCTSTRING), WM_SETTEXT, 0, (LPARAM) windowName);
SendMessage(GetDlgItem(hwndDlg, IDC_PRODUCTSTRING), WM_SETTEXT, 0,
(LPARAM)plProduct::ProductString().c_str());
for (int i = 0; i < plLocalization::GetNumLocales(); i++)
{
@ -1417,11 +1409,8 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
hsSetDebugMessageProc(DebugMessageProc);
if (gDebugFile != NULL)
{
char prdName[256];
wchar_t prdString[256];
ProductString(prdString, arrsize(prdString));
StrToAnsi(prdName, prdString, arrsize(prdName));
fprintf(gDebugFile, "%s\n", prdName);
fputs(plProduct::ProductString().c_str(), gDebugFile);
fputs("\n", gDebugFile);
fflush(gDebugFile);
}
}

2
Sources/Plasma/Apps/plClientPatcher/Pch.h

@ -56,7 +56,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtils/pnUtils.h"
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnNetCli/pnNetCli.h"
#include "plNetGameLib/plNetGameLib.h"
#include "pnEncryption/plChecksum.h"

7
Sources/Plasma/Apps/plClientPatcher/UruPlayer.cpp

@ -869,12 +869,7 @@ void InitAsyncCore () {
return;
AsyncCoreInitialize();
wchar_t productString[256];
ProductString(productString, arrsize(productString));
char* log = hsWStringToString(productString);
plStatusLog::AddLineS("patcher.log", log);
delete[] log;
plStatusLog::AddLineS("patcher.log", plProduct::ProductString().c_str());
}
//============================================================================

1
Sources/Plasma/Apps/plCrashHandler/CMakeLists.txt

@ -13,7 +13,6 @@ endif(PLASMA_EXTERNAL_RELEASE)
target_link_libraries(plCrashHandler CoreLib)
target_link_libraries(plCrashHandler pfCrashHandler)
target_link_libraries(plCrashHandler plFile)
target_link_libraries(plCrashHandler pnProduct)
if(USE_VLD)
target_link_libraries(plCrashHandler ${VLD_LIBRARY})

2
Sources/Plasma/Apps/plFileEncrypt/CMakeLists.txt

@ -12,7 +12,7 @@ set(plFileEncrypt_SOURCES
)
add_executable(plFileEncrypt ${plFileEncrypt_SOURCES})
target_link_libraries(plFileEncrypt CoreLib pnProduct plFile)
target_link_libraries(plFileEncrypt CoreLib plFile)
if(USE_VLD)
target_link_libraries(plFileEncrypt ${VLD_LIBRARY})

8
Sources/Plasma/Apps/plFileEncrypt/main.cpp

@ -41,15 +41,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plFile/hsFiles.h"
#include "plFile/plEncryptedStream.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
void EncryptFiles(const char* dir, const char* ext, bool encrypt);
void print_version(){
wchar_t productString[256];
ProductString(productString, arrsize(productString));
printf("%S\n\n", productString);
void print_version() {
printf("%s\n\n", plProduct::ProductString().c_str());
}
void print_help() {

2
Sources/Plasma/Apps/plFileSecure/CMakeLists.txt

@ -12,7 +12,7 @@ set(plFileSecure_SOURCES
)
add_executable(plFileSecure ${plFileSecure_SOURCES})
target_link_libraries(plFileSecure CoreLib pnProduct plFile)
target_link_libraries(plFileSecure CoreLib plFile)
if(USE_VLD)
target_link_libraries(plFileSecure ${VLD_LIBRARY})

6
Sources/Plasma/Apps/plFileSecure/main.cpp

@ -42,16 +42,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plFile/hsFiles.h"
#include "plFile/plFileUtils.h"
#include "plFile/plSecureStream.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include <time.h>
#include <string>
void print_version() {
wchar_t productString[256];
ProductString(productString, arrsize(productString));
printf("%S\n\n", productString);
printf("%s\n\n", plProduct::ProductString().c_str());
}
void print_help() {

2
Sources/Plasma/Apps/plMD5/CMakeLists.txt

@ -13,7 +13,7 @@ set(plMD5_SOURCES
)
add_executable(plMD5 ${plMD5_SOURCES})
target_link_libraries(plMD5 CoreLib pnUtils pnProduct pnEncryption)
target_link_libraries(plMD5 CoreLib pnUtils pnEncryption)
target_link_libraries(plMD5 ${OPENSSL_LIBRARIES})
if(USE_VLD)

2
Sources/Plasma/Apps/plMD5/Main.cpp

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnEncryption/plChecksum.h"
#include <stdio.h>

2
Sources/Plasma/Apps/plPageInfo/CMakeLists.txt

@ -13,7 +13,7 @@ set(plPageInfo_SOURCES
)
add_executable(plPageInfo ${plPageInfo_SOURCES})
target_link_libraries(plPageInfo CoreLib pnProduct plResMgr plAudioCore)
target_link_libraries(plPageInfo CoreLib plResMgr plAudioCore pnUUID)
if(USE_VLD)
target_link_libraries(plPageInfo ${VLD_LIBRARY})

6
Sources/Plasma/Apps/plPageInfo/plPageInfo.cpp

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAudioCore/plSoundBuffer.h"
#include "hsStream.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
//// Globals /////////////////////////////////////////////////////////////////
@ -67,9 +67,7 @@ bool DumpSounds();
//// PrintVersion ///////////////////////////////////////////////////////////////
void PrintVersion()
{
wchar_t productString[256];
ProductString(productString, arrsize(productString));
printf("%S\n\n", productString);
printf("%s\n\n", plProduct::ProductString().c_str());
}
//// PrintHelp ///////////////////////////////////////////////////////////////

2
Sources/Plasma/Apps/plSHA/CMakeLists.txt

@ -13,7 +13,7 @@ set(plSHA_SOURCES
)
add_executable(plSHA ${plSHA_SOURCES})
target_link_libraries(plSHA CoreLib pnUtils pnProduct pnEncryption)
target_link_libraries(plSHA CoreLib pnUtils pnEncryption)
target_link_libraries(plSHA ${OPENSSL_LIBRARIES})
if(USE_VLD)

2
Sources/Plasma/Apps/plSHA/Main.cpp

@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnEncryption/plChecksum.h"
#include <stdio.h>

2
Sources/Plasma/Apps/plUruLauncher/CMakeLists.txt

@ -52,9 +52,9 @@ target_link_libraries(plUruLauncher pnNetBase)
target_link_libraries(plUruLauncher pnNetCli)
target_link_libraries(plUruLauncher pnNetCommon)
target_link_libraries(plUruLauncher pnNetProtocol)
target_link_libraries(plUruLauncher pnProduct)
target_link_libraries(plUruLauncher pnTimer)
target_link_libraries(plUruLauncher pnUtils)
target_link_libraries(plUruLauncher pnUUID)
target_link_libraries(plUruLauncher ${DirectX_LIBRARIES})
target_link_libraries(plUruLauncher ${OPENSSL_LIBRARIES})

7
Sources/Plasma/Apps/plUruLauncher/Main.cpp

@ -450,11 +450,8 @@ static void WindowThreadProc(void *) {
::SetDlgItemText( s_dialog, IDC_TEXT, "Initializing patcher...");
SetTimer(s_dialog, kEventTimer, 250, 0);
char productString[256];
wchar_t productStringW[256];
ProductString(productStringW, arrsize(productStringW));
StrToAnsi(productString, productStringW, arrsize(productString));
SendMessage(GetDlgItem(s_dialog, IDC_PRODUCTSTRING), WM_SETTEXT, 0, (LPARAM) productString);
SendMessage(GetDlgItem(s_dialog, IDC_PRODUCTSTRING), WM_SETTEXT, 0,
(LPARAM)plProduct::ProductString().c_str());
s_dialogCreateEvent.Signal();

2
Sources/Plasma/Apps/plUruLauncher/Pch.h

@ -59,7 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtils/pnUtils.h"
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnNetCli/pnNetCli.h"
#include "plNetGameLib/plNetGameLib.h"
#include "pnEncryption/plChecksum.h"

10
Sources/Plasma/CoreLib/CMakeLists.txt

@ -1,5 +1,13 @@
add_definitions(-D_LIB)
add_definitions(-DPRODUCT_BRANCH_ID=${PRODUCT_BRANCH_ID})
add_definitions(-DPRODUCT_BUILD_ID=${PRODUCT_BUILD_ID})
add_definitions(-DPRODUCT_BUILD_TYPE=${PRODUCT_BUILD_TYPE})
add_definitions(-DPRODUCT_CORE_NAME="${PRODUCT_CORE_NAME}")
add_definitions(-DPRODUCT_SHORT_NAME="${PRODUCT_SHORT_NAME}")
add_definitions(-DPRODUCT_LONG_NAME="${PRODUCT_LONG_NAME}")
add_definitions(-DPRODUCT_UUID="${PRODUCT_UUID}")
if(NOT WCHAR_BYTES)
include(CheckTypeSize)
@ -35,6 +43,7 @@ set(CoreLib_SOURCES
pcSmallRect.cpp
plGeneric.cpp
plLoadMask.cpp
plProduct.cpp
plString.cpp
plViewTransform.cpp
)
@ -78,6 +87,7 @@ set(CoreLib_HEADERS
pcSmallRect.h
plGeneric.h
plLoadMask.h
plProduct.h
plQuality.h
plString.h
plTweak.h

70
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.cpp → Sources/Plasma/CoreLib/plProduct.cpp

@ -39,45 +39,55 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
#include "plProduct.h"
#include "plString.h"
static_assert(PRODUCT_BUILD_ID > 0, "Build ID cannot be zero");
static_assert(PRODUCT_BUILD_TYPE > 0, "Build Type cannot be zero");
static_assert(PRODUCT_BRANCH_ID > 0, "Branch ID cannot be zero");
/*****************************************************************************
*
* Private definitions
*
***/
uint32_t plProduct::BuildId() { return PRODUCT_BUILD_ID; }
uint32_t plProduct::BuildType() { return PRODUCT_BUILD_TYPE; }
uint32_t plProduct::BranchId() { return PRODUCT_BRANCH_ID; }
#ifndef PATCHER
plString plProduct::CoreName()
{
static plString _coreName = PRODUCT_CORE_NAME;
return _coreName;
}
// This value is manually changed upon each branch so that client applications
// built from this branch may not connect to servers built from another.
#define BRANCH_ID 1
static_assert(BRANCH_ID != 0, "BranchID cannot be 0");
plString plProduct::ShortName()
{
static plString _shortName = PRODUCT_SHORT_NAME;
return _shortName;
}
#else
plString plProduct::LongName()
{
static plString _longName = PRODUCT_LONG_NAME;
return _longName;
}
// Patcher branchId may never change, otherwise its CRC would differ from
// branch to branch, causing unnecessary self-patching to occur.
#define BRANCH_ID 0
const char *plProduct::UUID() { return PRODUCT_UUID; }
#endif
#ifdef PLASMA_EXTERNAL_RELEASE
# define RELEASE_ACCESS "External"
#else
# define RELEASE_ACCESS "Internal"
#endif
/*****************************************************************************
*
* Exports
*
***/
#ifdef HS_DEBUGGING
# define RELEASE_TYPE "Debug"
#else
# define RELEASE_TYPE "Release"
#endif
//============================================================================
unsigned BranchId () {
return BRANCH_ID;
plString plProduct::ProductString()
{
static plString _cache = plString::Format(
"%s.%u.%u - " RELEASE_ACCESS "." RELEASE_TYPE,
CoreName().c_str(), BranchId(), BuildId());
return _cache;
}

28
Sources/Plasma/NucleusLib/pnProduct/pnProduct.h → Sources/Plasma/CoreLib/plProduct.h

@ -39,17 +39,27 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/pnProduct.h
*
***/
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PNPRODUCT_H
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PNPRODUCT_H
#include <stdint.h>
class plString;
#include "Private/pnPrAllIncludes.h"
// Note: These are all implemented in plProduct.cpp, so that only CoreLib
// has to get the product product ID compiler flags passed in.
namespace plProduct
{
uint32_t BuildId();
uint32_t BuildType();
uint32_t BranchId();
plString CoreName();
plString ShortName();
plString LongName();
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PNPRODUCT_H
const char *UUID();
/** Returns: "<ProductCoreName>.<BranchId>.<BuildId> - <External|Internal>.<Debug|Release>"
* Example: "Uru.3.204 - External.Release"
*/
plString ProductString();
}

5
Sources/Plasma/FeatureLib/pfCrashHandler/plCrashSrv.cpp

@ -43,7 +43,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plCrashSrv.h"
#include "plCrash_Private.h"
#include "plFile/plFileUtils.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "plString.h"
#ifdef HS_BUILD_FOR_WIN32
@ -80,7 +81,7 @@ void plCrashSrv::IHandleCrash()
// Begin Hackiness
wchar_t dumpPath[1024];
SHGetSpecialFolderPathW(NULL, dumpPath, CSIDL_LOCAL_APPDATA, TRUE);
plFileUtils::ConcatFileName(dumpPath, ProductLongName());
plFileUtils::ConcatFileName(dumpPath, plProduct::LongName().ToWchar());
plFileUtils::ConcatFileName(dumpPath, L"Log");
plFileUtils::EnsureFilePathExists(dumpPath);
plFileUtils::ConcatFileName(dumpPath, L"crash.dmp");

2
Sources/Plasma/FeatureLib/pfGameMgr/Pch.h

@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnNetCli/pnNetCli.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnGameMgr/pnGameMgr.h"
#include "plNetGameLib/plNetGameLib.h"

2
Sources/Plasma/FeatureLib/pfGameMgr/pfGameMgr.h

@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnNetCli/pnNetCli.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "plNetGameLib/plNetGameLib.h"
#pragma warning(push, 0)

3
Sources/Plasma/FeatureLib/pfPython/pyAgeInfoStruct.cpp

@ -135,7 +135,6 @@ void pyAgeInfoStruct::SetAgeInstanceGuid( const char * guid )
std::string curInst = fAgeInfo.GetAgeInstanceName();
std::string y = curInst + guid;
plUUID instanceGuid;
plMD5Checksum hash;
hash.Start();
hash.AddTo(y.length(), (uint8_t*)y.c_str());
@ -150,7 +149,7 @@ void pyAgeInfoStruct::SetAgeInstanceGuid( const char * guid )
if (i == 3 || i == 5 || i == 7 || i == 9)
ss << '-';
}
instanceGuid.FromString(ss.GetString());
plUUID instanceGuid(ss.GetString());
fAgeInfo.SetAgeInstanceGuid(&instanceGuid);
}
else {

1
Sources/Plasma/NucleusLib/CMakeLists.txt

@ -15,7 +15,6 @@ add_subdirectory(pnNetBase)
add_subdirectory(pnNetCli)
add_subdirectory(pnNetCommon)
add_subdirectory(pnNetProtocol)
add_subdirectory(pnProduct)
add_subdirectory(pnSceneObject)
add_subdirectory(pnTimer)
add_subdirectory(pnUtils)

2
Sources/Plasma/NucleusLib/pnAsyncCore/Pch.h

@ -52,6 +52,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtils/pnUtils.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnNetBase/pnNetBase.h"
#include "Private/pnAcAllIncludes.h"

2
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Pch.h

@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNASYNCCOREEXE_PCH_H
#include "pnUtils/pnUtils.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "hsThread.h"

2
Sources/Plasma/NucleusLib/pnGameMgr/Pch.h

@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtils/pnUtils.h"
#include "pnNetBase/pnNetBase.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnUUID/pnUUID.h"
#include "pnGameMgr.h"

2
Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.h

@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnNetCli/pnNetCli.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnKeyedObject/plKey.h"
#include "hsGeometry3.h"

26
Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt

@ -1,26 +0,0 @@
include_directories("../../CoreLib")
include_directories("../../NucleusLib")
set(pnProduct_HEADERS
Pch.h
pnProduct.h
)
set(pnProduct_PRIVATE
Private/pnPrAllIncludes.h
Private/pnPrBranchId.h
Private/pnPrBranchId.cpp
Private/pnPrBuildId.h
Private/pnPrBuildId.cpp
Private/pnPrBuildString.h
Private/pnPrBuildString.cpp
Private/pnPrProductId.h
Private/pnPrProductId.cpp
)
add_library(pnProduct STATIC ${pnProduct_HEADERS} ${pnProduct_PRIVATE})
target_link_libraries(pnProduct CoreLib pnUUID)
source_group("Header Files" FILES ${pnProduct_HEADERS})
source_group("Private" FILES ${pnProduct_PRIVATE})

53
Sources/Plasma/NucleusLib/pnProduct/Pch.h

@ -1,53 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Pch.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PCH_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Pch.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PCH_H
#include "Private/pnPrAllIncludes.h"

60
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h

@ -1,60 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h
*
***/
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H
//#include "pnUtils/pnUtils.h"
#include "pnUUID/pnUUID.h"
#include "pnPrBuildId.h"
#include "pnPrBranchId.h"
#include "pnPrProductId.h"
#include "pnPrBuildString.h"
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H

60
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.h

@ -1,60 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBRANCHID_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBRANCHID_H
/*****************************************************************************
*
* BranchId functions
*
***/
unsigned BranchId ();

87
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp

@ -1,87 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Private definitions
*
***/
// This line must NEVER be modified manually; it is automatically updated
// by the build server.
#define BUILD_ID 912
static_assert(BUILD_ID != 0, "BuildID cannot be 0");
/*****************************************************************************
*
* Private data
*
***/
static unsigned s_buildIdOverride;
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
unsigned BuildId () {
return s_buildIdOverride ? s_buildIdOverride : BUILD_ID;
}
//============================================================================
void OverrideBuildId (unsigned buildId) {
s_buildIdOverride = buildId;
}

70
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h

@ -1,70 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDID_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDID_H
/*****************************************************************************
*
* BuildId functions
*
***/
unsigned BuildId ();
void OverrideBuildId (unsigned buildId);
/*****************************************************************************
*
* BuildType definition
*
***/
#define BUILD_TYPE_LIVE 50

67
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.cpp

@ -1,67 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
const wchar_t * ProductBuildString () {
// This string is replaced by plMarkBuild.exe with the following string:
// "date:YYMMDD time:HHMMSS user:%USERNAME%"
static const wchar_t PRODUCT_BUILD_STRING[64] = {
L"PRODUCT_BUILD_STRING "
};
return PRODUCT_BUILD_STRING;
}

61
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.h

@ -1,61 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDSTRING_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDSTRING_H
/*****************************************************************************
*
* BuildString functions
*
***/
const wchar_t * ProductBuildString ();

141
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp

@ -1,141 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp
*
***/
#include "../Pch.h"
#include <wchar.h>
#pragma hdrstop
/*****************************************************************************
*
* Private data
*
***/
namespace Product {
namespace Uru {
static const wchar_t kCoreName[] = L"UruLive";
static const wchar_t kShortName[] = L"UruLive";
static const wchar_t kLongName[] = L"Uru Live";
static const plUUID kId("ea489821-6c35-4bd0-9dae-bb17c585e680");
}
// @@@: add your product namespace here
}
/*****************************************************************************
*
* Private definitions
*
***/
#if BUILD_PRODUCT_ID == BUILD_PRODUCT_ID_URU
#define PRODUCT_CORE_NAME Product::Uru::kCoreName
#define PRODUCT_SHORT_NAME Product::Uru::kShortName
#define PRODUCT_LONG_NAME Product::Uru::kLongName
#define PRODUCT_ID Product::Uru::kId
#else
#error "No product id defined"
#endif
/*****************************************************************************
*
* Exported functions
*
***/
//============================================================================
const plUUID& ProductId () {
return PRODUCT_ID;
}
//============================================================================
const wchar_t * ProductCoreName () {
return PRODUCT_CORE_NAME;
}
//============================================================================
const wchar_t * ProductShortName () {
return PRODUCT_SHORT_NAME;
}
//============================================================================
const wchar_t * ProductLongName () {
return PRODUCT_LONG_NAME;
}
//============================================================================
void ProductString (wchar_t * dest, unsigned destChars) {
// Example: "UruLive.2.214 - External.Release"
hsSnwprintf(
dest,
destChars,
L"%s.%u.%u - %s.%s",
ProductCoreName(),
BranchId(),
BuildId(),
#ifdef PLASMA_EXTERNAL_RELEASE
L"External",
#else
L"Internal",
#endif
#ifdef HS_DEBUGGING
L"Debug"
#else
L"Release"
#endif
);
}

94
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h

@ -1,94 +0,0 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRPRODUCTID_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRPRODUCTID_H
/*****************************************************************************
*
* Global data
*
***/
//============================================================================
// Build productIds
//
// These values must never be stored on disk or sent over the network,
// use the value returned from ProductId() for that purpose.
//============================================================================
#define BUILD_PRODUCT_ID_URU 1
// @@@ Add your build product id above this line
//============================================================================
// Default to Uru for lack of a better idea
//============================================================================
#ifndef BUILD_PRODUCT_ID
# define BUILD_PRODUCT_ID BUILD_PRODUCT_ID_URU
#endif
/*****************************************************************************
*
* Product functions
*
***/
const plUUID& ProductId ();
const wchar_t * ProductCoreName (); // e.g: L"Uru"
const wchar_t * ProductShortName (); // e.g: L"Uru" (filename/registry friendly)
const wchar_t * ProductLongName (); // e.g: L"Uru: Ages Beyond Myst" (human friendly)
// Returns: "<ProductCoreName>.<BranchId>.<BuildId> - <External|Internal>.<Debug|Release>"
// Example: "Uru.3.204 - External.Release"
void ProductString (wchar_t * dest, unsigned destChars);

5
Sources/Plasma/NucleusLib/pnUUID/pnUUID.cpp

@ -51,6 +51,11 @@ plUUID::plUUID()
Clear();
}
plUUID::plUUID(const char* s)
{
FromString(s);
}
plUUID::plUUID(const plString& s)
{
FromString(s.c_str());

2
Sources/Plasma/NucleusLib/pnUUID/pnUUID.h

@ -62,6 +62,7 @@ public:
};
plUUID();
plUUID(const char* s);
plUUID(const plString& s);
plUUID(const plUUID& other);
@ -73,7 +74,6 @@ public:
int CompareTo(const plUUID* v) const;
bool IsEqualTo(const plUUID* v) const;
bool FromString(const char* str);
bool FromString(const plString& str) { return FromString(str.c_str()); }
bool ToString(plString& out) const;
plString AsString() const;
void Read(hsStream* s);

4
Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp

@ -46,7 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
***/
#include "../pnUtils.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
/*****************************************************************************
@ -361,7 +361,7 @@ void PathGetUserDirectory (
StrCopy(temp, L"C:\\", arrsize(temp));
// append the product name
PathAddFilename(dst, temp, ProductLongName(), dstChars);
PathAddFilename(dst, temp, plProduct::LongName().ToWchar(), dstChars);
// ensure it exists
if (!PathDoesDirectoryExist(dst))

5
Sources/Plasma/PubUtilLib/plAgeLoader/plAgeLoader.cpp

@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# include <unistd.h>
#endif
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnKeyedObject/plKey.h"
#include "pnKeyedObject/plFixedKey.h"
@ -212,7 +212,8 @@ bool plAgeLoader::ILoadAge(const char ageName[])
nc->DebugMsg( "Net: Loading age %s", fAgeName);
if ((fFlags & kLoadMask) != 0)
ErrorAssert(__LINE__, __FILE__, "Fatal Error:\nAlready loading or unloading an age.\n%S will now exit.", ProductShortName());
ErrorAssert(__LINE__, __FILE__, "Fatal Error:\nAlready loading or unloading an age.\n%s will now exit.",
plProduct::ShortName().c_str());
fFlags |= kLoadingAge;

4
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp

@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetObjectDebugger.h"
#include "pnUtils/pnUtils.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnNetCommon/plSynchedObject.h"
#include "pnNetCommon/plNetServers.h"
#include "pnNetCommon/plSDLTypes.h"
@ -1330,7 +1330,7 @@ void plNetClientMgr::IDisableNet () {
{
// KI may not be loaded
char title[256];
StrPrintf(title, arrsize(title), "%S Error", ProductCoreName());
snprintf(title, arrsize(title), "%s Error", plProduct::CoreName().c_str());
hsMessageBox(fDisableMsg->str, title, hsMessageBoxNormal, hsMessageBoxIconError );
plClientMsg *quitMsg = new plClientMsg(plClientMsg::kQuit);
quitMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY));

6
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

@ -48,7 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plNetClientComm.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnNetCli/pnNetCli.h"
#include "plNetGameLib/plNetGameLib.h"
#include "pnEncryption/plChallengeHash.h"
@ -747,9 +747,7 @@ void NetCommStartup () {
s_shutdown = false;
AsyncCoreInitialize();
wchar_t productString[256];
ProductString(productString, arrsize(productString));
LogMsg(kLogPerf, L"Client: %s", productString);
LogMsg(kLogPerf, "Client: %s", plProduct::ProductString().c_str());
NetClientInitialize();
NetClientSetErrorHandler(IPreInitNetErrorCallback);

2
Sources/Plasma/PubUtilLib/plNetGameLib/Pch.h

@ -55,7 +55,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnNetBase/pnNetBase.h"
#include "pnAsyncCore/pnAsyncCore.h"
#include "pnNetCli/pnNetCli.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "hsThread.h"
#define USES_PROTOCOL_CLI2AUTH

10
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -1320,7 +1320,7 @@ static void UnlinkAndAbandonConn_CS (CliAuConn * conn) {
static void SendClientRegisterRequest (CliAuConn * conn) {
const uintptr_t msg[] = {
kCli2Auth_ClientRegisterRequest,
BuildId(),
plProduct::BuildId(),
};
conn->Send(msg, arrsize(msg));
@ -1508,10 +1508,10 @@ static void Connect (
Cli2Auth_Connect connect;
connect.hdr.connType = kConnTypeCliToAuth;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.hdr.buildId = plProduct::BuildId();
connect.hdr.buildType = plProduct::BuildType();
connect.hdr.branchId = plProduct::BranchId();
connect.hdr.productId = plProduct::UUID();
connect.data.token = conn->token;
connect.data.dataBytes = sizeof(connect.data);

8
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp

@ -518,9 +518,9 @@ static void Connect (CliFileConn * conn) {
connect.hdr.connType = kConnTypeCliToFile;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = kFileSrvBuildId;
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.hdr.buildType = plProduct::BuildType();
connect.hdr.branchId = plProduct::BranchId();
connect.hdr.productId = plProduct::UUID();
connect.data.buildId = conn->buildId;
connect.data.serverType = conn->serverType;
connect.data.dataBytes = sizeof(connect.data);
@ -1347,7 +1347,7 @@ void NetCliFileStartConnect (
// TEMP: Only connect to one file server until we fill out this module
// to choose the "best" file connection.
fileAddrCount = min(fileAddrCount, 1);
s_connectBuildId = isPatcher ? kFileSrvBuildId : BuildId();
s_connectBuildId = isPatcher ? kFileSrvBuildId : plProduct::BuildId();
s_serverType = kSrvTypeNone;
for (unsigned i = 0; i < fileAddrCount; ++i) {

8
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp

@ -375,10 +375,10 @@ static void Connect (
Cli2Game_Connect connect;
connect.hdr.connType = kConnTypeCliToGame;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.hdr.buildId = plProduct::BuildId();
connect.hdr.buildType = plProduct::BuildType();
connect.hdr.branchId = plProduct::BranchId();
connect.hdr.productId = plProduct::UUID();
connect.data.dataBytes = sizeof(connect.data);
AsyncSocketConnect(

8
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp

@ -442,10 +442,10 @@ static void Connect (
Cli2GateKeeper_Connect connect;
connect.hdr.connType = kConnTypeCliToGateKeeper;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.hdr.buildId = plProduct::BuildId();
connect.hdr.buildType = plProduct::BuildType();
connect.hdr.branchId = plProduct::BranchId();
connect.hdr.productId = plProduct::UUID();
connect.data.token = conn->token;
connect.data.dataBytes = sizeof(connect.data);

2
Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsTimer.h"
#include "plSDL.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "pnFactory/plCreatable.h"
#include "pnKeyedObject/plUoid.h"
#include "pnKeyedObject/plKey.h"

2
Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt

@ -16,7 +16,7 @@ set(plStatusLog_HEADERS
)
add_library(plStatusLog STATIC ${plStatusLog_SOURCES} ${plStatusLog_HEADERS})
target_link_libraries(plStatusLog CoreLib plFile plUnifiedTime pnProduct)
target_link_libraries(plStatusLog CoreLib plFile plUnifiedTime)
source_group("Source Files" FILES ${plStatusLog_SOURCES})
source_group("Header Files" FILES ${plStatusLog_HEADERS})

4
Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp

@ -64,7 +64,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plStatusLog.h"
#include "plFile/hsFiles.h"
#include "plUnifiedTime/plUnifiedTime.h"
#include "pnProduct/pnProduct.h"
#include "plProduct.h"
#include "plEncryptLogLine.h"
@ -99,7 +99,7 @@ plStatusLogMgr::plStatusLogMgr()
delete[] temp;
#endif
plFileUtils::ConcatFileName(fBasePath, ProductLongName());
plFileUtils::ConcatFileName(fBasePath, plProduct::LongName().ToWchar());
plFileUtils::ConcatFileName(fBasePath, L"Log");
plFileUtils::EnsureFilePathExists(fBasePath);
}

1
Sources/Tools/MaxMain/CMakeLists.txt

@ -186,7 +186,6 @@ target_link_libraries(MaxMain pnNetCli)
target_link_libraries(MaxMain pnNetCommon)
target_link_libraries(MaxMain pnNetProtocol)
target_link_libraries(MaxMain pnNucleusInc)
target_link_libraries(MaxMain pnProduct)
target_link_libraries(MaxMain pnSceneObject)
target_link_libraries(MaxMain pnTimer)
target_link_libraries(MaxMain pnUtils)

1
Sources/Tools/MaxPlasmaLights/CMakeLists.txt

@ -114,7 +114,6 @@ target_link_libraries(MaxPlasmaLights pnNetBase)
target_link_libraries(MaxPlasmaLights pnNetCli)
target_link_libraries(MaxPlasmaLights pnNetCommon)
target_link_libraries(MaxPlasmaLights pnNucleusInc)
target_link_libraries(MaxPlasmaLights pnProduct)
target_link_libraries(MaxPlasmaLights pnSceneObject)
target_link_libraries(MaxPlasmaLights pnTimer)
target_link_libraries(MaxPlasmaLights pnUtils)

2
Sources/Tools/plFontConverter/CMakeLists.txt

@ -25,7 +25,7 @@ add_executable(plFontConverter WIN32 ${plFontConverter_SOURCES} ${plFontConverte
target_link_libraries(plFontConverter CoreLib)
target_link_libraries(plFontConverter pnKeyedObject)
target_link_libraries(plFontConverter pnSceneObject)
target_link_libraries(plFontConverter pnProduct)
target_link_libraries(plFontConverter pnUUID)
target_link_libraries(plFontConverter plGImage)
target_link_libraries(plFontConverter plMessage)
target_link_libraries(plFontConverter plPipeline)

2
Sources/Tools/plLocalizationEditor/CMakeLists.txt

@ -28,8 +28,8 @@ set(plLocalizationEditor_RESOURCES
add_executable(plLocalizationEditor WIN32 ${plLocalizationEditor_HEADERS} ${plLocalizationEditor_SOURCES} ${plLocalizationEditor_RESOURCES})
target_link_libraries(plLocalizationEditor CoreLib)
target_link_libraries(plLocalizationEditor pnProduct)
target_link_libraries(plLocalizationEditor pnSceneObject)
target_link_libraries(plLocalizationEditor pnUUID)
target_link_libraries(plLocalizationEditor plResMgr)
target_link_libraries(plLocalizationEditor pfLocalizationMgr)
target_link_libraries(plLocalizationEditor ${EXPAT_LIBRARY})

2
Sources/Tools/plResBrowser/CMakeLists.txt

@ -46,10 +46,10 @@ target_link_libraries(plResBrowser pnKeyedObject)
target_link_libraries(plResBrowser pnMessage)
target_link_libraries(plResBrowser pnNetCommon)
target_link_libraries(plResBrowser pnNucleusInc)
target_link_libraries(plResBrowser pnProduct)
target_link_libraries(plResBrowser pnSceneObject)
target_link_libraries(plResBrowser pnTimer)
target_link_libraries(plResBrowser pnUtils)
target_link_libraries(plResBrowser pnUUID)
if (WIN32)
target_link_libraries(plResBrowser Rpcrt4)

Loading…
Cancel
Save