Ajouter un atelier au gestionnaire des extensions
Introduction
Ces instructions expliquent, étape par étape, comment ajouter un atelier Python au Gestionnaire des extensions.
Conditions requises :
- Un dépôt git local.
- Un dépôt git distant. Les hôtes git pris en charge sont GitHub, GitLab, Framagit et Debian Salsa.
- Git doit être installé.
Activer le mode développeur
- Ouvrez l'Éditeur de préférences : sélectionnez l'option Édition → Préférences... dans le menu.
- Sélectionnez l'option Gestionnaire des extensions dans la barre de gauche.
- Dans l'onglet Options du gestionnaire des extensions, cochez la case Mode développeur des extensions. Cela activera le bouton Outils du développeur... dans le gestionnaire des extensions.
- Appuyez sur le bouton OK pour fermer l'éditeur de préférences.
Créer le fichier package.xml
- 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.