Commit Graph

42 Commits

Author SHA1 Message Date
Chris Hennes
1f6c364fa6 Addon Manager: Refactor Metadata
Create a Python-native metadata class. Includes unit tests, and some PyLint cleanup.
2023-03-10 14:25:50 -06:00
Chris Hennes
7b590eace0 Addon Manager: Refactor interface to FreeCAD 2023-02-19 15:49:24 -06:00
Chris Hennes
d6fc29f057 Addon Manager: Refactor Macro parser 2023-02-13 23:46:57 -06:00
Chris Hennes
eeb4dbdcf0 Addon Manager: Add data for integration tests 2023-02-10 16:19:17 -07:00
Chris Hennes
5f45b00078 AddonManager: Refactor uninstaller GUI
Offload uninstaller GUI into its own class, add tests for that class, and do
some additional minor cleanup of AddonManager.py.
2022-12-18 22:15:40 -06:00
Chris Hennes
02b4a762b0 Addon Manager: Create new uninstaller 2022-12-18 22:15:40 -06:00
Chris Hennes
89c191e160 Addon Manager: Refactor installation code
Improve testability of installation code by refactoring it to completely
separate the GUI and non-GUI code, and to provide more robust support
for non-GUI access to some type of Addon Manager activity.
2022-12-17 17:49:13 -06:00
Chris Hennes
eed9b6480f Addon Manager: Refactor to extract metadata checker 2022-11-11 21:50:16 -06:00
Chris Hennes
103f8b77bf Addon Manager: Refactor to extract connection check GUI 2022-11-10 21:09:47 -06:00
Chris Hennes
b444ae94d5 Addon Manager: Refactor to extract first run dialog 2022-11-10 09:42:59 -06:00
Chris Hennes
7f6116cf17 Addon Manager: Switch custom repo prefs to a table 2022-09-20 15:59:17 -05:00
Chris Hennes
78a4033929 Addon Manager: Migrate to managed pref page class 2022-09-20 15:59:17 -05:00
Chris Hennes
139b99d371 Addon Manager: Cleanup 2022-09-09 13:00:11 -05:00
Chris Hennes
354a29d98a Addon Manager: Refactor Licenses and People tables 2022-09-09 13:00:11 -05:00
Chris Hennes
cb1f6bffa8 Addon Manager: DevMode content implementation 2022-09-09 13:00:10 -05:00
Chris Hennes
7a17106776 Addon Manager: Implement content addition dialogs 2022-09-09 13:00:10 -05:00
Chris Hennes
aabf887e1e Addon Manager: Add person editor 2022-09-09 13:00:10 -05:00
Chris Hennes
ea45af3a80 Addon Manager: Add license selector 2022-09-09 13:00:10 -05:00
Chris Hennes
b6827b3621 Addon Manager: Sketch out basics of Developer Mode 2022-09-09 13:00:10 -05:00
Chris Hennes
f8567b0975 AddonManager: Refactoring of installer 2022-08-24 12:24:38 -05:00
Chris Hennes
b6da08ef8b Addon Manager: Create new git handling mechanism 2022-08-21 14:32:15 -05:00
Chris Hennes
4c63094331 Addon Manager: Worker refactor (round 1) 2022-08-09 10:23:26 -05:00
Chris Hennes
e415f38fe6 Addon Manager: Add dialog to manage Python deps 2022-07-27 09:59:25 -05:00
Chris Hennes
56a04dbbc0 Addon Manager: Begin Macro unit tests 2022-03-09 12:14:57 -06:00
Chris Hennes
b14638c439 Addon Manager: Add unit tests for dependencies 2022-03-08 19:15:01 -06:00
Chris Hennes
f4dbd6b2b2 Addon Manager: Add unit tests for Addon class 2022-03-05 10:17:50 -06:00
Chris Hennes
96006c7587 Addon Manager: Add tests for Addon 2022-02-27 23:32:33 -06:00
Chris Hennes
0d6a506447 Addon Manager: Renaming and cleanup 2022-02-27 22:50:54 -06:00
Chris Hennes
1a7fcd575e Addon Manager: Auto-create toolbar button
When installing a macro, prompt user to install a toolbar button
automatically. Fills in the details of the button using the macro's
metadata, including an icon if the __icon__ metadata variable points to
a file.

