Include and meson fixes

Fix QDir include in PythonManager

Fix cassert include

Fix assert include in PluginManager.cpp
This commit is contained in:
Florian Märkl 2019-02-18 14:33:44 +01:00
parent 70e7840e75
commit acca40b978
4 changed files with 15 additions and 4 deletions

View File

@ -48,7 +48,7 @@ before_build:
# Build config # Build config
build_script: build_script:
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat CUTTER_ENABLE_PYTHON=true CUTTER_ENABLE_PYTHON_BINDINGS=false CUTTER_ENABLE_JUPYTER=true CUTTER_ENABLE_QTWEBENGINE=false CUTTER_APPVEYOR_R2DEC=true ) - cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat CUTTER_ENABLE_PYTHON=true CUTTER_ENABLE_PYTHON_BINDINGS=false CUTTER_ENABLE_JUPYTER=true CUTTER_ENABLE_QTWEBENGINE=false CUTTER_APPVEYOR_R2DEC=true )
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter ) - cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --python --jupyter )
after_build: after_build:
- cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist_%ARCH%;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" ) - cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist_%ARCH%;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" )

View File

@ -47,9 +47,10 @@ def win_dist(args):
def build(args): def build(args):
cutter_builddir = os.path.join(ROOT, args.dir) cutter_builddir = os.path.join(ROOT, args.dir)
if not os.path.exists(cutter_builddir): if not os.path.exists(cutter_builddir):
defines = [] defines = ['-Denable_python=%s' % str(args.python).lower(),
defines.append('-Denable_jupyter=%s' % str(args.jupyter).lower()) '-Denable_python_bindings=%s' % str(args.python_bindings).lower(),
defines.append('-Denable_webengine=%s' % str(args.webengine).lower()) '-Denable_jupyter=%s' % str(args.jupyter).lower(),
'-Denable_webengine=%s' % str(args.webengine).lower()]
if os.name == 'nt': if os.name == 'nt':
defines.append('-Dradare2:r2_incdir=radare2/include') defines.append('-Dradare2:r2_incdir=radare2/include')
defines.append('-Dradare2:r2_libdir=radare2/lib') defines.append('-Dradare2:r2_libdir=radare2/lib')
@ -74,6 +75,10 @@ def main():
default='ninja', help='Choose build backend') default='ninja', help='Choose build backend')
parser.add_argument('--dir', default='build', parser.add_argument('--dir', default='build',
help='Destination build directory') help='Destination build directory')
parser.add_argument('--python', action='store_true',
help='Enable Python support')
parser.add_argument('--python-bindings', action='store_true',
help='Enable Python Bindings')
parser.add_argument('--jupyter', action='store_true', parser.add_argument('--jupyter', action='store_true',
help='Enable Jupyter support') help='Enable Jupyter support')
parser.add_argument('--webengine', action='store_true', parser.add_argument('--webengine', action='store_true',

View File

@ -1,5 +1,7 @@
#ifdef CUTTER_ENABLE_PYTHON #ifdef CUTTER_ENABLE_PYTHON
#include <cassert>
#include "PythonAPI.h" #include "PythonAPI.h"
#include "PythonManager.h" #include "PythonManager.h"
#include "Cutter.h" #include "Cutter.h"
@ -8,6 +10,8 @@
#include <QDebug> #include <QDebug>
#include <QFile> #include <QFile>
#include <QDebug> #include <QDebug>
#include <QCoreApplication>
#include <QDir>
#include "QtResImporter.h" #include "QtResImporter.h"

View File

@ -1,4 +1,6 @@
#include <cassert>
#ifdef CUTTER_ENABLE_PYTHON_BINDINGS #ifdef CUTTER_ENABLE_PYTHON_BINDINGS
#include <Python.h> #include <Python.h>
#include <cutterbindings_python.h> #include <cutterbindings_python.h>