Добавление верстака в Менеджер дополнений

From FreeCAD Documentation
This page is a translated version of the page Add Workbench to Addon Manager and the translation is 83% complete.
Other languages:

Вступление

Данная страница содержит пошаговую инструкцию позволяющую добавить Python верстак в Менеджер дополнений.

Требуется:

  • Наличие локального git репозитория.
  • Наличие удаленного git репозитория. Поддерживаемые git хостинги: GitHub, GitLab, Framagit и Debian Salsa.
  • Git должен быть установлен локально.

Активация режима для разработчиков

  1. Откройте Редактор настроек: через пункт меню Правка → Настройки....
  2. Выберите раздел Менеджер дополнений в панели слева.
  3. На в кладке Настройки менеджера дополнений включите флажок Режим разработчика дополнений. Это сделает доступной кнопку Инструменты разработчика... в Менеджере дополнений.
  4. Нажмите кнопку OK для закрытия Редактора настроек.

Создание package.xml файла

  1. Open the Addon Manager: select the Tools → Addon manager option from the menu.
  2. Press the Developer tools... button.
  3. The Addon Developer Tools dialog opens.
  4. 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.
  5. Press the button at the bottom of the dialog.
  6. The Content Item dialog opens.
  7. The Content type should be set to Workbench.
  8. Check the This is the only item in the Addon checkbox.
  9. Enter the Workbench class name. This is the class name specified in the InitGui.py file.
  10. For the Subdirectory enter ./.
  11. Press the OK button to close the dialog.
  12. Press the Save button to close the Addon Developer Tools dialog and save the package.xml file.
  13. Press the Close button to close the Addon Manager.
  14. Push the created file to your remote repository.

Добавление верстака в .gitmodules файл

  1. Сделайте Fork https://github.com/FreeCAD/FreeCAD-addons репозитория.
  2. Создайте новую ветвь.
  3. Отредактируйте файл .gitmodules, добавьте в него ваше дополнение (Addon) в алфавитном порядке.
  4. Сделайте Push в новую ветку GitHub.
  5. Отправьте Pull Request с изменениями в FreeCAD-Addons репозиторий с измененным .gitmodules файлом.

Смотрите также