From 68abe52f9c45f89f5205d9e2bf225f2543da976b Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Tue, 25 Oct 2011 21:19:11 -0700 Subject: [PATCH] Terrible hacks to make pnProduct work on Linux. plUUID has a conversion operator to pnUtil's Uuid class. We're counting on this to work properly on Windows (which hasn't yet been tested) --- Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt | 1 + Sources/Plasma/NucleusLib/pnProduct/Pch.h | 2 +- .../Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h | 3 ++- .../Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp | 6 +++--- Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt index 2acee566..eab2753f 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt @@ -1,5 +1,6 @@ include_directories("../../CoreLib") include_directories("../../NucleusLib") +include_directories("../../PubUtilLib") set(pnProduct_HEADERS Pch.h diff --git a/Sources/Plasma/NucleusLib/pnProduct/Pch.h b/Sources/Plasma/NucleusLib/pnProduct/Pch.h index eb3d3e5b..024900da 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Pch.h +++ b/Sources/Plasma/NucleusLib/pnProduct/Pch.h @@ -51,6 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PCH_H -#include "pnUtils/pnUtils.h" +//#include "pnUtils/pnUtils.h" #include "Private/pnPrAllIncludes.h" diff --git a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h index ccc46fb2..9a137cfe 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h +++ b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h @@ -49,7 +49,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H -#include "pnUtils/pnUtils.h" +//#include "pnUtils/pnUtils.h" +#include "plUUID/plUUID.h" #include "pnPrBuildId.h" #include "pnPrBranchId.h" diff --git a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp index 1d757b9a..92b9028e 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp +++ b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp @@ -61,7 +61,7 @@ namespace Uru { static const wchar kCoreName[] = L"UruLive"; static const wchar kShortName[] = L"UruLive"; static const wchar kLongName[] = L"Uru Live"; - static const Uuid kId(L"ea489821-6c35-4bd0-9dae-bb17c585e680"); + static const plUUID kId("ea489821-6c35-4bd0-9dae-bb17c585e680"); } // @@@: add your product namespace here @@ -96,7 +96,7 @@ namespace Uru { ***/ //============================================================================ -const Uuid & ProductId () { +const plUUID& ProductId () { return PRODUCT_ID; } @@ -119,7 +119,7 @@ const wchar * ProductLongName () { //============================================================================ void ProductString (wchar * dest, unsigned destChars) { // Example: "UruLive.2.214 - External.Release" - StrPrintf( + swprintf( dest, destChars, L"%s.%u.%u - %s.%s", diff --git a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h index fd5d6f40..1023fa63 100644 --- a/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h +++ b/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h @@ -83,7 +83,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -const Uuid & ProductId (); +const plUUID& ProductId (); const wchar * ProductCoreName (); // e.g: L"Uru" const wchar * ProductShortName (); // e.g: L"Uru" (filename/registry friendly) const wchar * ProductLongName (); // e.g: L"Uru: Ages Beyond Myst" (human friendly)