Discussion: State of the snap (Snap Packaging)

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

Kunda1 wrote: Sun Dec 19, 2021 1:15 pm BTW, can you make a badge for the snap edge that specifies the current revision number ?
The only thing the store offers in this regard is this embeddable summary page: https://snapcraft.io/freecad-ppd/embedd ... nshot=true
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
andyk
Posts: 11
Joined: Wed Oct 28, 2020 12:48 am

Re: Discussion: State of the snap (Snap Packaging)

Post by andyk »

hey ppd, wonderful package thanks for all this effort to get it working so well.

is there a possibility that the package to include a hook to symlink /home/$USER/.FreeCAD to /home/$USER/snap/freecad-ppd/common ? i feel like having the configurations and workbenches synced is nice.
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

Hello andyk, thanks for the flowers.

Due to the security model of snaps, accessing hidden directories ("dot") in the home folder is forbidden. One can request an exemption for directories, but that has to be granted by the store admins, and it would most likely only be read access then. As this snap is not the official snap, I'm not sure even read access would be granted.

So I can't do that (easily), I'm afraid. Sorry.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
andyk
Posts: 11
Joined: Wed Oct 28, 2020 12:48 am

Re: Discussion: State of the snap (Snap Packaging)

Post by andyk »

hi again, big congrats on getting maintainership over the official snap.

i'm having trouble getting it to load custom macros. not workbenches, and not most other things, but specifically a Path WB post processor that loads find from the .FreeCAD/Macro directory in other versions. any idea?
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

Can you describe your use case in the steps you take, i.e. what actions you perform, what you expect to happen, and what actually happens instead?

If I'm understanding this right, you put a postprocessor plugin in /home/user/.FreeCAD/Macro, but it won't show up in the UI, correct?
Try /home/user/snap/freecad/common/.FreeCAD/Macro instead.

Snaps have their own home to make them independent of each other. They can still access non-hidden files in your home directory, but fundamentally, they store their stuff in $HOME/snap/<snap_name>.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
andyk
Posts: 11
Joined: Wed Oct 28, 2020 12:48 am

Re: Discussion: State of the snap (Snap Packaging)

Post by andyk »

Ah, this morning I figured it out. Under "Preferences" > "General" > "Macro" tab > "Macro Path" I didn't have that path configured, so it was pointing just at the top level /$HOME/snap/freecad/common directory.

Thanks again for this great work, it's really nice to see so many good options for packaging FreeCAD.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by Kunda1 »

andyk wrote: Wed May 18, 2022 7:18 pm Ah, this morning I figured it out. Under "Preferences" > "General" > "Macro" tab > "Macro Path" I didn't have that path configured, so it was pointing just at the top level /$HOME/snap/freecad/common directory.
Need to locate this in the Snap configs. Would you mind opening a ticket on https://github.com/FreeCAD/FreeCAD-snap/issues ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by adrianinsaval »

The way that parameter is handled by FreeCAD really needs some changes
@wmayer @chennes I'm thinki9ng about this parameter again
First, it shouldn't be saved on the config file unless manually set by the user but it gets written the first time you open the macro dialog, this causes problems when migrating config, if you copy 0.19 config to the 0.20 location and then remove the .FreeCAD folder suddenly the saved macro path is invalid, same can happen if you copy from une user to another. There's no reason to save a default path in the config file. And in this case it seems it gets set to the incorrect location for snaps.
Also, does it really make sense to override the default path with the one from the parameter, isn't it more desirable to add as an additional search path instead?

At least the first part I consider a bug, should I create a ticket for this?
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by adrianinsaval »

@Kunda1 @ppd the official snap page recommends the realthunder snap at the bottom of the page, I assume this was there for the ppd version and remained there, but is it still appropriate for the official page of FreeCAD? I have nothing against the realthunder branch but at least the wording should be changed IMO.

On the other hand the realthunder snap page talks about the unofficial freecad-ppd, perhaps it's better to change it to point to the official page now.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by Kunda1 »

+1
will modify

Edit:done
Just need to getb@realthunder to update the real thunder snap to point at the official FreeCAD snap
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply