need info about Preference Packs

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: need info about Preference Packs

Post by uwestoehr »

kaktus wrote: Thu Dec 09, 2021 4:29 pm It lacks the options I have highlighted.
Indeed. I updated it now.
Is this now OK for both of you?
(I reduced its size since on my laptop the image was too large and I think also with the smaller size all info is there.)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: need info about Preference Packs

Post by uwestoehr »

Roy_043 wrote: Thu Dec 09, 2021 7:37 pm Another new feature seems to be the "Manage..." button:
https://wiki.freecadweb.org/File:Prefer ... eneral.png
Interesting since I made this screenshot not long ago. But in today's master it is not there.
@chennes? What could be the reason?

also @chennes, I made a test package and not I want to delete this, so that it does not appear in the list anymore. How is this done?
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: need info about Preference Packs

Post by kaktus »

thanks

:)
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: need info about Preference Packs

Post by chennes »

Roy_043 wrote: Thu Dec 09, 2021 7:37 pm Another new feature seems to be the "Manage..." button:
https://wiki.freecadweb.org/File:Prefer ... eneral.png
The manage button is temporarily gone while I rewrite the Addon Manager.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: need info about Preference Packs

Post by chennes »

uwestoehr wrote: Thu Dec 09, 2021 7:48 pm also @chennes, I made a test package and not I want to delete this, so that it does not appear in the list anymore. How is this done?
Soon, via the Addon Manager :) -- but for now you have to manually delete the folder and its entry in the package.xml file.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Chrismettal
Posts: 43
Joined: Fri Sep 18, 2020 11:44 am
Location: Germany
Contact:

Re: need info about Preference Packs

Post by Chrismettal »

Do I understand correctly that the addon manager currently does not distribute Preference packs yet? Or is the addon manager list just empty because there isn't a central repository for preference packs yet? Is there an example on how a preference pack should be packaged for distribution yet?

Would like to start adding the "Behave Dark" colors in a preference pack. I know for my personal machines I am able to copy the file manually but maybe it is already possible to add a correctly packaged Pack as a "custom repository" for the addon manager?
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: need info about Preference Packs

Post by chennes »

To the Addon Manager, a Preference Pack is just another sort of thing that can be inside an Addon -- so they are distributed identically to Workbenches. See the documentation for that in the README file here: https://github.com/FreeCAD/FreeCAD-addo ... /README.md

The Addon Manager doesn't show any right now because no one has created one for distribution yet :) -- I feared a chicken-or-egg problem there, so made sure to implement the ability to install them right away, even before there were any to install. Please by all means feel free to remedy that situation, I think making a pack for a stylesheet and related color choices is a perfect first test, and I am more than happy to assist with any questions you have.

At its core, you just need three things:
  1. A user.config-formatted file stripped to only the settings you want to distribute
  2. A package.xml file describing the Addon
  3. Possibly the stylesheet file itself, unless you are relying on one that is installed with FreeCAD already
See the documentation here: https://wiki.freecadweb.org/Preference_Packs

I'd also recommend making an Icon for the Addon Manager to display, but that is optional.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Chrismettal
Posts: 43
Joined: Fri Sep 18, 2020 11:44 am
Location: Germany
Contact:

Re: need info about Preference Packs

Post by Chrismettal »

Nice, got it.

I just finished initially transposing all PartDesign/Sketcher/Console colors into ones that fit the Behave stylesheet and will try to package it for the addon manager.

Would an icon need to merged into the FreeCAD source as described in the FreeCAD-addons repo README?
Are preference packs added to the same FreeCAD-addons repo as a submodule?
Are there seperate repo tags for preference packs? I see workbenches use "freecad, addons, workbench". Would the last tag be replaced with "preferencepack" or something similar?
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: need info about Preference Packs

Post by chennes »

Chrismettal wrote: Sun Jan 30, 2022 5:01 pm Would an icon need to merged into the FreeCAD source as described in the FreeCAD-addons repo README?
No -- that was only necessary for 0.19 and before -- as of 0.20 you no longer need to submit the icon, the Addon Manager will download it based on the information in the package.xml file. And since you don't need to support 0.19 with your Addon, you don't need to worry about it.

Are preference packs added to the same FreeCAD-addons repo as a submodule?
Yes.

Are there seperate repo tags for preference packs? I see workbenches use "freecad, addons, workbench". Would the last tag be replaced with "preferencepack" or something similar?
The <tag> element is totally arbitrary, it can be literally any text you want. IMO, there is no point in using any of those tags you just listed, they don't add any information. For yours I suggest something like "theme" and/or "stylesheet". The only thing that matters for making FreeCAD aware that it is a preference pack is that the sub-element of the <content> element is <preferencepack>.

ETA: Oh, I think I misunderstood your question, you are asking about tags on your GitHub/Gitlab/whatever repo. We haven't discussed that yet, but I think your suggestion is a good one. Go for it!


Have a look at the example package.xml file on the wiki page about Preference Packs: https://wiki.freecadweb.org/Preference_ ... _structure
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Chrismettal
Posts: 43
Joined: Fri Sep 18, 2020 11:44 am
Location: Germany
Contact:

Re: need info about Preference Packs

Post by Chrismettal »

Awesome, thank you.

I've just submitted the preference pack to the addon manager repo for approval.

The pack itself is pushed here, but does not include an icon yet:
https://github.com/Chrismettal/FreeCAD- ... rence-Pack
Post Reply