Also:
* Support XPM data for macro icon
* Support online icons
* Fix bug in macro uninstall
* Cleaned up macro code
2022-02-26 21:06:37 -06:00
Chris Hennes
14ff42be13 Addon Manager: Add unit test framework
Adds the framework for unit testing, and a few tests of the utilities functions.
2022-02-25 23:17:59 -06:00
Chris Hennes
074c4b0a3b Addon Manager: Add branch switching GUI
For users with git and GitPython installed, a new button is added to the
details view allowing them to change the branch they are on. Some other
minor UI changes are made to accomodate this new behavior.
2022-02-13 20:19:32 -06:00
Chris Hennes
e553a0e3ab Addon Manager: Switch to QWebEngineView for README
Rather than manually parsing the output from the repo's host, the Addon Manager
now uses an embedded QWebEngineView to display the README data. This makes the
display more repo-location agnostic (rather than trying to parse the specific
code from GitHub, Gitlab, etc.). Special handling of known hosts is still
provided to improve the display of the page, but it is not required. Clicking a
link on the page still loads in a new system browser window, with the exception
of links to the FreeCAD wiki, which are loaded in the same browser. This is
expected to be used primarily to access traslated pages for Macros, so no
advanced web-browsing features are displayed (e.g. back buttons, history
access, etc.).
2022-02-02 23:42:29 -06:00
Chris Hennes
2b0a4dc643 Addon Manager: Create NetworkManager class
To enable single-login authenticated proxy use, and simplified multi-threaded
network accesses, this commit adds a new wrapper around a QNetworkAccessManager
and includes a global instantiation of the class intended to exist for the
lifetime of the program. This instance can be used to enqueue any number of
network requests, which the manager will send out to the networking subsystem
in an appropriate manner.
2022-01-25 13:30:58 -06:00
Chris Hennes
d1a94de371 Addon manager: install dependencies (#5376)
Addon Manager: Dependency Installation

The Addon Manager can now attempt to use pip directly to install
required packages as specified in either metadata.txt or
requirements.txt files provided by AddOns. The packages are installed
into FreeCAD.getUserAppDataDir()/AdditionalPythonPackages directory.
Only simplified requirements.txt data is supported: any version
information is stripped out, and only packages are supported (that is,
no pip arguments, included files, etc.). Further, packages are checked
against a list of allowed packages prior to being suggested for
installation. Addon authors should submit a PR to the FreeCAD repo
adding their requirements to the allowed list, for packages that are not
already on the list (this is a malware-prevention mechanism).
2022-01-21 10:19:21 -06:00
Chris Hennes
4c9191d489 Addon manager dependency resolver (#5339)
Squashed:
* Addon Manager: Refactor metadata.txt download
* Addon Manager: Basic dependency walker
* Addon Manager: Add basic support for dependencies
* Addon Manager: Improve network detection messaging
* Addon Manager: Black reformat
* Addon Manager: Display dependency info in dialog
* Addon Manager: Dependency dialog added
* Addon Manager: Improve display of update all results
* Addon Manager: Improve display of package list
* Addon Manager: Fix codespell
* Addon Manager: Clean up unused signal
2022-01-07 10:16:44 -06:00
Chris Hennes
50336440dc Addon Manager: Add preference to control macro download 2022-01-01 09:16:32 -06:00
Chris Hennes
a0992902de Addon Manager: Begin UI redesign
Migrate to a UI that looks more like other software package managers, giving
more space to each addon by hiding the list when an addon is selected, and
providing a "back" button to get back.

Implements a two-style view option for the list of addons: expanded and
condensed, via a delegate that provides the drawing function for each row in
the table based on two different widget designs.
2021-12-18 20:29:42 -06:00
Chris Hennes
768a0f086f Addon Manager: Rework backend to use package.xml
This shifts to use the model-view-controller pattern for the list of addons,
and moves to using a full model class rather than an indexed array for the
data storage and management. This enables much more information to be stored
as part of the new AddonManagerRepo data type. It now wraps the Macro class
for macros, supports Preference Packs, and provides access to the Metadata
object.
2021-12-18 20:29:42 -06:00
Yorik van Havre
e529871eb6 AddonManager: Use workbenches icons 2019-06-15 23:50:41 -03:00
Yorik van Havre
3e65306a9f AddonManager: New UI 2019-06-11 17:06:11 -03:00
Yorik van Havre
f1e3ec88c6 AddonManager: Fixed missing files in cmake 2018-10-25 12:02:46 -03:00
Kurt Kremitzki
25496adcbe Add Addon Manager to Tools menu 2017-02-02 11:20:41 +01:00