Skip to content

Commit 4be4836

Browse files
committed
Added change log file and fixed bugs in the NVDown source code.
- Finally fixed downloading on Windows XP! The program will no longer crash because it can't find the folder it was being told to download files to! - Added checks to ensure that versions of NVDA higher than 2017.3 can't be downloaded on Windows XP.
1 parent bb4fd04 commit 4be4836

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

NVDown.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
from playsound import playsound
99
from requests.packages.urllib3.exceptions import InsecureRequestWarning
1010
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
11-
os.system("title NVDown")
11+
os.system("title NVDown, by Seedy-Threepio")
1212
def NVDown():
1313
version = raw_input("Enter the version of NVDA you'd like to download\n")
1414
try:
15+
if sys.getwindowsversion().major == 5 and sys.getwindowsversion().minor == 1:
16+
if float(version) > 2017.3:
17+
winsound.MessageBeep(48)
18+
print("Error! NVDA version too high. You can't go higher than 2017.3 on Windows XP.")
19+
NVDown()
1520
if float(version) < 2013.3:
1621
winsound.MessageBeep(48)
1722
print("Error! NVDA version too low. Must be 2013.3 or higher.")
@@ -43,8 +48,8 @@ def NVDown():
4348
NVDown()
4449
if sys.getwindowsversion().major >= 6:
4550
downpath = os.path.join(os.environ['userprofile'],"downloads",os.environ['ver'])
46-
elif sys.getwindowsversion().major == 5:
47-
downpath = os.path.join(os.environ['userprofile'],"my documents","downloads",os.environ['ver'])
51+
elif sys.getwindowsversion().major == 5 and sys.getwindowsversion().minor == 1:
52+
downpath = os.path.join(os.environ['userprofile'],"My Documents",os.environ['ver'])
4853
playsound("snd/started.mp3",block = False)
4954
print("Downloading NVDA " + nvver + "...")
5055
downfile = open(downpath,"wb")
@@ -63,4 +68,9 @@ def NVDown():
6368
elif menu == "2":
6469
waiting = False
6570
sys.exit()
66-
NVDown()
71+
if sys.getwindowsversion().major == 5 and sys.getwindowsversion.minor == 0:
72+
winsound.MessageBeep(16)
73+
print("Error! Windows 2000 is not supported by this program because no NVDown-compatible versions of NVDA can run on Windows 2000!")
74+
sys.exit()
75+
else:
76+
NVDown()

changes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# NVDown Change Log
2+
## V 1005, Friday, 8th April, 2022
3+
- Finally fixed downloading on Windows XP! The program will no longer crash because it can't find the folder it was being told to download files to!
4+
- Added checks to ensure that versions of NVDA higher than 2017.3 can't be downloaded on Windows XP.
5+
## V 1000, Thursday, 3rd February, 2022
6+
Initial release of NVDown

0 commit comments

Comments
 (0)