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

Use AppImage path for hash when running as AppImage. #139

Merged
merged 8 commits into from
Sep 20, 2021

Conversation

mklein-de
Copy link
Contributor

When an application is launched as AppImage, each instance is launched
from its own FUSE-mounted filesystem, so each instance has its own
executable path.

The AppImage runtime sets the environment variable APPIMAGE to the
absolute path to the .AppImage file, so we can use the content of this
variable instead of QApplication::applicationFilePath() when set.

Closes #77, #137

When an application is launched as AppImage, each instance is launched
from its own FUSE-mounted filesystem, so each instance has its own
executable path.

The AppImage runtime sets the environment variable APPIMAGE to the
absolute path to the .AppImage file, so we can use the content of this
variable instead of QApplication::applicationFilePath() when set.

Closes itay-grudev#77, itay-grudev#137
singleapplication_p.cpp Outdated Show resolved Hide resolved
Co-authored-by: Hennadii Chernyshchyk <[email protected]>
singleapplication_p.cpp Outdated Show resolved Hide resolved
mklein-de and others added 2 commits September 20, 2021 15:16
itay-grudev
itay-grudev previously approved these changes Sep 20, 2021
@Shatur
Copy link
Collaborator

Shatur commented Sep 20, 2021

Should we check this variable only on Linux? Maybe use #elseif defined(Q_OS_LINUX)?

@itay-grudev
Copy link
Owner

@Shatur I was also thinking whether we should append applicationPath() to the end for consistency. It should be the application path in the local file system.

@Shatur
Copy link
Collaborator

Shatur commented Sep 20, 2021

Sounds good to me!

@Shatur
Copy link
Collaborator

Shatur commented Sep 20, 2021

On second thought I'm not sure about adding application path to the end :) APPIMAGE points to the launched appimage file that is "executable" in this case.

@itay-grudev
Copy link
Owner

@Shatur I added the Q_OS_LINUX check as requested. Can you please do one last review?

singleapplication_p.cpp Outdated Show resolved Hide resolved
Co-authored-by: Hennadii Chernyshchyk <[email protected]>
Shatur
Shatur previously approved these changes Sep 20, 2021
@itay-grudev
Copy link
Owner

Awesome! Thanks @mklein-de!

@itay-grudev itay-grudev merged commit 5fec2df into itay-grudev:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppImage on Ubuntu
3 participants