XDG Base Directory Specification

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: XDG Base Directory Specification

Post by chennes »

Do you have that path specified as the custom user macro directory in your user.cfg file?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: XDG Base Directory Specification

Post by wmayer »

chennes wrote: Fri Nov 12, 2021 6:24 pm Do you think I should implement migration from the old location to the new, for pre-existing installed mods?
If you want you can do that.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: XDG Base Directory Specification

Post by adrianinsaval »

chennes wrote: Sat Nov 13, 2021 4:57 pm Do you have that path specified as the custom user macro directory in your user.cfg file?
What parameter should I check? I remember adding the macro path for icons so I can put some macros in toolbars with icons located in the macro folder, would that affect that?
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: XDG Base Directory Specification

Post by chennes »

adrianinsaval wrote: Sat Nov 13, 2021 10:23 pm What parameter should I check?
Preferences/Macro/MacroPath
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: XDG Base Directory Specification

Post by adrianinsaval »

Ok, it's set to ~/.FreeCAD/Macro but I don't remember ever setting that up manually, any idea how it got set? Should that be automatically changed by FreeCAD? Does anybody else even have this parameter set without their intervention?
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: XDG Base Directory Specification

Post by chennes »

It's set every time you open the Macro dialog (DlgMacroExecuteImp) -- my guess is it's unintentional, the code that does it is in the function that handles changes to the fileChooser (on_fileChooser_fileNameChanged). The problem is that signal is getting emitted when the filename is set programmatically at the launch of the dialog. I'm guessing that was not intended.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: XDG Base Directory Specification

Post by wmayer »

git commit d5726bd7af5f9a restores /tmp for temporary files (App.getTempPath()) and adds a new function to access the path to the cache (App.getUserCachePath()). At the moment only the document's transient directory will be created in the cache directory.

With git commit 973642285e1b00d8 a periodic check at program start is performed to check the size of the cache directory and if it exceeds a certain limit a dialog pops up to allow the user to clean it up.

The check is done once per week because it could take quite a while and the limit at the moment is 1GB. Both values are hard-coded and the next step is to implement to make it configurable.
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: XDG Base Directory Specification

Post by chennes »

I'm now testing a modification to PR 5131 so that the Addon Manager uses the new cache location for its cached metadata and README files, that should be ready to go soon.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: XDG Base Directory Specification

Post by wmayer »

wmayer wrote: Mon Nov 15, 2021 10:57 pm Both values are hard-coded and the next step is to implement to make it configurable.
git commit ed03e8ded5
user1234
Veteran
Posts: 3332
Joined: Mon Jul 11, 2016 5:08 pm

Re: XDG Base Directory Specification

Post by user1234 »

wmayer wrote: Mon Nov 15, 2021 10:57 pm git commit d5726bd7af5f9a
.....
git commit 973642285e1b00d8
Many many thanks! I no access to FreeCAD now, but when i have it, i will test it.

Greetings
user1234
Post Reply