Fix more iaito -> cutter

This commit is contained in:
Maijin 2017-09-25 19:51:49 +02:00
parent 40bd1080f4
commit 9257294727
12 changed files with 84 additions and 66 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
# The final executable after `make clean` # The final executable after `make clean`
iaito cutter
AStyle* AStyle*
# C++ objects and libs # C++ objects and libs

6
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "iaito_win32"] [submodule "cutter_win32"]
path = iaito_win32 path = cutter_win32
url = https://github.com/mrexodia/iaito_win32 url = https://github.com/mrexodia/cutter_win32
[submodule "radare2"] [submodule "radare2"]
path = radare2 path = radare2
url = https://github.com/radare/radare2 url = https://github.com/radare/radare2

View File

@ -1,34 +1,52 @@
language: cpp language: cpp
compiler: gcc
cache: ccache
sudo: require
dist: trusty
cache: ccache
matrix:
include:
- os: osx
before_install:
- brew update
install:
- brew install p7zip ccache
- curl -L -o qt5-mac.sh https://raw.githubusercontent.com/LRFLEW/OpenRCT2Launcher/develop/qt5-mac.sh
- chmod a+x qt5-mac.sh
- export PATH="$PATH:/usr/local/opt/ccache/libexec:$PWD/$(./qt5-mac.sh . base declarative tools webchannel positioning extra-webengine)"
after_success:
# TODO: include radare2/www for the webserver
- macdeployqt cutter.app -dmg
- curl --upload-file ./iai*.dmg https://transfer.sh/cutter-git.$(git rev-parse --short HEAD).dmg
- os: linux
dist: trusty
sudo: required
before_install: before_install:
- sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y - sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y
- sudo apt-get update -qq - sudo apt-get update -qq
install: install:
- sudo apt-get -y install qt56base qt56webengine - sudo apt-get -y install qt56base qt56webengine
- source /opt/qt5*/bin/qt5*-env.sh - source /opt/qt5*/bin/qt5*-env.sh
script:
- git submodule init ; git submodule update
- cd radare2
- sys/install.sh
- cd ..
- mkdir build ; cd build
- qmake PREFIX=/usr APPIMAGE=1 ../src
- make -j4
- mkdir appdir
- sudo make INSTALL_ROOT=appdir install && sudo chown -R $USER appdir
- mkdir -p appdir/usr/share/radare2 && cp -Lr /usr/share/radare2/*-git/ appdir/usr/share/radare2/ && find appdir/
after_success: after_success:
- sudo make INSTALL_ROOT=appdir install
- sudo chown -R $USER appdir
- cp -r /usr/share/radare2 appdir/usr/share/
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt*.AppImage - chmod a+x linuxdeployqt*.AppImage
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=2 - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=2
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -verbose=2 - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -verbose=2
- find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- ls Cut*.AppImage - curl --upload-file ./Iai*.AppImage https://transfer.sh/Cutter-git.$(git rev-parse --short HEAD)-x86_64.AppImage
script:
- git submodule init ; git submodule update
- cd radare2
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
INSTALL_TARGET=install sys/install.sh;
else
LDFLAGS=-headerpad_max_install_names INSTALL_TARGET=install sys/install.sh;
fi
- cd ..
- mkdir build
- cd build
- qmake PREFIX=/usr APPIMAGE=1 ../src
- make -j4

View File

@ -1,6 +1,6 @@
# Cutter [![Build Status](https://travis-ci.org/radareorg/cutter.svg?branch=master)](https://travis-ci.org/radareorg/cutter) # Cutter [![Build Status](https://travis-ci.org/radareorg/cutter.svg?branch=master)](https://travis-ci.org/radareorg/cutter)
A Qt and C++ GUI for radare2 reverse engineering framework (originally Iaito) A Qt and C++ GUI for radare2 reverse engineering framework (originally Cutter)
## Screenshot ## Screenshot

View File

@ -17,16 +17,16 @@ find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui WebEngine WebEngineWidgets
if(WIN32) if(WIN32)
# use radare2 libraries from submodule on windows # use radare2 libraries from submodule on windows
set(IAITO_WIN32_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../cutter_win32") set(CUTTER_WIN32_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../cutter_win32")
list(APPEND CMAKE_PREFIX_PATH "${IAITO_WIN32_DIR}") list(APPEND CMAKE_PREFIX_PATH "${CUTTER_WIN32_DIR}")
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bit if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bit
list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib64") list(APPEND CMAKE_LIBRARY_PATH "${CUTTER_WIN32_DIR}/radare2/lib64")
else() else()
list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib32") list(APPEND CMAKE_LIBRARY_PATH "${CUTTER_WIN32_DIR}/radare2/lib32")
endif() endif()
set(RADARE2_INCLUDE_DIRS "${IAITO_WIN32_DIR}/radare2/include/libr" "${IAITO_WIN32_DIR}/include") set(RADARE2_INCLUDE_DIRS "${CUTTER_WIN32_DIR}/radare2/include/libr" "${CUTTER_WIN32_DIR}/include")
endif() endif()
@ -46,11 +46,11 @@ include(QMakeProParse)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cutter.pro" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cutter.pro"
"${CMAKE_CURRENT_BINARY_DIR}/cutter.pro" "${CMAKE_CURRENT_BINARY_DIR}/cutter.pro"
COPYONLY) # trigger reconfigure if cutter.pro changes COPYONLY) # trigger reconfigure if cutter.pro changes
parse_qmake_pro("${CMAKE_CURRENT_BINARY_DIR}/cutter.pro" IAITO_PRO) parse_qmake_pro("${CMAKE_CURRENT_BINARY_DIR}/cutter.pro" CUTTER_PRO)
set(SOURCE_FILES ${IAITO_PRO_SOURCES}) set(SOURCE_FILES ${CUTTER_PRO_SOURCES})
set(HEADER_FILES ${IAITO_PRO_HEADERS}) set(HEADER_FILES ${CUTTER_PRO_HEADERS})
set(UI_FILES ${IAITO_PRO_FORMS}) set(UI_FILES ${CUTTER_PRO_FORMS})
set(QRC_FILES ${IAITO_PRO_RESOURCES}) set(QRC_FILES ${CUTTER_PRO_RESOURCES})
message(STATUS "sources from cutter.pro: ${SOURCE_FILES}") message(STATUS "sources from cutter.pro: ${SOURCE_FILES}")
message(STATUS "headers from cutter.pro: ${HEADER_FILES}") message(STATUS "headers from cutter.pro: ${HEADER_FILES}")
@ -58,10 +58,10 @@ message(STATUS "forms from cutter.pro: ${UI_FILES}")
message(STATUS "resources from cutter.pro: ${QRC_FILES}") message(STATUS "resources from cutter.pro: ${QRC_FILES}")
set(IAITO_VERSION_SUFFIX "-dev") set(CUTTER_VERSION_SUFFIX "-dev")
set(IAITO_VERSION_FULL "${PROJECT_VERSION}${IAITO_VERSION_SUFFIX}") set(CUTTER_VERSION_FULL "${PROJECT_VERSION}${CUTTER_VERSION_SUFFIX}")
message(STATUS "Building Cutter version ${IAITO_VERSION_FULL}") message(STATUS "Building Cutter version ${CUTTER_VERSION_FULL}")
add_definitions("-DAPP_VERSION=\"${IAITO_VERSION_FULL}\"") add_definitions("-DAPP_VERSION=\"${CUTTER_VERSION_FULL}\"")
add_executable(cutter ${UI_FILES} ${QRC_FILES} ${SOURCE_FILES} ${HEADER_FILES}) add_executable(cutter ${UI_FILES} ${QRC_FILES} ${SOURCE_FILES} ${HEADER_FILES})

View File

@ -49,7 +49,7 @@ CutterCore::CutterCore(QObject *parent) :
r_core_loadlibs(this->core_, R_CORE_LOADLIBS_ALL, NULL); r_core_loadlibs(this->core_, R_CORE_LOADLIBS_ALL, NULL);
// IMPLICIT r_bin_iobind (core_->bin, core_->io); // IMPLICIT r_bin_iobind (core_->bin, core_->io);
// Otherwise r2 may ask the user for input and Iaito would freeze // Otherwise r2 may ask the user for input and Cutter would freeze
config("scr.interactive", "false"); config("scr.interactive", "false");
// Used by the HTML5 graph // Used by the HTML5 graph
@ -808,7 +808,7 @@ QStringList CutterCore::getAsmPluginNames()
QStringList ret; QStringList ret;
RAsmPlugin *ap; RAsmPlugin *ap;
IaitoRListForeach(core_->assembler->plugins, it, RAsmPlugin, ap) CutterRListForeach(core_->assembler->plugins, it, RAsmPlugin, ap)
{ {
ret << ap->name; ret << ap->name;
} }
@ -823,7 +823,7 @@ QStringList CutterCore::getAnalPluginNames()
QStringList ret; QStringList ret;
RAnalPlugin *ap; RAnalPlugin *ap;
IaitoRListForeach(core_->anal->plugins, it, RAnalPlugin, ap) CutterRListForeach(core_->anal->plugins, it, RAnalPlugin, ap)
{ {
ret << ap->name; ret << ap->name;
} }
@ -934,7 +934,7 @@ QList<SymbolDescription> CutterCore::getAllSymbols()
RBinSymbol *bs; RBinSymbol *bs;
if (core_ && core_->bin && core_->bin->cur && core_->bin->cur->o) if (core_ && core_->bin && core_->bin->cur && core_->bin->cur->o)
{ {
IaitoRListForeach(core_->bin->cur->o->symbols, it, RBinSymbol, bs) CutterRListForeach(core_->bin->cur->o->symbols, it, RBinSymbol, bs)
{ {
QString type = QString(bs->bind) + " " + QString(bs->type); QString type = QString(bs->bind) + " " + QString(bs->type);
SymbolDescription symbol; SymbolDescription symbol;
@ -948,7 +948,7 @@ QList<SymbolDescription> CutterCore::getAllSymbols()
/* list entrypoints as symbols too */ /* list entrypoints as symbols too */
int n = 0; int n = 0;
RBinAddr *entry; RBinAddr *entry;
IaitoRListForeach(core_->bin->cur->o->entries, it, RBinAddr, entry) CutterRListForeach(core_->bin->cur->o->entries, it, RBinAddr, entry)
{ {
SymbolDescription symbol; SymbolDescription symbol;
symbol.vaddr = entry->vaddr; symbol.vaddr = entry->vaddr;
@ -995,7 +995,7 @@ QList<RelocDescription> CutterCore::getAllRelocs()
RBinReloc *br; RBinReloc *br;
if (core_ && core_->bin && core_->bin->cur && core_->bin->cur->o) if (core_ && core_->bin && core_->bin->cur && core_->bin->cur->o)
{ {
IaitoRListForeach(core_->bin->cur->o->relocs, it, RBinReloc, br) CutterRListForeach(core_->bin->cur->o->relocs, it, RBinReloc, br)
{ {
RelocDescription reloc; RelocDescription reloc;
@ -1024,7 +1024,7 @@ QList<StringDescription> CutterCore::getAllStrings()
RBinString *bs; RBinString *bs;
if (core_ && core_->bin && core_->bin->cur && core_->bin->cur->o) if (core_ && core_->bin && core_->bin->cur && core_->bin->cur->o)
{ {
IaitoRListForeach(core_->bin->cur->o->strings, it, RBinString, bs) CutterRListForeach(core_->bin->cur->o->strings, it, RBinString, bs)
{ {
StringDescription str; StringDescription str;
str.vaddr = bs->vaddr; str.vaddr = bs->vaddr;

View File

@ -22,7 +22,7 @@
#define HAVE_LATEST_LIBR2 false #define HAVE_LATEST_LIBR2 false
#define IaitoRListForeach(list, it, type, x) \ #define CutterRListForeach(list, it, type, x) \
if (list) for (it = list->head; it && ((x=(type*)it->data)); it = it->n) if (list) for (it = list->head; it && ((x=(type*)it->data)); it = it->n)
#define __alert(x) QMessageBox::question (this, "Alert", QString(x), QMessageBox::Ok) #define __alert(x) QMessageBox::question (this, "Alert", QString(x), QMessageBox::Ok)

View File

@ -155,13 +155,13 @@ unix {
PREFIX = /usr/local PREFIX = /usr/local
} }
icon_file = img/iaito-small.png icon_file = img/cutter-small.png
share_pixmaps.path = $$PREFIX/share/pixmaps share_pixmaps.path = $$PREFIX/share/pixmaps
share_pixmaps.files = $$icon_file share_pixmaps.files = $$icon_file
desktop_file = iaito.desktop desktop_file = cutter.desktop
# built-in no need for files atm # built-in no need for files atm
target.path = $$PREFIX/bin target.path = $$PREFIX/bin
@ -173,12 +173,12 @@ unix {
# Triggered for example by 'qmake APPIMAGE=1' # Triggered for example by 'qmake APPIMAGE=1'
!isEmpty(APPIMAGE){ !isEmpty(APPIMAGE){
# UGLY work around for the logo name in iaito.desktop # UGLY work around for the logo name in cutter.desktop
# Would be better to have a file called iaito.png in the first place # Would be better to have a file called cutter.png in the first place
system(cp img/iaito-small.png $$OUT_PWD/iaito-small.png) system(cp img/cutter-small.png $$OUT_PWD/cutter-small.png)
appimage_root.path = / appimage_root.path = /
appimage_root.files = $$OUT_PWD/iaito.png $$desktop_file appimage_root.files = $$OUT_PWD/cutter.png $$desktop_file
INSTALLS += appimage_root INSTALLS += appimage_root
} }

View File

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Iaitō Name=Cutter
Exec=iaito Exec=cutter
Icon=iaito-small Icon=cutter-small
Categories=Development; Categories=Development;

View File

@ -1,12 +1,12 @@
win32 { win32 {
DEFINES += _CRT_NONSTDC_NO_DEPRECATE DEFINES += _CRT_NONSTDC_NO_DEPRECATE
DEFINES += _CRT_SECURE_NO_WARNINGS DEFINES += _CRT_SECURE_NO_WARNINGS
INCLUDEPATH += "$$PWD/../iaito_win32/include" INCLUDEPATH += "$$PWD/../cutter_win32/include"
INCLUDEPATH += "$$PWD/../iaito_win32/radare2/include/libr" INCLUDEPATH += "$$PWD/../cutter_win32/radare2/include/libr"
!contains(QT_ARCH, x86_64) { !contains(QT_ARCH, x86_64) {
LIBS += -L"$$PWD/../iaito_win32/radare2/lib32" LIBS += -L"$$PWD/../cutter_win32/radare2/lib32"
} else { } else {
LIBS += -L"$$PWD/../iaito_win32/radare2/lib64" LIBS += -L"$$PWD/../cutter_win32/radare2/lib64"
} }
LIBS += \ LIBS += \

View File

@ -23,7 +23,7 @@ void RadareWebServer::start()
QProcessEnvironment env(QProcessEnvironment::systemEnvironment()); QProcessEnvironment env(QProcessEnvironment::systemEnvironment());
if (env.contains("APPIMAGE") && env.contains("APPDIR") && env.contains("OWD")) if (env.contains("APPIMAGE") && env.contains("APPDIR") && env.contains("OWD"))
{ {
// pretty sure now iaito runs as AppImage // pretty sure now cutter runs as AppImage
//QString defaultPath("/usr/share/radare2/1.5.0-git/www"); //QString defaultPath("/usr/share/radare2/1.5.0-git/www");
QString defaultHttpRoot(core->config("http.root")); QString defaultHttpRoot(core->config("http.root"));

View File

@ -55,7 +55,7 @@
<file>img/icons/transfer_white.svg</file> <file>img/icons/transfer_white.svg</file>
<file>img/icons/spin_light.svg</file> <file>img/icons/spin_light.svg</file>
<file>img/logo2.png</file> <file>img/logo2.png</file>
<file>img/iaito-small.png</file> <file>img/cutter-small.png</file>
<file>img/logo-small-white.png</file> <file>img/logo-small-white.png</file>
<file>img/icons/import_light.svg</file> <file>img/icons/import_light.svg</file>
<file>fonts/Anonymous Pro.ttf</file> <file>fonts/Anonymous Pro.ttf</file>