RFC Windows library path search

This commit is contained in:
Renato Alves
2022-09-28 11:46:57 +02:00
parent aa471d90d6
commit 7988816066

View File

@@ -259,40 +259,28 @@ def load_libnss():
"""
if SYSTEM == "Windows":
nssname = "nss3.dll"
if SYS64:
locations: list[str] = [
"", # Current directory or system lib finder
os.path.expanduser("~\\AppData\\Local\\Mozilla Firefox"),
os.path.expanduser("~\\AppData\\Local\\Mozilla Thunderbird"),
os.path.expanduser("~\\AppData\\Local\\Nightly"),
os.path.expanduser("~\\AppData\\Local\\SeaMonkey"),
os.path.expanduser("~\\AppData\\Local\\Waterfox"),
"C:\\Program Files\\Mozilla Firefox",
"C:\\Program Files\\Mozilla Thunderbird",
"C:\\Program Files\\Nightly",
"C:\\Program Files\\SeaMonkey",
"C:\\Program Files\\Waterfox",
]
else:
locations: list[str] = [
locations: list[str] = [
"", # Current directory or system lib finder
os.path.expanduser("~\\AppData\\Local\\Mozilla Firefox"),
os.path.expanduser("~\\AppData\\Local\\Mozilla Thunderbird"),
os.path.expanduser("~\\AppData\\Local\\Nightly"),
os.path.expanduser("~\\AppData\\Local\\SeaMonkey"),
os.path.expanduser("~\\AppData\\Local\\Waterfox"),
"C:\\Program Files\\Mozilla Firefox",
"C:\\Program Files\\Mozilla Thunderbird",
"C:\\Program Files\\Nightly",
"C:\\Program Files\\SeaMonkey",
"C:\\Program Files\\Waterfox",
]
if not SYS64:
locations = [
"", # Current directory or system lib finder
"C:\\Program Files (x86)\\Mozilla Firefox",
"C:\\Program Files (x86)\\Mozilla Thunderbird",
"C:\\Program Files (x86)\\Nightly",
"C:\\Program Files (x86)\\SeaMonkey",
"C:\\Program Files (x86)\\Waterfox",
# On windows 32bit these folders can also be 32bit
os.path.expanduser("~\\AppData\\Local\\Mozilla Firefox"),
os.path.expanduser("~\\AppData\\Local\\Mozilla Thunderbird"),
os.path.expanduser("~\\AppData\\Local\\Nightly"),
os.path.expanduser("~\\AppData\\Local\\SeaMonkey"),
os.path.expanduser("~\\AppData\\Local\\Waterfox"),
"C:\\Program Files\\Mozilla Firefox",
"C:\\Program Files\\Mozilla Thunderbird",
"C:\\Program Files\\Nightly",
"C:\\Program Files\\SeaMonkey",
"C:\\Program Files\\Waterfox",
]
] + locations
# If either of the supported software is in PATH try to use it
software = ["firefox", "thunderbird", "waterfox", "seamonkey"]