Addon Manager improvements

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Addon Manager improvements

Post by Kunda1 »

JFYI, there are some other open FRs for the Addon Manager:
  • Feature: Addon Manager notifies of any addons that have updates Ticket #95
  • Addon-Manager should show current version of addon installed and if there is an update (show pending update version) Ticket #67
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Addon Manager improvements

Post by yorik »

auto-check for updates is on my todo list!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager improvements

Post by adrianinsaval »

How about batch update? Could be useful to have an update all feature or something like that
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Addon Manager improvements

Post by yorik »

New UI for the addons manager in git commit 3e65306a9!
Screenshot from 2019-06-07 17-29-06.png
Screenshot from 2019-06-07 17-29-06.png (286.25 KiB) Viewed 2014 times
Have a look and tell me what you think!

The functionality is basically still the same as before, but it shows the whole README. Also, it is now fully translatable.
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Addon Manager improvements

Post by UR_ »

Got a error message on new UI :o

Annotation 2019-06-12 201918.png
Annotation 2019-06-12 201918.png (68.37 KiB) Viewed 1970 times
Traceback (most recent call last):
File "C:\Users\aio\Miniconda3\envs\freecad\Library\Mod\AddonManager\AddonManager.py", line 393, in install
if install_macro(macro, self.macro_repo_dir):
File "C:\Users\aio\Miniconda3\envs\freecad\Library\Mod\AddonManager\addonmanager_utilities.py", line 132, in install_macro
macro_dir = FreeCAD.getUserMacroDir(True)
NameError: name 'FreeCAD' is not defined

version:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16978 (Git)
Build type: Release
Branch: master
Hash: 3e65306a9fb7c10078d69f7cf41c54548c122794
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Addon Manager improvements

Post by HakanSeven12 »

yorik wrote: Tue Jun 11, 2019 8:09 pm New UI for the addons manager in git commit 3e65306a9!

Have a look and tell me what you think!

The functionality is basically still the same as before, but it shows the whole README. Also, it is now fully translatable.
Looks great :)
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Addon Manager improvements

Post by yorik »

UR_ wrote: Wed Jun 12, 2019 6:26 pm Got a error message on new UI :o
That should be fixed now git commit c1c3dab5f
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Addon Manager improvements

Post by sgrogan »

yorik wrote: Tue Jun 11, 2019 8:09 pm Have a look and tell me what you think!
Well the GUI is beautiful. Installing BIM seems to work except I don't get the screenshot at the top of the readme. For many WB's I get an error like this

Code: Select all

Traceback (most recent call last):
  File "C:\Users\Chris\GitHub\FreeCAD-build2\Mod\AddonManager\addonmanager_workers.py", line 562, in run
    depsok,answer = self.checkDependencies(self.repos[idx][1])
  File "C:\Users\Chris\GitHub\FreeCAD-build2\Mod\AddonManager\addonmanager_workers.py", line 610, in checkDependencies
    depsfile = mu.read()
AttributeError: 'NoneType' object has no attribute 'read'
BOLTFC above, but the same for lattice2, cadquery_module

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16979 (Git)
Build type: Release
Branch: master
Hash: b60a736c0de2a254069f9813bca88c3763cacfbd
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

EDIT: Guessing the filename is too long for Win?

Code: Select all

file://C:/Users/Chris/AppData/Roaming/FreeCAD/AddonManager/Images/68747470733a2f2f7777772e667265656361647765622e6f72672f77696b692f696d616765732f352f35652f42494d5f776f726b62656e63685f70726573656e746174696f6e2e706e67
"fight the good fight"
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Addon Manager improvements

Post by yorik »

Thanks for the deep test!
sgrogan wrote: Wed Jun 12, 2019 10:37 pm AttributeError: 'NoneType' object has no attribute 'read'
That's now fixed in git commit aa43a2814
sgrogan wrote: Wed Jun 12, 2019 10:37 pm file://C:/Users/Chris/AppData/Roaming/FreeCAD/AddonManager/Images/68747470733a2f2f7777772e667265656361647765622e6f72672f77696b692f696d616765732f352f35652f42494d5f776f726b62656e63685f70726573656e746174696f6e2e706e67
That's 214 characters... AFAIR Windows limit is 256, so this should work... Annoying thing that github caches images under these silly names (do they really have so many images to cache that they need such an enormous string... that's billions of times the whole internet content) and without extension...

Anyway, what happens under the hood: The QTextBrowser, that is used to display the README, cannot display online images. So we need to download the images first. Since it can take a long time, I decided to split this into two operations: 1) the readme is fetched and displayed, and the user gets control again, while 2) in the background, the images are downloaded. When the images are all downloaded, the contents of the QTextBrowser is refreshed with a version where the image links are changed with the local, downloaded versions. If you switch to another WB, that process is interrupted. So you might need to wait a little time, without touching anything to have the images displayed.

You can check in C:/Users/Chris/AppData/Roaming/FreeCAD/AddonManager/Images, that's where the images get downloaded. They are downloaded only once, after that all other times they will be found and reused automatically. But I noticed some images in some readme's fail to download indeed...
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Addon Manager improvements

Post by bernd »

cool ui yorik and and the external paths are adjustable by gui now :D
Locked