mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
Bundle r2dec into AppImage (#2023)
This commit is contained in:
parent
d88bb43d22
commit
14f830dd81
@ -18,6 +18,9 @@ matrix:
|
|||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- ninja-build
|
- ninja-build
|
||||||
|
before_install:
|
||||||
|
- pyenv global 3.7
|
||||||
|
- pip install meson
|
||||||
|
|
||||||
- name: Linux CMake
|
- name: Linux CMake
|
||||||
os: linux
|
os: linux
|
||||||
@ -224,6 +227,7 @@ after_success:
|
|||||||
cp ../src/translations/*.qm appdir/usr/bin/translations/ &&
|
cp ../src/translations/*.qm appdir/usr/bin/translations/ &&
|
||||||
"$TRAVIS_BUILD_DIR/scripts/appimage_embed_python.sh" appdir &&
|
"$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/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" &&
|
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage" &&
|
||||||
chmod a+x linuxdeployqt*.AppImage &&
|
chmod a+x linuxdeployqt*.AppImage &&
|
||||||
rm -fv "$TRAVIS_BUILD_DIR/cutter-deps/qt/plugins/imageformats/libqjp2.so" &&
|
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
|
#ifdef APPIMAGE
|
||||||
{
|
{
|
||||||
auto sleighHome = QDir(QCoreApplication::applicationDirPath()); // appdir/bin
|
auto appdir = QDir(QCoreApplication::applicationDirPath()); // appdir/bin
|
||||||
sleighHome.cdUp(); // appdir
|
appdir.cdUp(); // appdir
|
||||||
|
|
||||||
|
auto sleighHome = appdir;
|
||||||
sleighHome.cd("share/radare2/plugins/r2ghidra_sleigh"); // appdir/share/radare2/plugins/r2ghidra_sleigh
|
sleighHome.cd("share/radare2/plugins/r2ghidra_sleigh"); // appdir/share/radare2/plugins/r2ghidra_sleigh
|
||||||
Core()->setConfig("r2ghidra.sleighhome", sleighHome.absolutePath());
|
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
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user