Fix path when building appimage, caused by #2574

This commit is contained in:
Kārlis Seņko 2021-04-02 15:21:02 +03:00 committed by Florian Märkl
parent fe3a93cce0
commit 8c659feb43
3 changed files with 4 additions and 13 deletions

View File

@ -167,7 +167,7 @@ jobs:
-appimage \
-no-strip -exclude-libs=libnss3.so,libnssutil3.so,libqjp2.so \
-ignore-glob=usr/lib/python3.9/**/* \
-ignore-glob=usr/share/RizinOrg/Cutter/plugins/native/librz_ghidra_cutter.so \
-ignore-glob=usr/share/rizin/cutter/plugins/native/librz_ghidra_cutter.so \
-verbose=2
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
export APPIMAGE_FILE="Cutter-${PACKAGE_ID}-x64.Linux.AppImage"

View File

@ -1,4 +1,4 @@
set(CUTTER_DIR_NAME "RizinOrg/Cutter")
set(CUTTER_DIR_NAME "rizin/cutter")
if(WIN32)
set(CMAKE_INSTALL_BINDIR "." CACHE PATH "Executable install directory")
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "Include install directory")

View File

@ -11,6 +11,7 @@
#include "CutterPlugin.h"
#include "CutterConfig.h"
#include "common/Helpers.h"
#include "common/ResourcePaths.h"
#include <QDir>
#include <QCoreApplication>
@ -95,21 +96,11 @@ void PluginManager::destroyPlugins()
QVector<QDir> PluginManager::getPluginDirectories() const
{
QVector<QDir> result;
QStringList locations = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
QStringList locations = Cutter::standardLocations(QStandardPaths::AppDataLocation);
for (auto &location : locations) {
result.push_back(QDir(location).filePath("plugins"));
}
#ifdef APPIMAGE
{
auto plugdir = QDir(QCoreApplication::applicationDirPath()); // appdir/bin
plugdir.cdUp(); // appdir
if (plugdir.cd("share/RizinOrg/Cutter/plugins")) { // appdir/share/RizinOrg/Cutter/plugins
result.push_back(plugdir);
}
}
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) && defined(Q_OS_UNIX)
QChar listSeparator = ':';
#else