diff --git a/README.md b/README.md index 92cecef4..9c01b229 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,10 @@ Options: -show-exclude-libs : Print exclude libraries list. -verbose=<0-3> : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug. - -updateinformation= : Embed update information STRING; if zsyncmake is installed, generate zsync file + -updateinformation= : Embed update information STRING; + if zsyncmake is installed, generate zsync file + -qtlibinfix= : Adapt the .so search if your Qt distribution has infix. + -runtime-file= : Runtime file to use. (-runtime-file=/runtime) -version : Print version statement and exit. linuxdeployqt takes an application as input and makes it diff --git a/tools/linuxdeployqt/main.cpp b/tools/linuxdeployqt/main.cpp index 810ba60d..5816baa9 100644 --- a/tools/linuxdeployqt/main.cpp +++ b/tools/linuxdeployqt/main.cpp @@ -75,7 +75,8 @@ int main(int argc, char **argv) extern QStringList ignoreGlob; extern bool copyCopyrightFiles; extern QString updateInformation; - extern QString qtLibInfix; + extern QString qtLibfix; + extern QString runtime; // Check arguments // Due to the structure of the argument parser, we have to check all arguments at first to check whether the user @@ -185,8 +186,12 @@ int main(int argc, char **argv) } else if (argument.startsWith("-qtlibinfix=")) { LogDebug() << "Argument found:" << argument; int index = argument.indexOf("="); - qtLibInfix = QString(argument.mid(index+1)); - } else if (argument.startsWith("--")) { + qtLibfix = QString(argument.mid(index+1)); + } else if (argument.startsWith("-runtime-file=")) { + LogDebug() << "Argument found:" << argument; + int index = argument.indexOf("="); + runtime = QString(argument.mid(index+1)); + }else if (argument.startsWith("--")) { LogError() << "Error: arguments must not start with --, only -:" << argument << "\n"; return 1; } else { @@ -196,7 +201,7 @@ int main(int argc, char **argv) } // We need to catch those errors at the source of the problem - // https://github.com/AppImage/appimage.github.io/search?q=GLIBC&unscoped_q=GLIBC&type=Issues + // https://github.com/appimage.github.io/search?q=GLIBC&unscoped_q=GLIBC&type=Issues const char *glcv = gnu_get_libc_version (); if(skipGlibcCheck) { if(! bundleEverything) { @@ -250,8 +255,10 @@ int main(int argc, char **argv) qInfo() << " -show-exclude-libs : Print exclude libraries list."; qInfo() << " -verbose=<0-3> : 0 = no output, 1 = error/warning (default),"; qInfo() << " 2 = normal, 3 = debug."; - qInfo() << " -updateinformation= : Embed update information STRING; if zsyncmake is installed, generate zsync file"; + qInfo() << " -updateinformation= : Embed update information STRING;"; + qInfo() << " if zsyncmake is installed, generate zsync file"; qInfo() << " -qtlibinfix= : Adapt the .so search if your Qt distribution has infix."; + qInfo() << " -runtime-file= : Runtime file to use. (-runtime-file=/runtime)"; qInfo() << " -version : Print version statement and exit."; qInfo() << ""; qInfo() << "linuxdeployqt takes an application as input and makes it"; diff --git a/tools/linuxdeployqt/shared.cpp b/tools/linuxdeployqt/shared.cpp index e4af7de2..56b0f681 100644 --- a/tools/linuxdeployqt/shared.cpp +++ b/tools/linuxdeployqt/shared.cpp @@ -70,6 +70,7 @@ QStringList ignoreGlob; bool copyCopyrightFiles = true; QString updateInformation; QString qtLibInfix; +QString runtime; using std::cout; using std::endl; @@ -1977,6 +1978,7 @@ bool checkAppImagePrerequisites(const QString &appDirPath) out << "Icon=default\n"; out << "Comment=Edit this default file\n"; out << "Terminal=true\n"; + out << "Categories=Development\n"; file.close(); } @@ -2006,7 +2008,12 @@ int createAppImage(const QString &appDirPath) updateInfoArgument = QString("-u '%1'").arg(updateInformation); } - QString appImageCommand = "appimagetool -v '" + appDirPath + "' -n " + updateInfoArgument; // +"' '" + appImagePath + "'"; + QString runtimeArgument; + if(!runtime.isEmpty()) { + runtimeArgument = QString(" --runtime-file %1").arg(runtime); + } + + QString appImageCommand = "appimagetool -v '" + appDirPath + "' -n " + updateInfoArgument + runtimeArgument; // +"' '" + appImagePath + "'"; LogNormal() << appImageCommand; int ret = system(appImageCommand.toUtf8().constData()); LogNormal() << "ret" << ret;