Addon/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 25: Line 25:
* [[Installing_more_workbenches/ru|Установка дополнительных верстаков]]
* [[Installing_more_workbenches/ru|Установка дополнительных верстаков]]
</div>
</div>

== Information for developers ==

If you have developed a macro or workbench, and want to see it included in the Addon manager, read how to do so 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]] page, there is nothing else to do, it will automatically be picked up by the Addon manager.

=== Python workbenches ===

For Python workbenches, you don't need any specific approval to have your workbench added to the Addon Manager. In addition, because your Addon is outside the FreeCAD source code, you can choose the license you want. If you request for your workbench to be added to the Addon Manager's default 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. For more details about structuring your Addon, including information about metadata used by the Addon Manager, see [[Workbench_creation|Workbench creation]].

=== C++ workbenches ===

If you develop a workbench in C++, it cannot be run directly by users and must be compiled first. You then have two 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 a fully compatible license 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.





Revision as of 10:56, 12 June 2022

Введение

В FreeCAD и в этой документации Дополнения - это любой компонент, который не является частью базовой установки, но который может быть добавлен в систему определенными методами.

Различные типы

Грубо говоря существует три типа дополнения:

  • Макросы: короткий фрагмент кода Python, который предоставляет новый инструмент или функциональность в одном файле, заканчивающемся расширением файла .FCMacro.
  • Модули: один исходный файл Python или набор файлов Python, который каким-то образом расширяет программное обеспечение. Модули не обязательно определяют графический "верстак", но могут предоставлять вспомогательную функцию, например библиотеку, выполняющую преобразование форматов, или код, изменяющий графический интерфейс.
  • Верстаки: коллекции файлов Python, которые предоставляют связанные команды Gui (инструменты), сосредоточенные вокруг определенной темы, например, инструменты для проектирования шкафов, инструменты для работы с архитектурой, инструменты для проектирования лодок и т. Д. Эти верстаки обычно определяют новые панели инструментов, где команды размещаются в виде кнопок.

Установка

Начиная с FreeCAD версии 0.17, рекомендуется установка дополнений с помощью Менеджера дополнений.

Однако ручная установка остаётся возможной.

Information for developers

If you have developed a macro or workbench, and want to see it included in the Addon manager, read how to do so on the repository pages: (FreeCAD-addons and FreeCAD-macros). If you add your macro to the Macros recipes page, there is nothing else to do, it will automatically be picked up by the Addon manager.

Python workbenches

For Python workbenches, you don't need any specific approval to have your workbench added to the Addon Manager. In addition, because your Addon is outside the FreeCAD source code, you can choose the license you want. If you request for your workbench to be added to the Addon Manager's default 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 FreeCAD-addons repository, your code will stay on your own git repository, we will just add it as a submodule to the 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. For more details about structuring your Addon, including information about metadata used by the Addon Manager, see Workbench creation.

C++ workbenches

If you develop a workbench in C++, it cannot be run directly by users and must be compiled first. You then have two 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 a fully compatible license like MIT or BSD), and you must present your new tools to the community in the 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.