Std AddonMgr: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Update to cover the 0.20 Addon Manager)
(42 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:26-->
{{Docnav
|[[Std_DlgCustomize|DlgCustomize]]
|
|[[Std_Tools_Menu|Std Tools Menu]]
|IconL=Std_DlgCustomize.svg
|IconR=
|IconC=Freecad.svg
}}

<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Std AddonMgr
|Name=Std AddonMgr
|Icon=AddonManager.svg
|MenuLocation=Tools → Addon manager
|MenuLocation=Tools → Addon manager
|Workbenches=''None''
|Workbenches=All
|SeeAlso=[[Macros|Macros]], [[External workbenches|External workbenches]]
|Version=0.17
|Version=0.17
|SeeAlso=[[External_workbenches|External workbenches]], [[Macros|Macros]]
}}
}}

==Description== <!--T:25-->


<!--T:2-->
<!--T:2-->
The '''Addon Manager''' is a tool to install and manage [[external workbenches|external workbenches]] and [[macros|macros]] provided by the FreeCAD community. If the [https://github.com/gitpython-developers/GitPython git-python] package is installed on your computer, the Addon Manager will make use of it to update installed workbenches, making downloads faster.
The '''Std AddonMgr''' command opens the Addon manager. With the Addon manager you can install and manage [[external_workbenches|external workbenches]], [[macros|macros]], and [[Preference_Packs|preference packs]] provided by the FreeCAD community. By default the available addons are taken from two repositories, [https://github.com/FreeCAD/FreeCAD-addons/ FreeCAD-addons] and from the [[Macros_recipes|Macros recipes]] page. If GitPython and git are installed on the system, additional macros will be loaded from [https://github.com/FreeCAD/FreeCAD-macros/ FreeCAD-macros]. Custom repositories can be added in the Addon Manager's preference page.


<!--T:10-->
<!--T:42-->
Due to changes to the GitHub platform in the year 2020 the Addon manager no longer works if you use FreeCAD version 0.17 or earlier. You need to upgrade to version [https://github.com/FreeCAD/FreeCAD/releases/tag/0.18.5 0.18.5] or later. Alternatively you can install addons manually, see [[#Notes|Notes]] below.
The lists of installable workbenches and macros are taken from two repositories, [https://github.com/FreeCAD/FreeCAD-addons/ FreeCAD-addons] and [https://github.com/FreeCAD/FreeCAD-macros/ FreeCAD-macros], respectively, and from the [[Macros recipes|Macros recipes]].


</translate>
[[Image:Std_AddonMgr_dialog.png|600px]]
<translate>
<!--T:4-->
<!--T:4-->
{{Caption|The v0.20 Addon manager dialog box}}
[[Image:Addon_Manager_example.png]]
{{Caption|Interface of the [[Addon Manager|Addon Manager]]}}


== How to use == <!--T:5-->
==Usage== <!--T:5-->


<!--T:6-->
<!--T:6-->
* Open the tool in the menu {{MenuCommand|Tools → Addon manager}}.
# Select the {{MenuCommand|Tools → [[Image:Std_AddonMgr.svg|16px]] Addon manager}} option from the menu.
# If you are using the Addon manager for the first time, a dialog box will open warning you that the addons in the Addon manager are not officially part of FreeCAD. It also presents several options related to the Addon manager's data usage. Adjust those options to your liking and press the {{Button|OK}} button to confirm and continue.
* To install a workbench: scroll through the list and select the add-on; a short description, as well as its home page, will be displayed below the list. Press the {{Button|Install/update}} button to install the new tool. For macros, click on the {{MenuCommand|Macros}} tab and repeat the steps.
# The Addon manager dialog box opens. For more information see [[#Options|Options]].
* To remove a workbench or a macro: scroll through the list, select the add-on, and then press the {{Button|Remove}} button.
# If you have installed or updated a workbench a new dialog box will open informing you that you have to restart FreeCAD for the changes to take effect.
* To update a workbench or a macro: scroll through the list, select the add-on, and then press the {{Button|Install/update}} button.
* To check for updates: press the {{Button|[[File:Std Refresh.png|16px]] Refresh}} button; available updates will be reported below the list. Press the {{Button|[[File:Std Refresh.png|16px]] Refresh}} button again to install all updates at once. {{Emphasis|Note:}} the icon may look different depending on your operating system.
* To run a macro: first install the desired macro, then select it again on the list, and then press the {{Button|Execute}} button. The macro is automatically edited in the FreeCAD macro editor, to visualize the code.
* Press {{Button|Close}} to exit the manager.


=== Manual installation === <!--T:11-->
==Options== <!--T:27-->
If you don't use the Addon Manager, you can install the new tools manually by placing their code in your user's {{incode|FreeCAD/}} directory. See the following links for details:
* [[How to install macros|How to install macros]]
* [[How to install additional workbenches|How to install additional workbenches]]


[[File:AddonManager relnotes 0.20.png]]
== Limitations == <!--T:7-->


# The Addon manager provides two view layouts: "Condensed" and "Expanded". In "Condensed" view, each addon takes a single line, and its description is truncated to fit the available space. "Expanded" shows additional details, including more of the description text as well as maintainer information, more installation details, etc.
<!--T:8-->
# Three different types of addons are supported: [[external_workbenches|workbenches]], [[macros|macros]], and [[Preference_Packs|preference packs]]. You can choose to show just one type, or all of them in a single list.
* These add-ons are not part of the official FreeCAD program and are not supported by the core FreeCAD development team. You should read the information provided on each add-on's home page to make sure you know what you are installing.
# The list can be limited to show just installed packages, just packages with available updates, or just packages that are not yet installed.
# The list can be filtered, searching for a keyword in the title, description, and tags (description and tags must be specified by the addon developer in their addon's metadata). The filter can even be a regular expression, for fine-grained control of the exact search term.
# The expanded view shows available version information, description, maintainer information, and installation version information, for packages that provide a [[Package_Metadata|package metadata]] file (or for macros with embedded metadata).
# Addon data is cached locally, with a variable cache update frequency set in the user preferences. At any time you can choose to manually update your local cache to see the latest updates available for each addon.
# Update checks may be set up to be automatic, or done manually via a button click (configured in user preferences). If GitPython and git are installed on your system then update information is fetched using git. If not, then update information is obtained from any present metadata file.


Clicking on an Addon in this view brings up the Addon's Details page:
<!--T:9-->
* Bug reports and feature requests should be made directly to the creator of the add-on by visiting the indicated website. Many add-on authors are regular users of the [https://forum.freecadweb.org FreeCAD forum], and can be contacted there.


[[File:AddonDetails 0.20.png]]
<!--T:17-->
* The web addresses of the repositories for add-ons and macros are hard coded into the AddonManager. As this application is written in Python, experienced users can change these locations by editing the appropriate fields in


The details page shows the buttons allowing installing, uninstalling, updating, and temporarily disabling an Addon. For installed Addons it lists the currently installed version and the installation date, and whether that is the most recent version available. Below is an embedded web browser window showing the Addon's README page (for workbenches and preference packs), or Wiki page (for macros).
</translate>
{{Code|code=
$ROOT/Mod/AddonManager/AddonManager.py
}}
<translate>


==Preferences==
<!--T:18-->
where {{incode|$ROOT}} is the installation directory of FreeCAD in your particular system, for example,
* Linux: {{incode|/usr/lib/freecad/Mod/AddonManager/AddonManager.py}}
* Windows: {{Incode|C:\Program Files\FreeCAD version\Mod\AddonManager.py}}


Preferences for the FreeCAD 0.20 Addon Manager can be found in its [[Addon Manager Preferences|preference page]].
== New workbenches and macros == <!--T:12-->


<!--T:13-->
==Notes== <!--T:35-->
If you developed a workbench or macro, and want to see it included in the Addon Manager, read how to do that on the repository pages ([https://github.com/FreeCAD/FreeCAD-addons/ FreeCAD-addons] and [https://github.com/FreeCAD/FreeCAD-macros/ FreeCAD-macros]). If you add your macro to the [[Macros recipes|Macros recipes]], there is nothing else to do, it will automatically be picked by the Addon Manager.


<!--T:14-->
<!--T:36-->
* The use of addons is not restricted to the FreeCAD version they were installed from. You will also be able to use them in any other FreeCAD version, supported by the addon, that you may have on your system.
For python workbenches, you don't need any specific approval to have your workbench added to the Addon Manager and, being outside the FreeCAD source code, you can choose the license you want. If you request for your workbench to be added to the list (we will not add any new workbench without a request from its authors), either by asking so on the forum or by opening an issue on the [https://github.com/FreeCAD/FreeCAD-addons/ FreeCAD-addons] repository, your code will stay on your own git repository, we will just add it as a submodule to the [https://github.com/FreeCAD/FreeCAD-addons/ FreeCAD-addons] repository. Of course, before adding your workbench, we will take a look at it and make sure there is nothing potentially problematic with it.
* The addons available in the Addon manager are not part of the official FreeCAD program and are not supported by the core FreeCAD development team. You should read the provided information carefully to make sure you know what you are installing.
* Bug reports and feature requests should be made directly to the creator of the addon by visiting the indicated website. Many addon developers are regular users of the [https://forum.freecadweb.org FreeCAD forum], and can also be contacted there.
* If the [https://github.com/gitpython-developers/GitPython GitPython] package is installed on your computer the Addon manager will make use of it, making downloads faster.
* You can also install addons manually. See [[How_to_install_additional_workbenches|How to install additional workbenches]] and [[How_to_install_macros|How to install macros]].


<!--T:15-->
==Information for developers== <!--T:37-->
If you develop a workbench in C++, it cannot be run directly by users and must be compiled first. You then have 2 options, either you provide precompiled versions of your workbench yourself, for the different operating systems, or you should request to have your code merged into the FreeCAD source code. For that, you should use the LGPL license (or fully compatible like MIT or BSD), and you must present your new tools to the community in the [https://forum.freecadweb.org FreeCAD forum] for review. Once your code has been tested and approved, you should fork the FreeCAD repository, if not done yet, create a new branch, push your code to it, and open a pull request so that your branch is merged into the main repository.


See [[Addon#Information_for_developers|Addon]].
== Testing the Addon Manager == <!--T:20-->
{{VeryImportantMessage|This section is for developers}}
The Addon Manager is coded in Python so it's possible to change the source code without compiling it. More specifically, testing requires modifying the code in <tt>FreeCAD/src/Mod/AddonManager</tt> and simply re-running FreeCAD.


<!--T:21-->
<!--T:40-->
{{Docnav
To test downloading capability of the Addon Manager you can simulate a need to download say, a previous version of a workbench via the CLI. In the following example we'll use the Assembly2+ workbench (or [[A2plus_Workbench|A2plus]] for short):
|[[Std_DlgCustomize|DlgCustomize]]

|
</translate>
|[[Std_Tools_Menu|Std Tools Menu]]
{{Code|code=
|IconL=Std_DlgCustomize.svg
cd ~/FreeCAD/Mod/A2plus/
|IconR=
git reset --hard "v0.4.21"
|IconC=Freecad.svg
}}
}}
<translate>

<!--T:22-->
CLI output should show '''HEAD is now at b2c53a4 Merge pull request #281 from kbwbe/devel'''

<!--T:16-->
What we essentially did was use a previous release tag to reset the version.
Now, in the Addon Manager refresh the list of workbenches and it should show that the A2plus workbench is using an inferior version.
{{Userdocnavi}}

<!--T:19-->
[[Category:Addons]]


</translate>
</translate>
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

Revision as of 18:43, 17 June 2022

Std AddonMgr

Menu location
Tools → Addon manager
Workbenches
All
Default shortcut
None
Introduced in version
0.17
See also
External workbenches, Macros

Description

The Std AddonMgr command opens the Addon manager. With the Addon manager you can install and manage external workbenches, macros, and preference packs provided by the FreeCAD community. By default the available addons are taken from two repositories, FreeCAD-addons and from the Macros recipes page. If GitPython and git are installed on the system, additional macros will be loaded from FreeCAD-macros. Custom repositories can be added in the Addon Manager's preference page.

Due to changes to the GitHub platform in the year 2020 the Addon manager no longer works if you use FreeCAD version 0.17 or earlier. You need to upgrade to version 0.18.5 or later. Alternatively you can install addons manually, see Notes below.

File:Std AddonMgr dialog.png

The v0.20 Addon manager dialog box

Usage

  1. Select the Tools → Addon manager option from the menu.
  2. If you are using the Addon manager for the first time, a dialog box will open warning you that the addons in the Addon manager are not officially part of FreeCAD. It also presents several options related to the Addon manager's data usage. Adjust those options to your liking and press the OK button to confirm and continue.
  3. The Addon manager dialog box opens. For more information see Options.
  4. If you have installed or updated a workbench a new dialog box will open informing you that you have to restart FreeCAD for the changes to take effect.

Options

File:AddonManager relnotes 0.20.png

  1. The Addon manager provides two view layouts: "Condensed" and "Expanded". In "Condensed" view, each addon takes a single line, and its description is truncated to fit the available space. "Expanded" shows additional details, including more of the description text as well as maintainer information, more installation details, etc.
  2. Three different types of addons are supported: workbenches, macros, and preference packs. You can choose to show just one type, or all of them in a single list.
  3. The list can be limited to show just installed packages, just packages with available updates, or just packages that are not yet installed.
  4. The list can be filtered, searching for a keyword in the title, description, and tags (description and tags must be specified by the addon developer in their addon's metadata). The filter can even be a regular expression, for fine-grained control of the exact search term.
  5. The expanded view shows available version information, description, maintainer information, and installation version information, for packages that provide a package metadata file (or for macros with embedded metadata).
  6. Addon data is cached locally, with a variable cache update frequency set in the user preferences. At any time you can choose to manually update your local cache to see the latest updates available for each addon.
  7. Update checks may be set up to be automatic, or done manually via a button click (configured in user preferences). If GitPython and git are installed on your system then update information is fetched using git. If not, then update information is obtained from any present metadata file.

Clicking on an Addon in this view brings up the Addon's Details page:

File:AddonDetails 0.20.png

The details page shows the buttons allowing installing, uninstalling, updating, and temporarily disabling an Addon. For installed Addons it lists the currently installed version and the installation date, and whether that is the most recent version available. Below is an embedded web browser window showing the Addon's README page (for workbenches and preference packs), or Wiki page (for macros).

Preferences

Preferences for the FreeCAD 0.20 Addon Manager can be found in its preference page.

Notes

  • The use of addons is not restricted to the FreeCAD version they were installed from. You will also be able to use them in any other FreeCAD version, supported by the addon, that you may have on your system.
  • The addons available in the Addon manager are not part of the official FreeCAD program and are not supported by the core FreeCAD development team. You should read the provided information carefully to make sure you know what you are installing.
  • Bug reports and feature requests should be made directly to the creator of the addon by visiting the indicated website. Many addon developers are regular users of the FreeCAD forum, and can also be contacted there.
  • If the GitPython package is installed on your computer the Addon manager will make use of it, making downloads faster.
  • You can also install addons manually. See How to install additional workbenches and How to install macros.

Information for developers

See Addon.