mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Merged in cwalther/cwe/cypythonide (pull request #8)
Wrap uses of the missing CyPythonIDE with #ifdef HAVE_CYPYTHONIDE This fix is needed to build an internal client (without /DPLASMA_EXTERNAL_RELEASE). It is designed to match the corresponding fix in H-uru/Plasma (b76fd10 etc.).
This commit is contained in:
@ -7040,6 +7040,7 @@ PF_CONSOLE_CMD( Python, // Group name
|
||||
}
|
||||
|
||||
#ifndef LIMIT_CONSOLE_COMMANDS
|
||||
#ifdef HAVE_CYPYTHONIDE
|
||||
PF_CONSOLE_CMD( Python,
|
||||
UsePythonDebugger,
|
||||
"",
|
||||
@ -7047,6 +7048,7 @@ PF_CONSOLE_CMD( Python,
|
||||
{
|
||||
PythonInterface::UsePythonDebugger(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#include "../pfMessage/pfBackdoorMsg.h"
|
||||
|
@ -196,7 +196,7 @@ PyObject* PythonInterface::dbgOut = nil;
|
||||
PyObject* PythonInterface::dbgSlice = nil; // time slice function for the debug window
|
||||
plStatusLog* PythonInterface::dbgLog = nil; // output logfile
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
bool PythonInterface::usePythonDebugger = false;
|
||||
plCyDebServer PythonInterface::debugServer;
|
||||
bool PythonInterface::requestedExit = false;
|
||||
@ -205,7 +205,7 @@ bool PythonInterface::requestedExit = false;
|
||||
// stupid Windows.h and who started including that!
|
||||
#undef DrawText
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
// Special includes for debugging
|
||||
#include <frameobject.h>
|
||||
|
||||
@ -856,7 +856,7 @@ void PythonInterface::initPython()
|
||||
Py_SetProgramName("plasma");
|
||||
Py_Initialize();
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
if (usePythonDebugger)
|
||||
{
|
||||
debugServer.SetCallbackClass(&debServerCallback);
|
||||
@ -1528,7 +1528,7 @@ void PythonInterface::finiPython()
|
||||
initialized--;
|
||||
if ( initialized < 1 && Py_IsInitialized() != 0 && IsInShutdown )
|
||||
{
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
if (usePythonDebugger)
|
||||
debugServer.Disconnect();
|
||||
#endif
|
||||
@ -1675,7 +1675,7 @@ int PythonInterface::getOutputAndReset(std::string *output)
|
||||
pyOutputRedirector::ClearData(stdOut);
|
||||
|
||||
// tell python debugger
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
if (UsePythonDebugger())
|
||||
PythonInterface::PythonDebugger()->StdOut(strVal);
|
||||
#endif
|
||||
|
@ -50,7 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsStlUtils.h"
|
||||
#include <python.h>
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
#include "../../Apps/CyPythonIDE/plCyDebug/plCyDebServer.h"
|
||||
#endif
|
||||
|
||||
@ -82,7 +82,7 @@ private:
|
||||
static PyObject* dbgSlice; // time slice function for the debug window
|
||||
static plStatusLog* dbgLog;
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
static bool usePythonDebugger;
|
||||
static bool requestedExit;
|
||||
static plCyDebServer debugServer;
|
||||
@ -228,7 +228,7 @@ public:
|
||||
//
|
||||
static pyKey* GetpyKeyFromPython(PyObject* pkey);
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
|
||||
static bool UsePythonDebugger() { return usePythonDebugger; }
|
||||
static void UsePythonDebugger(bool use) { usePythonDebugger = use; }
|
||||
|
||||
|
Reference in New Issue
Block a user