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!
User avatar
Kunda1
Posts: 9236
Joined: Thu Jan 05, 2017 9:03 pm

Re: Addon Manager improvements

Postby Kunda1 » Wed May 22, 2019 11:12 pm

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
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
yorik
Site Admin
Posts: 12148
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Addon Manager improvements

Postby yorik » Thu May 23, 2019 1:57 am

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

Re: Addon Manager improvements

Postby adrianinsaval » Fri May 24, 2019 3:55 am

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

Re: Addon Manager improvements

Postby yorik » Tue Jun 11, 2019 8:09 pm

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 994 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_
Posts: 1214
Joined: Tue Jan 03, 2017 8:42 pm

Re: Addon Manager improvements

Postby UR_ » Wed Jun 12, 2019 6:26 pm

Got a error message on new UI :o

Annotation 2019-06-12 201918.png
Annotation 2019-06-12 201918.png (68.37 KiB) Viewed 950 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
Posts: 1085
Joined: Wed Feb 06, 2019 10:30 pm

Re: Addon Manager improvements

Postby HakanSeven12 » Wed Jun 12, 2019 8:54 pm

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
Site Admin
Posts: 12148
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Addon Manager improvements

Postby yorik » Wed Jun 12, 2019 10:36 pm

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
Posts: 6221
Joined: Wed Oct 22, 2014 5:02 pm

Re: Addon Manager improvements

Postby sgrogan » Wed Jun 12, 2019 10:37 pm

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
Site Admin
Posts: 12148
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Addon Manager improvements

Postby yorik » Thu Jun 13, 2019 1:09 am

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
Posts: 11116
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Addon Manager improvements

Postby bernd » Thu Jun 13, 2019 4:52 am

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