-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NVDA estimated size to add/remove programs #13909
Conversation
See test results for failed build of commit a7c41018d6 |
See test results for failed build of commit a5b7c14a78 |
"""Calculates the size of a directory in bytes. | ||
""" | ||
total = 0 | ||
with os.scandir(path) as iterator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using recursion on getDirectorySize
, it might be better to use glob
which returns files within folders recursively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. I just tried glob, but there are two disadvantages:
- Glob simply returns files and folders, so we need to call os.path.isfile on every node
- It is noticeably slower
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
664910d
to
252890f
Compare
Link to issue number:
None
Summary of the issue:
In Windows Add/remove programs, there is a column that displays the estimated installation size of a product. This column is empty for NVDA.
Description of user facing changes
Calculate install size of the NVDA program files folder, and add it to the registry. This will be visible in Add/remove programs.
Description of development approach
I decided to calculate estimated size during installation. This takes the SystemConfig into account as that is part of the program files directory. This means that the estimated size is also based on the system config. I think this is OK, because when removing NVDA from Add/remove programs, the systemConfig dir is removed as well. Long story short, the estimated size is the best estimate we could get at time of installation
Testing strategy:
installed the build from appveyor. Verified that the estimated size is visible in add/remove programs and equal to the size of C:\Program Files (x86)\NVDA
Known issues with pull request:
None known
Change log entries:
Changes
Code Review Checklist: