-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port appimage to linuxdeployqt type2 #98
Changes from all commits
b8f6a09
0f7b3dc
2ac485e
edb5a2b
60b0261
9a50fdd
68b5442
2398c83
3d54814
b715142
e12e51d
e51649a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ for which a new license (GPL+exception) is in place. | |
*/ | ||
#include "scpaths.h" | ||
#include <QApplication> | ||
#include <QCoreApplication> | ||
#include <QDebug> | ||
#include <QDir> | ||
#include <QProcess> | ||
|
@@ -66,6 +67,35 @@ ScPaths::ScPaths() : | |
m_shareDir(SHAREDIR), | ||
m_templateDir(TEMPLATEDIR) | ||
{ | ||
|
||
// Build an appimage and redirect the paths to | ||
// ones inside the bundle, relative to the executable. | ||
#ifdef Q_OS_LINUX | ||
// Set the application name expliticly. | ||
QCoreApplication::setApplicationName("scribus"); | ||
QString pathPtr = QCoreApplication::applicationDirPath() + QString("/.."); | ||
m_shareDir = QString("%1/share/scribus/").arg(pathPtr); | ||
m_docDir = QString("%1/share/doc/scribus/").arg(pathPtr); | ||
//m_fontDir = QString("%1/share/scribus/fonts/").arg(pathPtr); | ||
m_iconDir = QString("%1/share/scribus/icons/").arg(pathPtr); | ||
m_sampleScriptDir = QString("%1/share/scribus/samples/").arg(pathPtr); | ||
m_scriptDir = QString("%1/share/scribus/scripts/").arg(pathPtr); | ||
m_templateDir = QString("%1/share/scribus/templates/").arg(pathPtr); | ||
m_libDir = QString("%1/lib/scribus/").arg(pathPtr); | ||
m_pluginDir = QString("%1/lib/scribus/plugins/").arg(pathPtr); | ||
m_qmlDir = QString("%1/share/scribus/qml/").arg(pathPtr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why should we add a version number in the folders? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is For example, for the Ubuntu PPA I'm providing 3 builds, 'scribus', 'scribus-ng' and 'scribus-trunk', all of them coinstallable. For example, in the latest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why you would be interested in adding a "number", but I am. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I thought it was a value that was not empty by default... |
||
|
||
qDebug() << QString("scpaths: doc dir=%1").arg(m_docDir); | ||
qDebug() << QString("scpaths: icon dir=%1").arg(m_iconDir); | ||
//qDebug() << QString("scpaths: font dir=%1").arg(m_fontDir); | ||
qDebug() << QString("scpaths: sample dir=%1").arg(m_sampleScriptDir); | ||
qDebug() << QString("scpaths: script dir=%1").arg(m_scriptDir); | ||
qDebug() << QString("scpaths: template dir=%1").arg(m_templateDir); | ||
qDebug() << QString("scpaths: lib dir=%1").arg(m_libDir); | ||
qDebug() << QString("scpaths: plugins dir=%1").arg(m_pluginDir); | ||
qDebug() << QString("scpaths: qml dir=%1").arg(m_qmlDir); | ||
#endif | ||
|
||
// On MacOS/X, override the compile-time settings with a location | ||
// obtained from the system. | ||
#ifdef Q_OS_MAC | ||
|
@@ -94,8 +124,9 @@ ScPaths::ScPaths() : | |
qDebug() << QString("scpaths: plugin dir=%1").arg(m_pluginDir); | ||
qDebug() << QString("scpaths: QML dir=%1").arg(m_qmlDir); | ||
qDebug() << QString("scpaths: qtplugins=%1").arg(QApplication::libraryPaths().join(":")); | ||
#endif | ||
|
||
#elif defined(_WIN32) | ||
#ifdef defined(_WIN32) | ||
QFileInfo appInfo(qApp->applicationDirPath()); | ||
QString appPath = qApp->applicationDirPath(); | ||
QString cleanAppPath = appInfo.canonicalFilePath(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the goal of this? Are you imagining occasions where the default of "executable name" is wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that because the file configs were set in a different location every time I installed a new version.
I can't remember now (I told @aoloe in irc a while back) but I believe the folders were named
scribus-<version>
or similarThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this fixed it? It feels weird, I would love to have more details about this… @aoloe ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the details should be somewhere in irc...
The issue is that there was no application name set properly...
we could test this again if you want..