-
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
Load resources from a location relative to the main executable #111
Comments
Looks like it has been implemented in Lines 73 to 97 in e51649a
Thanks @LyzardKing. However, it's not entirely working yet:
Looks like for whatever reason it thinks the application directory
One can temporarily work around this by symlinking
|
Currently Scribus is loading resources (e.g. some of the icons) from a location defined at compile time.
This makes the binary non-relocateable in the filesystem, which means it only works when it is installed to the
$PREFIX
it was compiled for.However, for AppImage, we need to make a bundle that can run from any location in the filesystem.
For the past 2 years, we have been doing a crude binary patch as a workaround:
scribus/AppImage-package/bundle.sh
Lines 89 to 97 in 1ed8577
At execution time, we change to the
usr/
directory inside the AppImage.This causes considerable pain. One cannot, for example, use relative paths to open documents anymore but needs to do things like
Even worse, one cannot use relative paths in Python scripts.
Hence, Scribus should be changed to load resources from a location relative to the main executable.
One could use
QString QCoreApplication::applicationDirPath()
instead and construct a relative path to../share/...
from there. This would have the advantage that for normal installations, nothing would change (all files would stay where they are now) but since they would be referenced relative to the main application, the application would be relocateable.I wonder what is done for macOS, where the application also needs to be relocateable...
The text was updated successfully, but these errors were encountered: