Skip to content
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

Add option -runtime #628

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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=<update string> : Embed update information STRING; if zsyncmake is installed, generate zsync file
-updateinformation=<update string> : Embed update information STRING;
if zsyncmake is installed, generate zsync file
-qtlibinfix=<infix> : Adapt the .so search if your Qt distribution has infix.
-runtime-file=<path> : Runtime file to use. (-runtime-file=<path>/runtime)
-version : Print version statement and exit.

linuxdeployqt takes an application as input and makes it
17 changes: 12 additions & 5 deletions tools/linuxdeployqt/main.cpp
Original file line number Diff line number Diff line change
@@ -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=<update string> : Embed update information STRING; if zsyncmake is installed, generate zsync file";
qInfo() << " -updateinformation=<update string> : Embed update information STRING;";
qInfo() << " if zsyncmake is installed, generate zsync file";
qInfo() << " -qtlibinfix=<infix> : Adapt the .so search if your Qt distribution has infix.";
qInfo() << " -runtime-file=<path> : Runtime file to use. (-runtime-file=<path>/runtime)";
qInfo() << " -version : Print version statement and exit.";
qInfo() << "";
qInfo() << "linuxdeployqt takes an application as input and makes it";
9 changes: 8 additions & 1 deletion tools/linuxdeployqt/shared.cpp
Original file line number Diff line number Diff line change
@@ -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;
Loading