Browse Source

More granular control of the SecurePreloader

Adam Johnson 12 years ago
parent
commit
98dff8d8e5
  1. 8
      Sources/Plasma/Apps/plClient/winmain.cpp
  2. 9
      Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp

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

@ -98,18 +98,21 @@ bool gHasMouse = false;
ITaskbarList3* gTaskbarList = nil; // NT 6.1+ taskbar stuff
extern bool gDataServerLocal;
extern bool gSkipPreload;
enum
{
kArgSkipLoginDialog,
kArgServerIni,
kArgLocalData,
kArgSkipPreload
};
static const CmdArgDef s_cmdLineArgs[] = {
{ kCmdArgFlagged | kCmdTypeBool, L"SkipLoginDialog", kArgSkipLoginDialog },
{ kCmdArgFlagged | kCmdTypeString, L"ServerIni", kArgServerIni },
{ kCmdArgFlagged | kCmdTypeBool, L"LocalData", kArgLocalData },
{ kCmdArgFlagged | kCmdTypeBool, L"SkipPreload", kArgSkipPreload },
};
/// Made globals now, so we can set them to zero if we take the border and
@ -1203,7 +1206,12 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nC
if (cmdParser.IsSpecified(kArgSkipLoginDialog))
doIntroDialogs = false;
if (cmdParser.IsSpecified(kArgLocalData))
{
gDataServerLocal = true;
gSkipPreload = true;
}
if (cmdParser.IsSpecified(kArgSkipPreload))
gSkipPreload = true;
#endif
plFileName serverIni = "server.ini";

9
Sources/Plasma/FeatureLib/pfSecurePreloader/pfSecurePreloader.cpp

@ -52,7 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMessage/plPreloaderMsg.h"
#include "plProgressMgr/plProgressMgr.h"
extern bool gDataServerLocal;
bool gSkipPreload = false;
pfSecurePreloader* pfSecurePreloader::fInstance = nil;
/////////////////////////////////////////////////////////////////////
@ -261,8 +261,9 @@ void pfSecurePreloader::Init()
void pfSecurePreloader::Start()
{
#ifndef PLASMA_EXTERNAL_RELEASE
// Using local data? Move along, move along...
if (gDataServerLocal)
// Finer grained control of the preloader allows us to have synched data but our own python/SDL
// This is useful on outdated/black-box shards like MOULa
if (gSkipPreload)
{
Finish();
return;
@ -272,7 +273,7 @@ void pfSecurePreloader::Start()
NetCliAuthGetEncryptionKey(fEncryptionKey, 4);
// TODO: Localize
fProgress = plProgressMgr::GetInstance()->RegisterOperation(0.0f, "Checking for Updates", plProgressMgr::kUpdateText, false, true);
fProgress = plProgressMgr::GetInstance()->RegisterOperation(0.0f, "Checking for updates", plProgressMgr::kUpdateText, false, true);
// Now, we need to fetch the "SecurePreloader" manifest from the file server, which will contain the python and SDL files.
// We're basically reimplementing plResPatcher here, except preferring to keep everything in memory, then flush to disk

Loading…
Cancel
Save