1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Replace pnProduct with a (very) thin CoreLib plProduct wrapper around CMake-defined product ID values

This commit is contained in:
2013-01-17 01:14:45 -08:00
parent dbf23ac28a
commit f980f022dd
60 changed files with 167 additions and 864 deletions

View File

@ -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)

View File

@ -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,16 +623,11 @@ 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,
0, 0,
800 + gWinBorderDX * 2,
600 + gWinBorderDY * 2 + gWinMenuDY,
NULL, NULL, hInst, NULL
@ -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);
}
}

View File

@ -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"

View File

@ -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());
}
//============================================================================

View File

@ -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})

View File

@ -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})

View File

@ -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() {

View File

@ -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})

View File

@ -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() {

View File

@ -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)

View File

@ -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>

View File

@ -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})

View File

@ -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 ///////////////////////////////////////////////////////////////

View File

@ -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)

View File

@ -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>

View File

@ -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})

View File

@ -449,13 +449,10 @@ 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();
MessagePump(s_dialog);

View File

@ -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"