mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
compile and run on Windows
This commit is contained in:
parent
a42db155ea
commit
b26d506b58
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "iaito_win32"]
|
||||||
|
path = iaito_win32
|
||||||
|
url = https://github.com/mrexodia/iaito_win32
|
1
iaito_win32
Submodule
1
iaito_win32
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit bdacfe0a3b44cca6b2c4f7a35228fd3343fc471f
|
@ -10,7 +10,11 @@ ICON = img/Enso.icns
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
# The application version
|
# The application version
|
||||||
VERSION = 1.0-dev
|
win32 {
|
||||||
|
VERSION = 1.0
|
||||||
|
} else {
|
||||||
|
VERSION = 1.0-dev
|
||||||
|
}
|
||||||
|
|
||||||
# Define the preprocessor macro to get the application version in our application.
|
# Define the preprocessor macro to get the application version in our application.
|
||||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||||
@ -36,6 +40,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|||||||
TARGET = iaito
|
TARGET = iaito
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
INCLUDEPATH += ./
|
||||||
|
|
||||||
SOURCES += main.cpp\
|
SOURCES += main.cpp\
|
||||||
mainwindow.cpp \
|
mainwindow.cpp \
|
||||||
newfiledialog.cpp \
|
newfiledialog.cpp \
|
||||||
@ -130,8 +136,22 @@ FORMS += mainwindow.ui \
|
|||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
resources.qrc
|
resources.qrc
|
||||||
|
|
||||||
#INCLUDEPATH += /usr/local/radare2/osx/include/libr
|
win32 {
|
||||||
INCLUDEPATH += /usr/local/include/libr
|
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
|
||||||
INCLUDEPATH += /usr/include/libr
|
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||||
#LIBS += -L/usr/local/radare2/osx/lib -lr_core -lr_config -lr_cons -lr_io -lr_util -lr_flag -lr_asm -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic -lr_crypto
|
INCLUDEPATH += "$$PWD/../iaito_win32/include"
|
||||||
LIBS += -L/usr/local/lib -lr_core -lr_config -lr_cons -lr_io -lr_util -lr_flag -lr_asm -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic -lr_crypto
|
INCLUDEPATH += "$$PWD/../iaito_win32/radare2/include/libr"
|
||||||
|
!contains(QMAKE_HOST.arch, x86_64) {
|
||||||
|
LIBS += -L"$$PWD/../iaito_win32/radare2/lib32"
|
||||||
|
} else {
|
||||||
|
LIBS += -L"$$PWD/../iaito_win32/radare2/lib64"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
#INCLUDEPATH += /usr/local/radare2/osx/include/libr
|
||||||
|
INCLUDEPATH += /usr/local/include/libr
|
||||||
|
INCLUDEPATH += /usr/include/libr
|
||||||
|
#LIBS += -L/usr/local/radare2/osx/lib -lr_core -lr_config -lr_cons -lr_io -lr_util -lr_flag -lr_asm -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic -lr_crypto
|
||||||
|
LIBS += -L/usr/local/lib
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS += -lr_core -lr_config -lr_cons -lr_io -lr_util -lr_flag -lr_asm -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic -lr_crypto
|
||||||
|
@ -136,7 +136,8 @@ QString QRCore::cmd(const QString &str) {
|
|||||||
//r_cons_flush();
|
//r_cons_flush();
|
||||||
char *res = r_core_cmd_str (this->core, cmd);
|
char *res = r_core_cmd_str (this->core, cmd);
|
||||||
QString o = (res && *res)? QString::fromUtf8(res): QString();
|
QString o = (res && *res)? QString::fromUtf8(res): QString();
|
||||||
free (res);
|
//r_mem_free was added in https://github.com/radare/radare2/commit/cd28744049492dc8ac25a1f2b3ba0e42f0e9ce93
|
||||||
|
r_mem_free(res);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
src/qrcore.h
11
src/qrcore.h
@ -6,8 +6,19 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
//Workaround for compile errors on Windows
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <r2hacks.h>
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
#include "r_core.h"
|
#include "r_core.h"
|
||||||
|
|
||||||
|
//Workaround for compile errors on Windows.
|
||||||
|
#ifdef _WIN32
|
||||||
|
#undef min
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
#define HAVE_LATEST_LIBR2 false
|
#define HAVE_LATEST_LIBR2 false
|
||||||
|
|
||||||
#define QRListForeach(list, it, type, x) \
|
#define QRListForeach(list, it, type, x) \
|
||||||
|
Loading…
Reference in New Issue
Block a user