mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-21 14:16:08 +00:00
Fix build without Python
This commit is contained in:
parent
40274e4bf4
commit
950f24eaf3
@ -96,11 +96,13 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CUTTER_ENABLE_PYTHON
|
||||||
// Init python
|
// Init python
|
||||||
if (cmd_parser.isSet(pythonHomeOption)) {
|
if (cmd_parser.isSet(pythonHomeOption)) {
|
||||||
Python()->setPythonHome(cmd_parser.value(pythonHomeOption));
|
Python()->setPythonHome(cmd_parser.value(pythonHomeOption));
|
||||||
}
|
}
|
||||||
Python()->initialize();
|
Python()->initialize();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
bool analLevelSpecified = false;
|
bool analLevelSpecified = false;
|
||||||
@ -170,9 +172,13 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
|
|
||||||
CutterApplication::~CutterApplication()
|
CutterApplication::~CutterApplication()
|
||||||
{
|
{
|
||||||
|
#ifdef CUTTER_ENABLE_PYTHON
|
||||||
Plugins()->destroyPlugins();
|
Plugins()->destroyPlugins();
|
||||||
|
#endif
|
||||||
delete mainWindow;
|
delete mainWindow;
|
||||||
|
#ifdef CUTTER_ENABLE_PYTHON
|
||||||
Python()->shutdown();
|
Python()->shutdown();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CutterApplication::event(QEvent *e)
|
bool CutterApplication::event(QEvent *e)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
#ifdef CUTTER_ENABLE_PYTHON
|
||||||
|
|
||||||
#include "PythonAPI.h"
|
#include "PythonAPI.h"
|
||||||
#include "Cutter.h"
|
#include "Cutter.h"
|
||||||
|
|
||||||
@ -195,3 +197,5 @@ PyObject *PyInit_api_internal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // CUTTER_ENABLE_JUPYTER
|
#endif // CUTTER_ENABLE_JUPYTER
|
||||||
|
|
||||||
|
#endif // CUTTER_ENABLE_PYTHON
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef PYTHONMANAGER_H
|
#ifndef PYTHONMANAGER_H
|
||||||
#define PYTHONMANAGER_H
|
#define PYTHONMANAGER_H
|
||||||
|
|
||||||
|
#ifdef CUTTER_ENABLE_PYTHON
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
class CutterPythonPlugin;
|
|
||||||
typedef struct _ts PyThreadState;
|
typedef struct _ts PyThreadState;
|
||||||
typedef struct _object PyObject;
|
typedef struct _object PyObject;
|
||||||
|
|
||||||
@ -52,4 +53,6 @@ private:
|
|||||||
|
|
||||||
#define Python() (PythonManager::getInstance())
|
#define Python() (PythonManager::getInstance())
|
||||||
|
|
||||||
|
#endif // CUTTER_ENABLE_PYTHON
|
||||||
|
|
||||||
#endif // PYTHONMANAGER_H
|
#endif // PYTHONMANAGER_H
|
||||||
|
Loading…
Reference in New Issue
Block a user