1

I have an application written in Qt/C++ which is running under Linux. Inside my application I have several functions which dealing with files located in:

  • QCoreApplication::applicationDirPath()
  • /tmp/
  • QStandardPaths::ConfigLocation
  • QStandardPaths::DataLocation

The application runs smoothly if executes as regular Linux executable. However there are problems if I pack it into AppImage. It doesn't see files in expected locations and can't create new files in there. If I understand AppImage correctly - it is SquashFS which is readonly. So this behavior is understandable. But how can I deal with? Is that possible to solve this problem without changing source code of my app?

The output of QCoreApplication::applicationFilePath() when run the Linux executable is "/home/mike/projects/builds/build-testqtapp-Desktop_Qt_5_12_8_GCC_64bit-Debug/AppDir/testqtapp" The output of the same command from AppImage is "/tmp/.mount_testqtyEZUuH/testqtapp"

Mike
  • 519
  • 1
  • 4
  • 10
  • 1
    why do you care about the path to the executable? Thats not where you should be putting data files. Show the actual code you are having a problem with. – stark Dec 09 '22 at 13:52
  • The executable is looking for some files just near itself. I can revise it in the code, but I don't want to change it.. – Mike Dec 09 '22 at 18:15

0 Answers0