mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Bundle r2dec into AppImage (#2023)
This commit is contained in:
parent
d88bb43d22
commit
14f830dd81
@ -18,6 +18,9 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- ninja-build
|
||||
before_install:
|
||||
- pyenv global 3.7
|
||||
- pip install meson
|
||||
|
||||
- name: Linux CMake
|
||||
os: linux
|
||||
@ -224,6 +227,7 @@ after_success:
|
||||
cp ../src/translations/*.qm appdir/usr/bin/translations/ &&
|
||||
"$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" appdir &&
|
||||
"$TRAVIS_BUILD_DIR/scripts/r2ghidra.sh" -DCMAKE_INSTALL_PREFIX="`pwd`/appdir/usr" -DBUILD_CUTTER_PLUGIN=ON -DCUTTER_SOURCE_DIR="$TRAVIS_BUILD_DIR" &&
|
||||
"$TRAVIS_BUILD_DIR/scripts/r2dec.sh" --prefix=`pwd`/appdir/usr &&
|
||||
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage" &&
|
||||
chmod a+x linuxdeployqt*.AppImage &&
|
||||
rm -fv "$TRAVIS_BUILD_DIR/cutter-deps/qt/plugins/imageformats/libqjp2.so" &&
|
||||
|
19
scripts/r2dec.sh
Executable file
19
scripts/r2dec.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
||||
|
||||
cd "$SCRIPTPATH/.."
|
||||
|
||||
if [[ ! -d r2dec-js ]]; then
|
||||
git clone --depth 1 https://github.com/wargio/r2dec-js.git
|
||||
fi
|
||||
|
||||
cd r2dec-js
|
||||
rm -rf build
|
||||
mkdir build && cd build
|
||||
meson --buildtype=release --libdir=share/radare2/plugins --datadir=share/radare2/plugins "$@" ../p
|
||||
ninja
|
||||
ninja install
|
||||
|
@ -208,10 +208,16 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
|
||||
#ifdef APPIMAGE
|
||||
{
|
||||
auto sleighHome = QDir(QCoreApplication::applicationDirPath()); // appdir/bin
|
||||
sleighHome.cdUp(); // appdir
|
||||
auto appdir = QDir(QCoreApplication::applicationDirPath()); // appdir/bin
|
||||
appdir.cdUp(); // appdir
|
||||
|
||||
auto sleighHome = appdir;
|
||||
sleighHome.cd("share/radare2/plugins/r2ghidra_sleigh"); // appdir/share/radare2/plugins/r2ghidra_sleigh
|
||||
Core()->setConfig("r2ghidra.sleighhome", sleighHome.absolutePath());
|
||||
|
||||
auto r2decHome = appdir;
|
||||
appdir.cd("share/radare2/plugins/r2dec-js"); // appdir/share/radare2/plugins/r2dec-js
|
||||
qputenv("R2DEC_HOME", appdir.absolutePath().toLocal8Bit());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user