mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-20 13:46:06 +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
|
||||
if (cmd_parser.isSet(pythonHomeOption)) {
|
||||
Python()->setPythonHome(cmd_parser.value(pythonHomeOption));
|
||||
}
|
||||
Python()->initialize();
|
||||
#endif
|
||||
|
||||
|
||||
bool analLevelSpecified = false;
|
||||
@ -170,9 +172,13 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
|
||||
CutterApplication::~CutterApplication()
|
||||
{
|
||||
#ifdef CUTTER_ENABLE_PYTHON
|
||||
Plugins()->destroyPlugins();
|
||||
#endif
|
||||
delete mainWindow;
|
||||
#ifdef CUTTER_ENABLE_PYTHON
|
||||
Python()->shutdown();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CutterApplication::event(QEvent *e)
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
#ifdef CUTTER_ENABLE_PYTHON
|
||||
|
||||
#include "PythonAPI.h"
|
||||
#include "Cutter.h"
|
||||
|
||||
@ -195,3 +197,5 @@ PyObject *PyInit_api_internal()
|
||||
}
|
||||
|
||||
#endif // CUTTER_ENABLE_JUPYTER
|
||||
|
||||
#endif // CUTTER_ENABLE_PYTHON
|
@ -1,9 +1,10 @@
|
||||
#ifndef PYTHONMANAGER_H
|
||||
#define PYTHONMANAGER_H
|
||||
|
||||
#ifdef CUTTER_ENABLE_PYTHON
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class CutterPythonPlugin;
|
||||
typedef struct _ts PyThreadState;
|
||||
typedef struct _object PyObject;
|
||||
|
||||
@ -52,4 +53,6 @@ private:
|
||||
|
||||
#define Python() (PythonManager::getInstance())
|
||||
|
||||
#endif // CUTTER_ENABLE_PYTHON
|
||||
|
||||
#endif // PYTHONMANAGER_H
|
||||
|
Loading…
Reference in New Issue
Block a user