Commit Graph

163 Commits

Author SHA1 Message Date
Chris Hennes
e415f38fe6 Addon Manager: Add dialog to manage Python deps 2022-07-27 09:59:25 -05:00
Uwe
3d597b797a [AddonMgr] [skip CI] fix typo
- spot by the spellchecker CI
2022-07-01 03:10:47 +02:00
Chris Hennes
b54b3e6e32 Addon Manager: Fix bug in macro git repo 2022-06-09 19:50:05 -05:00
Chris Hennes
af811b34b3 Addon Manager: Additional diagnostics for Macro updates 2022-06-06 11:46:56 -05:00
Chris Hennes
3dfb51d3ee Addon Manager: Expose pref page name to translate 2022-05-31 15:33:53 -05:00
Chris Hennes
f7b9a70ee5 Addon Manager: Build in error-checking in developer mode 2022-05-30 20:06:20 -05:00
Chris Hennes
e634921a4c Addon Manager: Fetch allowed py packages from Github repo 2022-04-26 00:23:50 -05:00
Chris Hennes
1480c1f594 Addon Manager: Black reformat 2022-04-06 14:30:22 -05:00
Chris Hennes
1ede604cfd Addon Manager: Allow overriding install with missing deps 2022-04-06 14:28:34 -05:00
Chris Hennes
ccc9be98ce Addon Manager: Move optional dep check logic 2022-04-01 17:20:20 -05:00
Chris Hennes
b435db807d Addon Manager: Optional packages also obey allowlist 2022-04-01 11:50:00 -05:00
Chris Hennes
fad9d48184 Addon Manager: Support setting selection externally 2022-03-24 19:12:15 -05:00
Chris Hennes
b8ea740c84 Addon Manager: Fix bug in dep res dialog 2022-03-24 15:05:34 -05:00
Chris Hennes
2118d544da Addon Manager: Correct error message 2022-03-21 09:24:51 -05:00
Chris Hennes
cb7912db8c Addon Manager: Fix Window on top of everything 2022-03-14 19:35:11 -05:00
Chris Hennes
56eab3f08b Addon Manager: Correct parent of modal dialogs 2022-03-13 22:30:14 -05:00
Chris Hennes
633449f8f7 Addon Manager: Fix window focus issues 2022-03-11 20:07:20 -06:00
Chris Hennes
c2055689a5 Addon Manager: Refactor to improve testability 2022-03-09 23:14:59 -06:00
Chris Hennes
75aed7f375 Addon Manager: Improve dependency handling 2022-03-08 19:15:01 -06:00
Chris Hennes
2a2c6e5319 Addon Manager: Fix number of updates available 2022-03-05 10:55:25 -06:00
Chris Hennes
f4dbd6b2b2 Addon Manager: Add unit tests for Addon class 2022-03-05 10:17:50 -06:00
Chris Hennes
49a6394018 Addon Manager: Force update check after recache 2022-02-28 14:22:21 -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
189bec3e5a Addon Manager: Remove restart need for pref packs
The actual need to restart was removed by 7a566ea4d, this commit
updates the Addon Manager user interface to stop telling the user
they need to restart. Now restarting is only required for addons
that contain workbenches. Macros and pref packs to not need a
restart.
2022-02-24 09:49:15 -06:00
Chris Hennes
d357d59c02 Addon Manager: Black reformat 2022-02-18 08:38:57 -06:00
Chris Hennes
f28278dca5 Addon Manager: Add error checking for proxy setup
Also make a minor tweak to the enabled status of the check all for updates button.
2022-02-18 08:37:20 -06:00
Chris Hennes
38327fa71c Addon Manager: Force recache on custom repo change 2022-02-17 19:17:09 -06:00
Chris Hennes
a3e310ab55 Addon Manager: Improve manual update display 2022-02-17 19:00:57 -06:00
Chris Hennes
ef8be833fd Addon Manager: Fix missing update button connection 2022-02-17 18:26:24 -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
063905adfd Addon Manager: Run uninstall.py when uninstalling AddOn 2022-01-27 23:34:18 -06:00
Chris Hennes
88f6b2f432 Addon Manager: Translation cleanup
pylupdate does not extract translations when f-strings are used for the
translated text, so all f-strings are migrated to calls to format().
Several other minor translation issues are also addressed.

NOTE: This code has been run through the Black reformatter, which adds
trailing commas in many places that the stock Qt 5.x pylupdate does not
recognize. This code must be processed with the corrected pylupdate to
generate the correct translations.
2022-01-27 23:11:31 -06:00
Chris Hennes
e296aa6973 Addon Manager: Eliminate use of QDeadlineTimer
This class is apparently missing in some installs of Qt 5.11.3, so
remove the use of it.
2022-01-26 23:14:00 -06:00
Chris Hennes
f045a0b6f1 Addon Manager: Improve startup speed 2022-01-26 18:41:14 -06:00
Chris Hennes
4acef3f14f Addon Manager: Confirm delete 2022-01-25 13:32:02 -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
luz paz
19e984f8c9 Fix various typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2022-01-12 14:50:39 -06:00
Chris Hennes
70d61b9624 Addon Manager: Fix for Py3.6 w/ no fromisodate 2022-01-10 21:14:32 -06:00
Chris Hennes
3c937a5f8d Addon Manager: Clean up thread termination 2022-01-08 22:30:05 -06:00
Chris Hennes
efa08946f2 Addon Manager: Improve stability when cache update interrupted 2022-01-08 19:47:57 -06:00
Chris Hennes
3b76a23d7b Addon Manager: Silence error on missing cache 2022-01-08 11:32:33 -06:00
Chris Hennes
f8e08659d2 Addon Manager: Fix error on fast failed connection 2022-01-08 11:29:43 -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
ecc6dee175 Addon Manager: Clean up copied macros on uninstall 2022-01-06 20:34:48 -06:00
Chris Hennes
f48d79a227 Addon Manager: Improve display of installation details 2022-01-01 11:41:23 -06:00
Chris Hennes
64cf6a68d8 Addon Manager: Remove unused imports 2022-01-01 09:43:06 -06:00
Chris Hennes
70c9804fc0 Addon Manager: Ensure cache is rebuilt after firstrun dialog 2022-01-01 09:16:32 -06:00