Add Workbench to Addon Manager: Difference between revisions
(Marked this version for translation) |
No edit summary |
||
Line 17: | Line 17: | ||
<!--T:5--> |
<!--T:5--> |
||
# Open the [[ |
# Open the [[Preferences_Editor|Preferences Editor]]: select the {{MenuCommand|Edit → [[Image:Std_DlgPreferences.svg|16px]] Preferences...}} option from the menu. |
||
# Select the {{MenuCommand|[[Image:Std_AddonMgr.svg|16px]] Addon Manager}} option in the left bar. |
# Select the {{MenuCommand|[[Image:Std_AddonMgr.svg|16px]] Addon Manager}} option in the left bar. |
||
# On the {{MenuCommand|Addon manager options}} tab check the {{MenuCommand|Addon developer mode}} checkbox. This will enable the {{Button|Developer tools...}} button in the Addon Manager. |
# On the {{MenuCommand|Addon manager options}} tab check the {{MenuCommand|Addon developer mode}} checkbox. This will enable the {{Button|Developer tools...}} button in the Addon Manager. |
||
Line 25: | Line 25: | ||
<!--T:7--> |
<!--T:7--> |
||
# Open the [[ |
# Open the [[Std_AddonMgr|Addon Manager]]: select the {{MenuCommand|Tools → [[Image:Std_AddonMgr.svg|16px]] Addon manager}} option from the menu. |
||
# Press the {{Button|Developer tools...}} button. |
# Press the {{Button|Developer tools...}} button. |
||
# The {{MenuCommand|Addon Developer Tools}} dialog opens.<br>[[Image:Addon_Manager_Addon_Developer_Tools_Dialog.png|350px]] |
# The {{MenuCommand|Addon Developer Tools}} dialog opens.<br>[[Image:Addon_Manager_Addon_Developer_Tools_Dialog.png|350px]] |
Revision as of 21:40, 18 November 2022
Introduction
These are step-by-step instructions on how to add a Python workbench to the Addon Manager.
Requirements:
- A local git repository.
- A remote git repository. Supported git hosts are GitHub, GitLab, Framagit and Debian Salsa.
- Git must be installed.
Enable developer mode
- Open the Preferences Editor: select the Edit → Preferences... option from the menu.
- Select the Addon Manager option in the left bar.
- On the Addon manager options tab check the Addon developer mode checkbox. This will enable the Developer tools... button in the Addon Manager.
- Press the OK button to close the Preferences Editor.
Create the package.xml file
- Open the Addon Manager: select the Tools → Addon manager option from the menu.
- Press the Developer tools... button.
- The Addon Developer Tools dialog opens.
- Enter the following:
- Path to Addon: The path to the local git repository.
- Addon Name: This will appear in the listings of the Addon Manager.
- Description: Idem.
- Version: Idem.
- Repository URL
- Primary branch
- README URL: Recommended.
- Icon: The icon must be part of the repository.
- Press the button at the bottom of the dialog.
- The Content Item dialog opens.
- The Content type should be set to
Workbench
. - Check the This is the only item in the Addon checkbox.
- Enter the Workbench class name. This is the class name specified in the InitGui.py file.
- For the Subdirectory enter
./
. - Press the OK button to close the dialog.
- Press the Save button to close the Addon Developer Tools dialog and save the package.xml file.
- Press the Close button to close the Addon Manager.
- Push the created file to your remote repository.
Add the workbench to the .gitmodules file
- Fork https://github.com/FreeCAD/FreeCAD-addons.
- Create a new branch.
- Edit the .gitmodules file to include your new Addon, in alphabetical order.
- Push the new branch to GitHub.
- Submit a Pull Request to the FreeCAD-Addons repository with the new .gitmodules file.
See also
- Workbench creation
- Package Metadata: Detailed information about the package.xml file.