Skip to content

Commit

Permalink
Add flatpak-spawn support for more TeX Live executables (texstudio-or…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Wilms authored Feb 17, 2024
1 parent e81785b commit b467815
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/buildmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2388,14 +2388,16 @@ void ProcessX::startCommand()
QStringList cmd_elements = cmd.split(" ");

if (!cmd_elements.isEmpty()) {
QDir texlive_flatpak_dir("/app/texlive/bin");
QString executable = cmd_elements.first();

QString executable_path = texlive_flatpak_dir.filePath(executable);
QString executable = cmd_elements.first();

// Check if the executable exists
QFileInfo fileInfo(executable_path);
if (fileInfo.isFile() and executable.indexOf("/") == -1) {
// Check if the executable exists in the TeX Live Flatpak extension
if ((
QFileInfo(QDir("/app/texlive/bin").filePath(executable)).isFile() or
QFileInfo(QDir("/app/texlive/bin/x86_64-linux").filePath(executable)).isFile() or
QFileInfo(QDir("/app/texlive/bin/aarch64-linux").filePath(executable)).isFile()
)
and executable.indexOf("/") == -1) {
// don't change cmd
} else {
cmd = "flatpak-spawn --host "+cmd;
Expand Down

0 comments on commit b467815

Please sign in to comment.