- fix paths creation (e.g. fonts loading) by: * 0001-Revert-AppImage-build-on-GitHub-Actions-with-go-appi.patch * 0002-Revert-RS_System-getDirectoryList-add-plugins-folder.patch * 0003-Revert-fix-RS_System-getDirectoryList-use-relative-p.patch (did the revert and waiting for the upstream fix) OBS-URL: https://build.opensuse.org/request/show/943411 OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=62
84 lines
3.3 KiB
Diff
84 lines
3.3 KiB
Diff
From: Jiri Slaby <jslaby@suse.cz>
|
|
Date: Sat, 1 Jan 2022 17:34:34 +0100
|
|
Subject: Revert "AppImage - build on GitHub Actions, with go-appimage tool"
|
|
Patch-mainline: waiting for fix
|
|
References: paths fix
|
|
|
|
This reverts commit a64f1f481cd3316e9cce79beeeafd59faf67b703, it breaks
|
|
paths construction.
|
|
|
|
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
---
|
|
librecad/src/lib/engine/rs_system.cpp | 12 +++++-------
|
|
librecad/src/lib/engine/rs_system.h | 2 +-
|
|
2 files changed, 6 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/librecad/src/lib/engine/rs_system.cpp b/librecad/src/lib/engine/rs_system.cpp
|
|
index 2093f31c79a0..9103eff3302c 100644
|
|
--- a/librecad/src/lib/engine/rs_system.cpp
|
|
+++ b/librecad/src/lib/engine/rs_system.cpp
|
|
@@ -3,7 +3,6 @@
|
|
** This file is part of the LibreCAD project, a 2D CAD program
|
|
**
|
|
** Copyright (C) 2010 R. van Twisk (librecad@rvt.dds.nl)
|
|
-** Copyright (C) 2021 A. Stebich (librecad@mail.lordofbikes.de)
|
|
** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
|
|
**
|
|
**
|
|
@@ -61,6 +60,7 @@ void RS_System::init(const QString& appName, const QString& appVersion,
|
|
else {
|
|
this->appDir = appDir;
|
|
}
|
|
+ binDir = QCoreApplication::applicationDirPath();
|
|
|
|
RS_DEBUG->print("RS_System::init: System %s initialized.", appName.toLatin1().data());
|
|
RS_DEBUG->print("RS_System::init: App dir: %s", appDir.toLatin1().data());
|
|
@@ -570,20 +570,18 @@ QStringList RS_System::getDirectoryList(const QString& _subDirectory) {
|
|
}
|
|
|
|
#ifdef Q_OS_UNIX
|
|
- RS_DEBUG->print( RS_Debug::D_ERROR, "RS_System::getDirectoryList: %s", appDir.toStdString().c_str());
|
|
+ RS_DEBUG->print( RS_Debug::D_ERROR, "RS_System::getDirectoryList: %s", binDir.toStdString().c_str());
|
|
// for AppImage use relative paths from executable
|
|
// from packet manager the executable is in /usr/bin
|
|
// in AppImage the executable is APPDIR/usr/bin
|
|
// so this should work for paket manager and AppImage distribution
|
|
- dirList.append( QDir::cleanPath( appDir + "/../share/doc/" + appDirName + "/" + subDirectory));
|
|
+ dirList.append( QDir::cleanPath( binDir + "/../share/doc/" + appDirName + "/" + subDirectory));
|
|
|
|
// Redhat style:
|
|
- dirList.append( QDir::cleanPath( appDir + "/../share/" + appDirName + "/" + subDirectory));
|
|
- // Debian style:
|
|
- dirList.append( QDir::cleanPath( appDir + "/../lib/" + appDirName + "/" + subDirectory));
|
|
+ dirList.append( QDir::cleanPath( binDir + "/../share/" + appDirName + "/" + subDirectory));
|
|
|
|
if (QStringLiteral( "plugins") == subDirectory) {
|
|
- dirList.append( QDir::cleanPath( appDir + "/../lib/" + appDirName));
|
|
+ dirList.append( QDir::cleanPath( binDir + "/../lib/" + appDirName));
|
|
}
|
|
#endif
|
|
|
|
diff --git a/librecad/src/lib/engine/rs_system.h b/librecad/src/lib/engine/rs_system.h
|
|
index 3342f63722b5..745ffdbde646 100644
|
|
--- a/librecad/src/lib/engine/rs_system.h
|
|
+++ b/librecad/src/lib/engine/rs_system.h
|
|
@@ -3,7 +3,6 @@
|
|
** This file is part of the LibreCAD project, a 2D CAD program
|
|
**
|
|
** Copyright (C) 2010 R. van Twisk (librecad@rvt.dds.nl)
|
|
-** Copyright (C) 2021 A. Stebich (librecad@mail.lordofbikes.de)
|
|
** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
|
|
**
|
|
**
|
|
@@ -198,6 +197,7 @@ protected:
|
|
QString appVersion;
|
|
QString appDirName;
|
|
QString appDir;
|
|
+ QString binDir;
|
|
|
|
QStringList languageList; //< List of available translations
|
|
bool initialized;
|
|
--
|
|
2.34.1
|
|
|