Browse Source

Merge pull request #71 from diafero/cleanup

Cleanup
Darryl Pogue 13 years ago
parent
commit
14d6f51943
  1. 18
      CMakeLists.txt
  2. 51
      Sources/Plasma/Apps/plClient/res/plClient.rc
  3. 20
      Sources/Plasma/Apps/plClient/res/resource.h
  4. 423
      Sources/Plasma/Apps/plClient/winmain.cpp
  5. 1
      Sources/Plasma/Apps/plUruLauncher/Main.cpp
  6. 15
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp
  7. 4
      Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp
  8. 4
      Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp
  9. 4
      Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp
  10. 2
      Sources/Plasma/NucleusLib/pnProduct/CMakeLists.txt
  11. 1
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrAllIncludes.h
  12. 9
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h
  13. 83
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.cpp
  14. 62
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h
  15. 5
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp
  16. 4
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h
  17. 2
      Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp
  18. 5
      Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Path.cpp
  19. 4
      Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp
  20. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  21. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp
  22. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp
  23. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp
  24. 2
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp
  25. 2
      Sources/Plasma/PubUtilLib/plSDL/plStateVariable.cpp

18
CMakeLists.txt

@ -27,28 +27,10 @@ if(CURL_IS_STATIC)
endif(CURL_IS_STATIC)
option(PLASMA_EXTERNAL_RELEASE "Is this release intended for the general public?" OFF)
if(PLASMA_EXTERNAL_RELEASE)
add_definitions(-DPLASMA_EXTERNAL_RELEASE)
endif(PLASMA_EXTERNAL_RELEASE)
set(PLASMA_BUILD_TYPE "Live"
CACHE STRING "Which type of client to build")
set_property(CACHE PLASMA_BUILD_TYPE PROPERTY STRINGS
"Dev" "QA" "Test" "Beta" "Live")
if(PLASMA_BUILD_TYPE STREQUAL "Dev")
add_definitions(-DBUILD_TYPE=BUILD_TYPE_DEV)
elseif(PLASMA_BUILD_TYPE STREQUAL "QA")
add_definitions(-DBUILD_TYPE=BUILD_TYPE_QA)
elseif(PLASMA_BUILD_TYPE STREQUAL "Test")
add_definitions(-DBUILD_TYPE=BUILD_TYPE_TEST)
elseif(PLASMA_BUILD_TYPE STREQUAL "Beta")
add_definitions(-DBUILD_TYPE=BUILD_TYPE_BETA)
elseif(PLASMA_BUILD_TYPE STREQUAL "Live")
add_definitions(-DBUILD_TYPE=BUILD_TYPE_LIVE)
endif(PLASMA_BUILD_TYPE STREQUAL "Dev")
set(PLASMA_TARGETS "Client"
CACHE STRING "Which set of plasma targets to build and use")
set_property(CACHE PLASMA_TARGETS PROPERTY STRINGS

51
Sources/Plasma/Apps/plClient/res/plClient.rc

@ -80,57 +80,6 @@ BEGIN
PUSHBUTTON "Copy",IDC_COPY,239,26,50,14
END
IDD_URUTAP_LOGIN DIALOGEX 0, 0, 188, 111
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
CAPTION "Enter Login Info"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Enter",IDOK,33,90,50,14
PUSHBUTTON "Cancel",IDCANCEL,107,90,50,14
LTEXT "Username",IDC_STATIC,7,7,38,11
EDITTEXT IDC_URUTAP_USERNAME,52,7,129,13,ES_AUTOHSCROLL
LTEXT "Password",IDC_STATIC,7,30,38,12
EDITTEXT IDC_URUTAP_PASSWORD,52,28,129,12,ES_PASSWORD |
ES_AUTOHSCROLL
LTEXT "Server",IDC_STATIC,7,54,35,12
EDITTEXT IDC_URUTAP_SERVER,51,51,130,13,ES_AUTOHSCROLL
CONTROL "Destroy and recreate player",IDC_URUTAP_DESTROY,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,51,70,130,12
END
IDD_URU_LOGIN DIALOGEX 0, 0, 200, 133
STYLE DS_SETFONT | DS_3DLOOK | WS_POPUP | WS_SYSMENU
EXSTYLE WS_EX_STATICEDGE
FONT 12, "Hobo Std", 500, 0, 0x0
BEGIN
DEFPUSHBUTTON "Submit",IDOK,139,114,50,14
PUSHBUTTON "Quit",IDCANCEL,77,114,50,14
EDITTEXT IDC_USERNAME,65,55,110,12,ES_AUTOHSCROLL
EDITTEXT IDC_PASSWORD,65,71,110,12,ES_PASSWORD | ES_AUTOHSCROLL
LTEXT "Username:",IDC_TEXT_USER,25,58,36,8
LTEXT "Password:",IDC_TEXT_PASS,27,73,34,8
LTEXT "Welcome to URU!",IDC_TEXT_WELCOME,72,45,57,8
CONTROL "Remember Password:",IDC_REMEMBER_PASS,"Button",
BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,23,87,85,10
GROUPBOX "",IDC_BOX_01,5,30,190,79
GROUPBOX "",IDC_BOX_02,14,38,172,64
CONTROL 151,IDC_IMAGE_BANNER,"Static",SS_BITMAP |
SS_REALSIZEIMAGE | WS_BORDER,4,4,192,21,WS_EX_CLIENTEDGE
END
IDD_URU_EULA DIALOGEX 0, 0, 201, 158
STYLE DS_SETFONT | WS_POPUP | WS_SYSMENU
FONT 12, "Hobo Std", 500, 0, 0x0
BEGIN
DEFPUSHBUTTON "Accept",IDOK,141,138,50,14
PUSHBUTTON "Decline",IDCANCEL,79,138,50,14
CONTROL 151,IDC_IMAGE_BANNER,"Static",SS_BITMAP |
SS_REALSIZEIMAGE | WS_BORDER,4,4,192,21,WS_EX_CLIENTEDGE
GROUPBOX "",IDC_BOX_03,5,30,190,103
LTEXT "Terms of Use Agreement",IDC_TEXT_TERMS,59,36,83,8
CONTROL "Custom1",IDC_DYN_EULA,"",WS_TABSTOP,13,46,174,80
END
IDD_URULOGIN_MAIN DIALOGEX 0, 0, 302, 230
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS |
DS_CENTER | WS_POPUP

20
Sources/Plasma/Apps/plClient/res/resource.h

@ -6,10 +6,7 @@
#define IDD_LOADING 136
#define IDD_EXCEPTION 138
#define IDR_CNSL1 139
#define IDD_URUTAP_LOGIN 148
#define IDD_URU_LOGIN 149
#define IDB_BANNER 151
#define IDD_URU_EULA 152
#define IDD_URULOGIN_MAIN 153
#define IDD_URULOGIN_EULA 154
#define IDD_AUTHFAILED 155
@ -18,23 +15,6 @@
#define IDC_COPY 1002
#define IDC_MSG 1003
#define IDC_STARTING_TEXT 1004
#define IDC_URUTAP_USERNAME 1005
#define IDC_URUTAP_PASSWORD 1006
#define IDC_URUTAP_SERVER 1008
#define IDC_URUTAP_DESTROY 1009
#define IDC_USERNAME 1010
#define IDC_PASSWORD 1011
#define IDC_REMEMBER_PASS 1012
#define IDC_IMAGE_BANNER 1013
#define IDC_BOX_01 1014
#define IDC_BOX_02 1015
#define IDC_TEXT_WELCOME 1016
#define IDC_TEXT_USER 1017
#define IDC_TEXT_PASS 1018
#define IDC_CUSTOM1 1019
#define IDC_DYN_EULA 1019
#define IDC_BOX_03 1020
#define IDC_TEXT_TERMS 1021
#define IDC_URULOGIN_REMEMBERPASS 1022
#define IDC_URULOGIN_USERNAME 1023
#define IDC_URULOGIN_PASSWORD 1024

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

@ -157,28 +157,21 @@ static TGUNIXAppClose pTGUNIXAppClose;
// LoginDialogParam
//============================================================================
struct LoginDialogParam {
bool fromGT;
ENetError authError;
wchar accountName[kMaxAccountNameLength];
char username[kMaxAccountNameLength];
ShaDigest namePassHash;
bool remember;
int focus;
};
bool AuthenticateNetClientComm(ENetError* result, HWND parentWnd);
bool IsExpired();
void GetCryptKey(UInt32* cryptKey, unsigned size);
static void SaveUserPass (char *username, char *password, ShaDigest *pNamePassHash, bool remember_password,
bool fromGT);
static void LoadUserPass (const wchar *accountName, char *username, ShaDigest *pNamePassHash, bool *pRemember,
bool fromGT, int *pFocus);
static void AuthFailedStrings (ENetError authError, bool fromGT,
static bool AuthenticateNetClientComm(ENetError* result, HWND parentWnd);
static void GetCryptKey(UInt32* cryptKey, unsigned size);
static void SaveUserPass (LoginDialogParam *pLoginParam, char *password);
static void LoadUserPass (LoginDialogParam *pLoginParam);
static void AuthFailedStrings (ENetError authError,
const char **ppStr1, const char **ppStr2,
const wchar **ppWStr);
#if 0
// For networking
const GUID NEXUS_GUID = {
0x5bfdb060, 0x6a4, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e};
#endif
// Detect whether we're running under TRANSGAMING Cider
//==============================================================================
@ -206,15 +199,8 @@ static void TGDoCiderDetection ()
pTGUNIXAppClose = (TGUNIXAppClose)GetProcAddress (hMod, "TGUNIXAppClose");
}
static bool TGRunLoginDialog (const wchar *accountName, bool fromGT)
static bool TGRunLoginDialog (LoginDialogParam *pLoginParam)
{
ShaDigest NamePassHash;
char Username[kMaxAccountNameLength + 5];
int Focus;
bool bRemember = false;
LoadUserPass (accountName, Username, &NamePassHash, &bRemember, fromGT, &Focus);
while (true)
{
LPVOID pApp;
@ -231,17 +217,17 @@ static bool TGRunLoginDialog (const wchar *accountName, bool fromGT)
}
// Send user/pwd/remember
pTGUNIXAppWriteLine (pApp, Username);
if (bRemember)
pTGUNIXAppWriteLine (pApp, pLoginParam->username);
if (pLoginParam->remember)
pTGUNIXAppWriteLine (pApp, FAKE_PASS_STRING);
else
pTGUNIXAppWriteLine (pApp, "");
if (bRemember)
if (pLoginParam->remember)
pTGUNIXAppWriteLine (pApp, "y");
else
pTGUNIXAppWriteLine (pApp, "n");
if (!pTGUNIXAppReadLine (pApp, Username, sizeof (Username)))
if (!pTGUNIXAppReadLine (pApp, pLoginParam->username, sizeof (pLoginParam->username)))
{
pTGUNIXAppClose (pApp);
hsMessageBox ("Incomplete or corrupted installation!\nUnable to locate Login dialog",
@ -250,13 +236,13 @@ static bool TGRunLoginDialog (const wchar *accountName, bool fromGT)
}
// Check if user selected 'Cancel'
if (StrCmp (Username, "text:", 5) != 0)
if (StrCmp (pLoginParam->username, "text:", 5) != 0)
{
pTGUNIXAppClose (pApp);
return false;
}
memmove (Username, Username + 5, StrLen (Username) - 5);
Username[StrLen (Username) - 5] = '\0';
memmove (pLoginParam->username, pLoginParam->username + 5, StrLen (pLoginParam->username) - 5);
pLoginParam->username[StrLen (pLoginParam->username) - 5] = '\0';
char Password[kMaxPasswordLength];
if (!pTGUNIXAppReadLine (pApp, Password, sizeof (Password)))
@ -278,11 +264,8 @@ static bool TGRunLoginDialog (const wchar *accountName, bool fromGT)
pTGUNIXAppClose (pApp);
bRemember = false;
if (Remember[0] == 'y')
bRemember = true;
SaveUserPass (Username, Password, &NamePassHash, bRemember, fromGT);
pLoginParam->remember = (Remember[0] == 'y');
SaveUserPass (pLoginParam, Password);
// Do login & see if it failed
ENetError auth;
@ -298,7 +281,7 @@ static bool TGRunLoginDialog (const wchar *accountName, bool fromGT)
unsigned int Len;
char *pTmpStr;
AuthFailedStrings (auth, fromGT, &pStr1, &pStr2, &pWStr);
AuthFailedStrings (auth, &pStr1, &pStr2, &pWStr);
Len = StrLen (pStr1) + 1;
if (pStr2)
@ -359,38 +342,6 @@ bool TGRunTOSDialog ()
return (StrCmp (Buf, "accepted") == 0);
}
void GetMouseCoords(HWND hWnd, WPARAM wParam, LPARAM lParam, int* xPos, int* yPos, int* fwKeys)
{
POINT pt;
pt.x=LOWORD(lParam);
pt.y=HIWORD(lParam);
#if 0
if (ClientToScreen(hWnd, &pt) == false)
HSDebugProc("Error converting client mouse coords to screen");
#endif
if (xPos)
*xPos = pt.x; // horizontal position of cursor
if (yPos)
*yPos = pt.y; // vertical position of cursor
#if 0
char str[128];
sprintf(str, "mx=%d my=%d\n", pt.x, pt.y);
hsStatusMessage(str);
#endif
if (fwKeys)
*fwKeys = wParam; // key flags
// key flag bits
// MK_CONTROL Set if the CTRL key is down.
// MK_LBUTTON Set if the left mouse button is down.
// MK_MBUTTON Set if the middle mouse button is down.
// MK_RBUTTON Set if the right mouse button is down.
// MK_SHIFT Set if the SHIFT key is down.
}
void DebugMsgF(const char* format, ...);
// Handles all the windows messages we might receive
@ -645,7 +596,7 @@ BOOL CALLBACK AuthDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return DefWindowProc(hwndDlg, uMsg, wParam, lParam);
}
bool AuthenticateNetClientComm(ENetError* result, HWND parentWnd)
static bool AuthenticateNetClientComm(ENetError* result, HWND parentWnd)
{
if (!NetCliAuthQueryConnected())
NetCommConnect();
@ -878,7 +829,7 @@ inline static dword ToBigEndian (dword value) {
return ((value) << 24) | ((value & 0x0000ff00) << 8) | ((value & 0x00ff0000) >> 8) | ((value) >> 24);
}
static void AuthFailedStrings (ENetError authError, bool fromGT,
static void AuthFailedStrings (ENetError authError,
const char **ppStr1, const char **ppStr2,
const wchar **ppWStr)
{
@ -912,10 +863,7 @@ static void AuthFailedStrings (ENetError authError, bool fromGT,
*ppStr2 = "Disconnected from Myst Online.";
break;
case kNetErrAuthenticationFailed:
if (fromGT)
*ppStr2 = "GameTap authentication failed, please enter your GameTap username and password.";
else
*ppStr2 = "Incorrect password.\n\nMake sure CAPS LOCK is not on.";
*ppStr2 = "Incorrect password.\n\nMake sure CAPS LOCK is not on.";
break;
case kNetErrGTServerError:
case kNetErrGameTapConnectionFailed:
@ -943,7 +891,7 @@ BOOL CALLBACK AuthFailedDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
const char *pStr1, *pStr2;
const wchar *pWStr;
AuthFailedStrings (loginParam->authError, loginParam->fromGT,
AuthFailedStrings (loginParam->authError,
&pStr1, &pStr2, &pWStr);
if (pStr1)
@ -1014,8 +962,7 @@ BOOL CALLBACK UruTOSDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
return FALSE;
}
static void SaveUserPass (char *username, char *password, ShaDigest *pNamePassHash, bool remember_password,
bool fromGT)
static void SaveUserPass (LoginDialogParam *pLoginParam, char *password)
{
UInt32 cryptKey[4];
ZeroMemory(cryptKey, sizeof(cryptKey));
@ -1024,7 +971,7 @@ static void SaveUserPass (char *username, char *password, ShaDigest *pNamePassHa
wchar wusername[kMaxAccountNameLength];
wchar wpassword[kMaxPasswordLength];
StrToUnicode(wusername, username, arrsize(wusername));
StrToUnicode(wusername, pLoginParam->username, arrsize(wusername));
// if the password field is the fake string then we've already
// loaded the namePassHash from the file
@ -1038,115 +985,104 @@ static void SaveUserPass (char *username, char *password, ShaDigest *pNamePassHa
if (StrLen(domain) == 0 || StrCmpI(domain, L"gametap") == 0) {
CryptDigest(
kCryptSha1,
pNamePassHash,
&pLoginParam->namePassHash,
StrLen(password) * sizeof(password[0]),
password
);
if (IsMachineLittleEndian()) {
pNamePassHash->data[0] = ToBigEndian(pNamePassHash->data[0]);
pNamePassHash->data[1] = ToBigEndian(pNamePassHash->data[1]);
pNamePassHash->data[2] = ToBigEndian(pNamePassHash->data[2]);
pNamePassHash->data[3] = ToBigEndian(pNamePassHash->data[3]);
pNamePassHash->data[4] = ToBigEndian(pNamePassHash->data[4]);
pLoginParam->namePassHash.data[0] = ToBigEndian(pLoginParam->namePassHash.data[0]);
pLoginParam->namePassHash.data[1] = ToBigEndian(pLoginParam->namePassHash.data[1]);
pLoginParam->namePassHash.data[2] = ToBigEndian(pLoginParam->namePassHash.data[2]);
pLoginParam->namePassHash.data[3] = ToBigEndian(pLoginParam->namePassHash.data[3]);
pLoginParam->namePassHash.data[4] = ToBigEndian(pLoginParam->namePassHash.data[4]);
}
}
else
CryptHashPassword(wusername, wpassword, pNamePassHash);
CryptHashPassword(wusername, wpassword, &pLoginParam->namePassHash);
}
NetCommSetAccountUsernamePassword(wusername, *pNamePassHash);
NetCommSetAccountUsernamePassword(wusername, pLoginParam->namePassHash);
if (TGIsCider)
NetCommSetAuthTokenAndOS(nil, L"mac");
else
NetCommSetAuthTokenAndOS(nil, L"win");
if (!fromGT) {
wchar fileAndPath[MAX_PATH];
PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
wchar fileAndPath[MAX_PATH];
PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
#ifndef PLASMA_EXTERNAL_RELEASE
// internal builds can use the local init directory
wchar localFileAndPath[MAX_PATH];
StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
if (PathDoesFileExist(localFileAndPath))
StrCopy(fileAndPath, localFileAndPath, arrsize(localFileAndPath));
// internal builds can use the local init directory
wchar localFileAndPath[MAX_PATH];
StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
if (PathDoesFileExist(localFileAndPath))
StrCopy(fileAndPath, localFileAndPath, arrsize(localFileAndPath));
#endif
hsStream* stream = plEncryptedStream::OpenEncryptedFileWrite(fileAndPath, cryptKey);
if (stream)
{
stream->Write(sizeof(cryptKey), cryptKey);
stream->WriteSafeString(username);
stream->Writebool(remember_password);
if (remember_password)
stream->Write(sizeof(pNamePassHash->data), pNamePassHash->data);
stream->Close();
delete stream;
}
hsStream* stream = plEncryptedStream::OpenEncryptedFileWrite(fileAndPath, cryptKey);
if (stream)
{
stream->Write(sizeof(cryptKey), cryptKey);
stream->WriteSafeString(pLoginParam->username);
stream->Writebool(pLoginParam->remember);
if (pLoginParam->remember)
stream->Write(sizeof(pLoginParam->namePassHash.data), pLoginParam->namePassHash.data);
stream->Close();
delete stream;
}
}
static void LoadUserPass (const wchar *accountName, char *username, ShaDigest *pNamePassHash, bool *pRemember,
bool fromGT, int *pFocus)
static void LoadUserPass (LoginDialogParam *pLoginParam)
{
UInt32 cryptKey[4];
ZeroMemory(cryptKey, sizeof(cryptKey));
GetCryptKey(cryptKey, arrsize(cryptKey));
UInt32 cryptKey[4];
ZeroMemory(cryptKey, sizeof(cryptKey));
GetCryptKey(cryptKey, arrsize(cryptKey));
char* temp;
*pRemember = false;
username[0] = '\0';
char* temp;
pLoginParam->remember = false;
pLoginParam->username[0] = '\0';
if (!fromGT)
{
wchar fileAndPath[MAX_PATH];
PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
wchar fileAndPath[MAX_PATH];
PathGetInitDirectory(fileAndPath, arrsize(fileAndPath));
PathAddFilename(fileAndPath, fileAndPath, L"login.dat", arrsize(fileAndPath));
#ifndef PLASMA_EXTERNAL_RELEASE
// internal builds can use the local init directory
wchar localFileAndPath[MAX_PATH];
StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
if (PathDoesFileExist(localFileAndPath))
StrCopy(fileAndPath, localFileAndPath, arrsize(localFileAndPath));
// internal builds can use the local init directory
wchar localFileAndPath[MAX_PATH];
StrCopy(localFileAndPath, L"init\\login.dat", arrsize(localFileAndPath));
if (PathDoesFileExist(localFileAndPath))
StrCopy(fileAndPath, localFileAndPath, arrsize(localFileAndPath));
#endif
hsStream* stream = plEncryptedStream::OpenEncryptedFile(fileAndPath, true, cryptKey);
if (stream && !stream->AtEnd())
{
UInt32 savedKey[4];
stream->Read(sizeof(savedKey), savedKey);
if (memcmp(cryptKey, savedKey, sizeof(savedKey)) == 0)
{
temp = stream->ReadSafeString();
hsStream* stream = plEncryptedStream::OpenEncryptedFile(fileAndPath, true, cryptKey);
if (stream && !stream->AtEnd())
{
UInt32 savedKey[4];
stream->Read(sizeof(savedKey), savedKey);
if (temp)
{
StrCopy(username, temp, kMaxAccountNameLength);
delete temp;
}
else
username[0] = '\0';
if (memcmp(cryptKey, savedKey, sizeof(savedKey)) == 0)
{
temp = stream->ReadSafeString();
*pRemember = stream->Readbool();
if (temp)
{
StrCopy(pLoginParam->username, temp, kMaxAccountNameLength);
delete temp;
}
if (*pRemember)
{
stream->Read(sizeof(pNamePassHash->data), pNamePassHash->data);
*pFocus = IDOK;
}
else
*pFocus = IDC_URULOGIN_PASSWORD;
}
pLoginParam->remember = stream->Readbool();
stream->Close();
delete stream;
}
if (pLoginParam->remember)
{
stream->Read(sizeof(pLoginParam->namePassHash.data), pLoginParam->namePassHash.data);
pLoginParam->focus = IDOK;
}
else
{
StrToAnsi (username, accountName, kMaxAccountNameLength);
*pFocus = IDC_URULOGIN_PASSWORD;
pLoginParam->focus = IDC_URULOGIN_PASSWORD;
}
}
stream->Close();
delete stream;
}
}
@ -1197,8 +1133,7 @@ void StatusCallback(void *param)
BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
static ShaDigest namePassHash;
static LoginDialogParam* loginParam;
static LoginDialogParam* pLoginParam;
static bool showAuthFailed = false;
switch( uMsg )
@ -1207,30 +1142,21 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
{
s_loginDlgRunning = true;
_beginthread(StatusCallback, 0, hwndDlg);
loginParam = (LoginDialogParam*)lParam;
pLoginParam = (LoginDialogParam*)lParam;
SetWindowText(hwndDlg, "Login");
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(gHInst, MAKEINTRESOURCE(IDI_ICON_DIRT)));
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
char username[kMaxAccountNameLength];
bool remember_password = false;
int focus_control = IDC_URULOGIN_USERNAME;
LoadUserPass (loginParam->accountName, username, &namePassHash, &remember_password, loginParam->fromGT, &focus_control);
SetDlgItemText(hwndDlg, IDC_URULOGIN_USERNAME, username);
CheckDlgButton(hwndDlg, IDC_URULOGIN_REMEMBERPASS, remember_password ? BST_CHECKED : BST_UNCHECKED);
if (remember_password)
SetDlgItemText(hwndDlg, IDC_URULOGIN_USERNAME, pLoginParam->username);
CheckDlgButton(hwndDlg, IDC_URULOGIN_REMEMBERPASS, pLoginParam->remember ? BST_CHECKED : BST_UNCHECKED);
if (pLoginParam->remember)
SetDlgItemText(hwndDlg, IDC_URULOGIN_PASSWORD, FAKE_PASS_STRING);
if (loginParam->fromGT)
EnableWindow(GetDlgItem(hwndDlg, IDC_URULOGIN_REMEMBERPASS), FALSE);
SetFocus(GetDlgItem(hwndDlg, focus_control));
SetFocus(GetDlgItem(hwndDlg, pLoginParam->focus));
if (IS_NET_ERROR(loginParam->authError))
if (IS_NET_ERROR(pLoginParam->authError))
{
showAuthFailed = true;
}
@ -1280,25 +1206,22 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
bool ok = (LOWORD(wParam) == IDOK);
if (ok)
{
char username[kMaxAccountNameLength];
char password[kMaxPasswordLength];
bool remember_password = false;
GetDlgItemText(hwndDlg, IDC_URULOGIN_USERNAME, username, kMaxAccountNameLength);
GetDlgItemText(hwndDlg, IDC_URULOGIN_USERNAME, pLoginParam->username, kMaxAccountNameLength);
GetDlgItemText(hwndDlg, IDC_URULOGIN_PASSWORD, password, kMaxPasswordLength);
remember_password = (IsDlgButtonChecked(hwndDlg, IDC_URULOGIN_REMEMBERPASS) == BST_CHECKED);
pLoginParam->remember = (IsDlgButtonChecked(hwndDlg, IDC_URULOGIN_REMEMBERPASS) == BST_CHECKED);
SaveUserPass (username, password, &namePassHash, remember_password, loginParam->fromGT);
SaveUserPass (pLoginParam, password);
LoginDialogParam loginParam;
MemSet(&loginParam, 0, sizeof(loginParam));
bool cancelled = AuthenticateNetClientComm(&loginParam.authError, hwndDlg);
MemSet(&pLoginParam->authError, 0, sizeof(pLoginParam->authError));
bool cancelled = AuthenticateNetClientComm(&pLoginParam->authError, hwndDlg);
if (IS_NET_SUCCESS(loginParam.authError) && !cancelled)
if (IS_NET_SUCCESS(pLoginParam->authError) && !cancelled)
EndDialog(hwndDlg, ok);
else {
if (!cancelled)
::DialogBoxParam(gHInst, MAKEINTRESOURCE( IDD_AUTHFAILED ), hwndDlg, AuthFailedDialogProc, (LPARAM)&loginParam);
::DialogBoxParam(gHInst, MAKEINTRESOURCE( IDD_AUTHFAILED ), hwndDlg, AuthFailedDialogProc, (LPARAM)pLoginParam);
else
{
NetCommDisconnect();
@ -1338,7 +1261,7 @@ BOOL CALLBACK UruLoginDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
{
case AUTH_FAILED_TIMER:
KillTimer(hwndDlg, AUTH_FAILED_TIMER);
::DialogBoxParam(gHInst, MAKEINTRESOURCE( IDD_AUTHFAILED ), hwndDlg, AuthFailedDialogProc, (LPARAM)loginParam);
::DialogBoxParam(gHInst, MAKEINTRESOURCE( IDD_AUTHFAILED ), hwndDlg, AuthFailedDialogProc, (LPARAM)pLoginParam);
return TRUE;
case AUTH_LOGIN_TIMER:
@ -1589,16 +1512,10 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
return PARABLE_NORMAL_EXIT;
}
if (IsExpired())
{
hsMessageBox("This client is over 30 days old. You need to get a new one.", "Error", hsMessageBoxNormal);
return PARABLE_NORMAL_EXIT;
}
FILE *serverini = _wfopen(serverIni, L"rb");
if (serverini)
FILE *serverIniFile = _wfopen(serverIni, L"rb");
if (serverIniFile)
{
fclose(serverini);
fclose(serverIniFile);
pfConsoleEngine tempConsole;
tempConsole.ExecuteFile(serverIni);
}
@ -1615,62 +1532,23 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
curl_global_init(CURL_GLOBAL_ALL);
wchar acctName[kMaxAccountNameLength];
// if we're being launched from gametap then don't use the intro dialogs
if (StrStrI(lpCmdLine, "screenname=")) {
doIntroDialogs = false;
wchar authToken[kMaxPublisherAuthKeyLength];
wchar os[kMaxGTOSIdLength];
ShaDigest emptyDigest;
MemSet(acctName, 0, sizeof(acctName));
MemSet(authToken, 0, sizeof(authToken));
MemSet(os, 0, sizeof(os));
const char* temp = lpCmdLine;
char token[128];
while (StrTokenize(&temp, token, arrsize(token), " =")) {
if (StrCmpI(token, "screenname") == 0) {
if (!StrTokenize(&temp, token, arrsize(token), " ="))
break;
StrToUnicode(acctName, token, arrsize(acctName));
}
else if (StrCmpI(token, "authtoken") == 0) {
if (!StrTokenize(&temp, token, arrsize(token), " ="))
break;
StrToUnicode(authToken, token, arrsize(authToken));
}
else if (StrCmpI(token, "os") == 0) {
if (!StrTokenize(&temp, token, arrsize(token), " ="))
break;
StrToUnicode(os, token, arrsize(os));
}
}
NetCommSetAccountUsernamePassword(acctName, emptyDigest);
NetCommSetAuthTokenAndOS(authToken, os);
}
bool needExit = false;
LoginDialogParam loginParam;
MemSet(&loginParam, 0, sizeof(loginParam));
LoadUserPass(&loginParam);
if (!doIntroDialogs) {
if (!doIntroDialogs && loginParam.remember) {
ENetError auth;
wchar wusername[kMaxAccountNameLength];
StrToUnicode(wusername, loginParam.username, arrsize(wusername));
NetCommSetAccountUsernamePassword(wusername, loginParam.namePassHash);
bool cancelled = AuthenticateNetClientComm(&auth, NULL);
if (IS_NET_ERROR(auth) || cancelled) {
doIntroDialogs = true;
loginParam.fromGT = true;
loginParam.authError = auth;
StrCopy(loginParam.accountName, acctName, arrsize(loginParam.accountName));
if (cancelled)
{
@ -1681,7 +1559,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
if (doIntroDialogs) {
if (TGIsCider)
needExit = !TGRunLoginDialog (loginParam.accountName, loginParam.fromGT);
needExit = !TGRunLoginDialog(&loginParam);
else if (::DialogBoxParam( hInst, MAKEINTRESOURCE( IDD_URULOGIN_MAIN ), NULL, UruLoginDialogProc, (LPARAM)&loginParam ) <= 0)
needExit = true;
}
@ -1867,76 +1745,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
return PARABLE_NORMAL_EXIT;
}
bool IsExpired()
{
bool expired = false;
#ifndef PLASMA_EXTERNAL_RELEASE
char ourPath[MAX_PATH];
GetModuleFileName(NULL, ourPath, sizeof(ourPath));
DWORD ok = 0;
DWORD size = GetFileVersionInfoSize(ourPath, &ok);
if (size > 0)
{
void* data = TRACKED_NEW UInt8[size];
GetFileVersionInfo(ourPath, ok, size, data);
unsigned int descLen = 0;
void* desc = nil;
if (VerQueryValue(data, "\\StringFileInfo\\040904B0\\FileDescription", &desc, &descLen))
{
const char* buildDateStart = strstr((const char*)desc, " - Built ");
if (buildDateStart)
{
buildDateStart += strlen(" - Built ");
const char* buildDateEnd = strstr(buildDateStart, " at");
if (buildDateEnd)
{
int len = buildDateEnd-buildDateStart;
char buf[32];
strncpy(buf, buildDateStart, len);
buf[len] = '\0';
int month = atoi(strtok(buf, "/"));
int day = atoi(strtok(nil, "/"));
int year = atoi(strtok(nil, "/"));
SYSTEMTIME curTime, buildTime;
GetLocalTime(&buildTime);
GetLocalTime(&curTime);
buildTime.wDay = day;
buildTime.wMonth = month;
buildTime.wYear = year;
ULARGE_INTEGER iCurTime, iBuildTime;
FILETIME ft;
SystemTimeToFileTime(&curTime, &ft);
iCurTime.LowPart = ft.dwLowDateTime;
iCurTime.HighPart = ft.dwHighDateTime;
SystemTimeToFileTime(&buildTime, &ft);
iBuildTime.LowPart = ft.dwLowDateTime;
iBuildTime.HighPart = ft.dwHighDateTime;
int secsOld = (int)((iCurTime.QuadPart - iBuildTime.QuadPart) / 10000000);
int daysOld = secsOld / (60 * 60 * 24);
if (daysOld > 30)
expired = true;
}
}
}
delete [] data;
}
#endif
return expired;
}
void GetCryptKey(UInt32* cryptKey, unsigned numElements)
static void GetCryptKey(UInt32* cryptKey, unsigned numElements)
{
char volName[] = "C:\\";
int index = 0;

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

@ -602,6 +602,7 @@ static void StatusCallback(void *)
{
curl_easy_setopt(hCurl, CURLOPT_USERAGENT, "UruClient/1.0");
curl_easy_setopt(hCurl, CURLOPT_URL, serverUrl);
curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, &CurlCallback);
if (serverUrl[0] && curl_easy_perform(hCurl) != 0) // only perform request if there's actually a URL set
SetStatusText(s_curlError);

15
Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceLog.cpp

@ -32,8 +32,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "Pch.h"
#pragma hdrstop
#if defined(PLASMA_EXTERNAL_RELEASE) && (BUILD_TYPE == BUILD_TYPE_LIVE)
// If this is an external live build then don't write log files
#if defined(PLASMA_EXTERNAL_RELEASE)
// If this is an external build then don't write log files
#define ACELOG_NO_LOG_FILES
#endif
@ -84,11 +84,11 @@ static unsigned s_logSize[kNumLogTypes] = {
static const wchar * s_logNameFmt[kNumLogTypes] = {
#ifdef SERVER
L"Dbg%02u%02u%02u.%s.log",
L"Inf%02u%02u%02u.%s.log",
L"Err%02u%02u%02u.%s.log",
L"Dbg%02u%02u%02u.log",
L"Inf%02u%02u%02u.log",
L"Err%02u%02u%02u.log",
#else
L"%s%02u%02u%02u.%s.log",
L"%s%02u%02u%02u.log",
#endif
};
@ -176,8 +176,7 @@ static void GetLogFilename (
#endif
timeDesc.year % 100,
timeDesc.month,
timeDesc.day,
BuildTypeString()
timeDesc.day
);
PathAddFilename(filename, s_directory, filename, chars);
}

4
Sources/Plasma/NucleusLib/pnNetBase/Private/pnNbSrvs.cpp

@ -32,10 +32,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../Pch.h"
#pragma hdrstop
#ifndef BUILD_TYPE
# error "pnProduct not included"
#endif
/*****************************************************************************
*

4
Sources/Plasma/NucleusLib/pnNetDiag/pnNdTcp.cpp

@ -622,7 +622,7 @@ static void StartAuthTcpTest (
connect.hdr.connType = (byte) kConnTypeCliToAuth;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.token = kNilGuid;
@ -665,7 +665,7 @@ static void StartFileTcpTest (
connect.hdr.connType = kConnTypeCliToFile;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = 0;
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.buildId = BuildId();

4
Sources/Plasma/NucleusLib/pnNetLog/pnNlCli.cpp

@ -344,13 +344,13 @@ void NetLogConn::Connect (
connect.hdr.connType = kConnTypeSrvToLog;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.dataBytes = sizeof(connect.data);
connect.data.buildId = BuildId();
connect.data.srvType = srvType;
connect.data.buildType = BuildType();
connect.data.buildType = BUILD_TYPE_LIVE;
connect.data.productId = ProductId();
AsyncSocketConnect(

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

@ -14,8 +14,6 @@ set(pnProduct_PRIVATE
Private/pnPrBuildId.cpp
Private/pnPrBuildString.h
Private/pnPrBuildString.cpp
Private/pnPrBuildType.h
Private/pnPrBuildType.cpp
Private/pnPrProductId.h
Private/pnPrProductId.cpp
)

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

@ -36,7 +36,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUtils/pnUtils.h"
#include "pnPrBuildId.h"
#include "pnPrBuildType.h"
#include "pnPrBranchId.h"
#include "pnPrProductId.h"
#include "pnPrBuildString.h"

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

@ -43,3 +43,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
unsigned BuildId ();
void OverrideBuildId (unsigned buildId);
/*****************************************************************************
*
* BuildType definition
*
***/
#define BUILD_TYPE_LIVE 50

83
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.cpp

@ -1,83 +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/>.
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/pnPrBuildType.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
unsigned BuildType () {
return BUILD_TYPE;
}
//============================================================================
const wchar * BuildTypeString () {
#if BUILD_TYPE == BUILD_TYPE_DEV
return L"Dev";
#elif BUILD_TYPE == BUILD_TYPE_QA
return L"QA";
#elif BUILD_TYPE == BUILD_TYPE_TEST
return L"Test";
#elif BUILD_TYPE == BUILD_TYPE_BETA
return L"Beta";
#elif BUILD_TYPE == BUILD_TYPE_LIVE
return L"Live";
#else
# error "Unknown build type"
#endif
}
//============================================================================
const wchar *BuildTypeServerStatusPath () {
#if BUILD_TYPE == BUILD_TYPE_DEV
return nil;
#elif BUILD_TYPE == BUILD_TYPE_QA
return nil;
#elif BUILD_TYPE == BUILD_TYPE_TEST
return nil;
#elif BUILD_TYPE == BUILD_TYPE_BETA
return L"/serverstatus/moulbeta.php";
#elif BUILD_TYPE == BUILD_TYPE_LIVE
return L"/serverstatus/moullive.php";
#else
# error "Unknown build type"
#endif
}

62
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h

@ -1,62 +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/>.
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/pnPrBuildType.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDTYPE_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDTYPE_H
/*****************************************************************************
*
* BuildType definitions
*
***/
#ifndef BUILD_TYPE
#define BUILD_TYPE BUILD_TYPE_DEV
#endif
#define BUILD_TYPE_DEV 10
#define BUILD_TYPE_QA 20
#define BUILD_TYPE_TEST 30
#define BUILD_TYPE_BETA 40
#define BUILD_TYPE_LIVE 50
/*****************************************************************************
*
* BuildType functions
*
***/
unsigned BuildType ();
const wchar * BuildTypeString ();
const wchar * BuildTypeServerStatusPath ();

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

@ -102,13 +102,12 @@ const wchar * ProductLongName () {
//============================================================================
void ProductString (wchar * dest, unsigned destChars) {
// Example: "UruLive.Beta.2.214 - External.Release"
// Example: "UruLive.2.214 - External.Release"
StrPrintf(
dest,
destChars,
L"%s.%s.%u.%u - %s.%s",
L"%s.%u.%u - %s.%s",
ProductCoreName(),
BuildTypeString(),
BranchId(),
BuildId(),
#ifdef PLASMA_EXTERNAL_RELEASE

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

@ -73,6 +73,6 @@ const wchar * ProductShortName (); // e.g: L"Uru" (filenam
const wchar * ProductLongName (); // e.g: L"Uru: Ages Beyond Myst" (human friendly)
// Returns: "<ProductCoreName>.<BuildTypeString>.<BranchId>.<BuildId>"
// Example: "Uru.Beta.3.204"
// Returns: "<ProductCoreName>.<BranchId>.<BuildId> - <External|Internal>.<Debug|Release>"
// Example: "Uru.3.204 - External.Release"
void ProductString (wchar * dest, unsigned destChars);

2
Sources/Plasma/NucleusLib/pnSimpleNet/pnSimpleNet.cpp

@ -366,7 +366,7 @@ static void Connect (const NetAddress & addr, ConnectParam * cp) {
connect.hdr.connType = kConnTypeSimpleNet;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.channelId = cp->channel->GetValue();

5
Sources/Plasma/NucleusLib/pnUtils/Private/Win32/pnUtW32Path.cpp

@ -531,11 +531,6 @@ void PathGetUserDirectory (
// append the product name
PathAddFilename(dst, temp, ProductLongName(), dstChars);
#if BUILD_TYPE != BUILD_TYPE_LIVE
// non-live builds live in a subdir
PathAddFilename(dst, dst, BuildTypeString(), dstChars);
#endif
// ensure it exists
if (!PathDoesDirectoryExist(dst))
PathCreateDirectory(dst, kPathCreateDirFlagEntireTree);

4
Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp

@ -767,8 +767,8 @@ static void IReadNetIni() {
}
#ifndef PLASMA_EXTERNAL_RELEASE
// @@@: Internal dev build only: Drop a default version of the file if not found
if (!ini && BuildType() == BUILD_TYPE_DEV) {
// @@@: Internal build only: Drop a default version of the file if not found
if (!ini) {
EFileError fileError;
qword fileSize;
qword lastWrite;

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

@ -1489,7 +1489,7 @@ static void Connect (
connect.hdr.connType = kConnTypeCliToAuth;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.token = conn->token;

2
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp

@ -375,7 +375,7 @@ static void Connect (
connect.hdr.connType = kConnTypeCliToCsr;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.dataBytes = sizeof(connect.data);

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

@ -502,7 +502,7 @@ static void Connect (CliFileConn * conn) {
connect.hdr.connType = kConnTypeCliToFile;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = kFileSrvBuildId;
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.buildId = conn->buildId;

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

@ -352,7 +352,7 @@ static void Connect (
connect.hdr.connType = kConnTypeCliToGame;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.dataBytes = sizeof(connect.data);

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

@ -427,7 +427,7 @@ static void Connect (
connect.hdr.connType = kConnTypeCliToGateKeeper;
connect.hdr.hdrBytes = sizeof(connect.hdr);
connect.hdr.buildId = BuildId();
connect.hdr.buildType = BuildType();
connect.hdr.buildType = BUILD_TYPE_LIVE;
connect.hdr.branchId = BranchId();
connect.hdr.productId = ProductId();
connect.data.token = conn->token;

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

@ -1161,7 +1161,7 @@ bool plSimpleStateVariable::ConvertTo(plSimpleVarDescriptor* toVar, bool force )
int cnt = toVar->GetCount() ? toVar->GetCount() : fVar.GetCount();
if (cnt > fVar.GetCount()) {
#if BUILD_TYPE == BUILD_TYPE_DEV
#ifndef PLASMA_EXTERNAL_RELEASE
FATAL("SDL Convert: array size increased, conversion loses data");
#endif
// Reallocate new memory (destroys existing variable state)

Loading…
Cancel
Save