[Solved]Appimage can't find toolbits, then overwrites the library

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

[Solved]Appimage can't find toolbits, then overwrites the library

Post by pathfinder »

Hello,

I have my toolsettings in a custom path. When I load up FreeCAD as an Appimage and open the Toolbits dialog (The three drills icon in the Tool selector window), it only displays the one standard toolbit I imported and that has a different path than the others. When I close the dialog, it overwrites the old file without a prompt, effectively removing all my entries.

If I overwrite the file from the outside however, the tools show up in the tool selector and I can use and import them without issues.

Another slight annoyance is that in the Job setup dialog, tools aren't updated unless I click the "remove" button (usually to remove the default tool).

Version info:

OS: Arch Linux (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 9162733)
Hash: 91627338a44371fe9a8e815b4900f62558af98a1
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)
Last edited by pathfinder on Fri Jan 28, 2022 8:22 pm, edited 1 time in total.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Appimage can't find toolbits, then overwrites the library

Post by onekk »

AppImage is not persistent, so every change not put in a user directory is not preserved, maybe if you expand and AppImage and use the squashfs... directly, but it is not an usual way.

If you duplicate Tools sudirectories in subdir of your "FreeCAD user directory", changes will survive.

It will be not overwritten.

I have tried to resume some of my findings in a thread, some relevant intervention maybe:

https://forum.freecadweb.org/viewtopic. ... 54#p547854

https://forum.freecadweb.org/viewtopic. ... 61#p547961

More general about changes.

https://forum.freecadweb.org/viewtopic.php?f=15&t=39869

Only to start, now I have no time to find the proper post on which @sliptonic has explained the new way versus old way, if my mind is not damaged it was about creation of custom tollshapes or simila argument.

Hope it helps

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Appimage can't find toolbits, then overwrites the library

Post by pathfinder »

onekk wrote: Tue Jan 25, 2022 9:39 am AppImage is not persistent, so every change not put in a user directory is not preserved, maybe if you expand and AppImage and use the squashfs... directly, but it is not an usual way.

If you duplicate Tools sudirectories in subdir of your "FreeCAD user directory", changes will survive.

It will be not overwritten.
Hm, ok, I'm not sure if this is really the issue I'm having here. The Appimage does overwrite the library, even though it is not in its usual path. It "forgetting " the path is also instant, I don't have to close and reopen the program to have this issue, it's there the whole time.

Also, my Appimage creates and uses a config directory, so it doesn't "forget everything" when I close it. I just have issues with the toolsettings.

I could try to unwrap the Appimage and put the toolsettings in there, but the issue for me specifically is that I use multiple versions of Freecad (the official and Linkstage3) and I'd like them to share the same tool library. Interestingly enough, LS3 doesn't overwrite the library when closing (and no, the file paths are not in Linkstage, they are in a not very common path outside of regular program directories).

As far as I can tell, the problem from the programs side is that it instantly "forgets" where to find the toolshapes and therefore assumes they don't exist, except for the ones which are in the default path, which is why it doesn't overwrite them, only the ones with custom paths.

I think something like a "overwrite library?" prompt would be very helpful here, or maybe just don't overwrite the library at all.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Appimage can't find toolbits, then overwrites the library

Post by GeneFC »

The user.cfg file keep track of most recent folder and similar items related to the tool library.

If you are using two different locations for the user.cfg that is likely related to the problem.

I run many different FreeCAD versions (on Windows), but I make sure I always use the same user.cfg file. Otherwise, "stuff happens".

If you keep the versions absolutely separate there will be no problem. But that is not always easy to ensure.

Gene
bmsaus4ax
Posts: 255
Joined: Sat Nov 14, 2020 9:16 pm
Location: Bargara, Queensland, Australia UTC+10

Re: Appimage can't find toolbits, then overwrites the library

Post by bmsaus4ax »

pathfinder wrote: Tue Jan 25, 2022 7:08 pm
As far as I can tell, the problem from the programs side is that it instantly "forgets" where to find the toolshapes and therefore assumes they don't exist, except for the ones which are in the default path, which is why it doesn't overwrite them, only the ones with custom paths.
One option that works for me is to edit the Tools -> Edit Parameters -> Preferences -> Mod -> Path entries.
.
preferences.png
preferences.png (129.68 KiB) Viewed 1907 times
.
put the path to your custom directories in the "Value" field for "LastFileToolLibrary" , "LastPathToolBit", "LastPathToolLibrary","LastPathToolShape".
You can enter these items as New if they do not exist, but they should already if you have created and used tools and libraries and done anything with a Job. Until you edit them the will probably reference the default installation directories.

The edited values should persist through all updates via the Update utility BUT, they have to be re-entered if you download a fresh AppImage as is sometimes required when update is having issues.
.
OS: Ubuntu 20.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.27078 (Git) AppImage
Build type: Release
Branch: (HEAD detached at bcdd926)
Hash: bcdd926686f2245fe60baface1cce1ab3dff7a5b
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/Australia (en_AU)
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Appimage can't find toolbits, then overwrites the library

Post by GeneFC »

bmsaus4ax wrote: Wed Jan 26, 2022 1:19 am One option that works for me is to edit the Tools -> Edit Parameters -> Preferences -> Mod -> Path entries.
Good advice.

That is basically a GUI for user.cfg. Editing user.cfg directly can be tricky.

Gene
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Appimage can't find toolbits, then overwrites the library

Post by pathfinder »

Thanks all,

I currently don't find the time to sift through the solutions you provided, but I'm sure one of them works. I'll mark it as solved.
Post Reply