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 flatpak name to FreeCAD core so it displays in the About dialog if built as flatpak #119

Closed
luzpaz opened this issue May 5, 2023 · 11 comments · Fixed by FreeCAD/FreeCAD#17794

Comments

@luzpaz
Copy link

luzpaz commented May 5, 2023

The FreeCAD About dialog currently will list AppImage or Snap but not flatpak:

https://github.com/FreeCAD/FreeCAD/blob/8d1c9c256318cba56e6cdabefad7445fc0badfb0/src/Gui/Splashscreen.cpp#L751-L757

Shall we add it ?

@adrianinsaval
Copy link
Collaborator

We can, I assume those are environment variables, what are the expected contents of the variables?

@adrianinsaval
Copy link
Collaborator

I'm not sure if it's needed though, since in the os info it shows it's running on flatpak, for example:

OS: KDE Flatpak runtime (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git)
Build type: Release
Branch: (HEAD detached at 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.10.6, Qt 5.15.8, Coin 4.0.0, Vtk 8.2.0, OCC 7.6.3
Locale: German/Switzerland (de_CH)
Installed mods: 

@adrianinsaval
Copy link
Collaborator

we can check for existence of FLATPAK_ID env variable if desired

@luzpaz
Copy link
Author

luzpaz commented May 5, 2023

    char *appimage = getenv("APPIMAGE");
    if (appimage)
        str << " AppImage";
    char* snap = getenv("SNAP_REVISION");
    if (snap)
        str << " Snap " << snap;
    str << '\n';

Aside:
Any idea why the asterisks sometimes on the char and sometimes on the pointer name ?

char *appimage Vs char* snap

@hfiguiere
Copy link
Contributor

we can check for existence of FLATPAK_ID env variable if desired

it's better to check for the /.flatpak-info file.

@easyw
Copy link

easyw commented May 17, 2023

in Snap it seems there is an additional info like:
Version: 0.20.2.29177 +426 (Git) Snap 517
it would be useful also in FlatPack, to allow WB coders to adapt the code in case of Flat or Snap versions.
I don't know if there is any other way to get this info inside FreeCAD python console
EDIT: Is there a way to collect and invoke about Info inside FreeCAD python console?

@luzpaz
Copy link
Author

luzpaz commented May 17, 2023

EDIT: Is there a way to collect and invoke about Info inside FreeCAD python console?

@easyw see https://forum.freecad.org/viewtopic.php?p=678285&sid=3c0c01d73465a17e9d9c6f3828e00678#p678285

@easyw
Copy link

easyw commented May 18, 2023

@luzpaz
thanks a lot 😄

@adrianinsaval
Copy link
Collaborator

flatpak is already mentioned in the OS field so I consider this unnecessary

@adrianinsaval adrianinsaval closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2024
@luzpaz
Copy link
Author

luzpaz commented Nov 6, 2024

@adrianinsaval i disagree... if someone is scanning a list of different About infos in a row having the flatpak text in the same place where snap is helpful and not redudant.

@luzpaz
Copy link
Author

luzpaz commented Nov 11, 2024

Thank you!

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 a pull request may close this issue.

4 participants