Open luzpaz opened 1 year ago
We can, I assume those are environment variables, what are the expected contents of the variables?
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:
we can check for existence of FLATPAK_ID
env variable if desired
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
we can check for existence of
FLATPAK_ID
env variable if desired
it's better to check for the /.flatpak-info
file.
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?
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
@luzpaz thanks a lot 😄
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 ?