nvidia-patch/tools/readme-autogen/constants.py

60 lines
2.9 KiB
Python
Raw Normal View History

2019-11-18 20:49:40 +00:00
from enum import IntEnum, Enum
import os.path
2019-11-18 20:49:40 +00:00
class OSKind(Enum):
Linux = 'linux'
Windows = 'win'
def __str__(self):
return self.name
class Product(IntEnum):
GeForce = 10
Quadro = 20
2019-11-18 20:49:40 +00:00
def __str__(self):
return self.name
class WinSeries(IntEnum):
win10 = 10
win7 = 20
ws2012 = 30
ws2016 = 40
2019-11-18 20:49:40 +00:00
def __str__(self):
return self.name
BASE_PATH = os.path.dirname(os.path.abspath(__file__))
TEMPLATE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"templates")
DATAFILE_PATH = os.path.join(BASE_PATH,
"..", "..", "drivers.json")
LINUX_README_PATH = os.path.join(BASE_PATH,
"..", "..", "README.md")
WINDOWS_README_PATH = os.path.join(BASE_PATH,
"..", "..", "win", "README.md")
ENCODING='utf-8'
2019-11-18 20:49:40 +00:00
DRIVER_URL_TEMPLATE = {
(OSKind.Linux, None, None, None): "https://international.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version.run",
(OSKind.Windows, Product.GeForce, WinSeries.win10, ''): "https://international.download.nvidia.com/Windows/$version/$version-desktop-win10-64bit-international-whql.exe",
(OSKind.Windows, Product.GeForce, WinSeries.win10, 'Studio Driver'): "https://international.download.nvidia.com/Windows/$version/$version-desktop-win10-64bit-international-nsd-whql.exe",
2020-01-17 22:21:57 +00:00
(OSKind.Windows, Product.GeForce, WinSeries.win10, 'Vulkan Beta'): "",
2019-11-18 20:49:40 +00:00
(OSKind.Windows, Product.Quadro, WinSeries.win10, ''): "https://international.download.nvidia.com/Windows/Quadro_Certified/$version/$version-quadro-desktop-notebook-win10-64bit-international-whql.exe",
(OSKind.Windows, Product.GeForce, WinSeries.win7, ''): "https://international.download.nvidia.com/Windows/$version/$version-desktop-win8-win7-64bit-international-whql.exe",
2020-01-17 22:21:57 +00:00
(OSKind.Windows, Product.GeForce, WinSeries.win7, 'Vulkan Beta'): "",
2019-11-18 20:49:40 +00:00
(OSKind.Windows, Product.Quadro, WinSeries.win7, ''): "https://international.download.nvidia.com/Windows/Quadro_Certified/$version/$version-quadro-desktop-notebook-win8-win7-64bit-international-whql.exe",
2020-02-03 16:34:58 +00:00
(OSKind.Windows, Product.Quadro, WinSeries.ws2012, ''): "https://international.download.nvidia.com/Windows/Quadro_Certified/$version/$version-quadro-winserv-2012r2-64bit-international-whql.exe",
2019-11-18 20:49:40 +00:00
(OSKind.Windows, Product.Quadro, WinSeries.ws2016, ''): "https://international.download.nvidia.com/Windows/Quadro_Certified/$version/$version-quadro-winserv-2016-2019-64bit-international-whql.exe",
}
DRIVER_DIR_PREFIX = {
(Product.GeForce, ''): '',
(Product.GeForce, 'Studio Driver'): 'nsd_',
2020-01-17 22:21:57 +00:00
(Product.GeForce, 'Vulkan Beta'): '',
2019-11-18 20:49:40 +00:00
(Product.Quadro, ''): 'quadro_',
}
2020-05-30 16:20:59 +00:00
REPO_BASE = "https://raw.githubusercontent.com/keylase/nvidia-patch/master/win/"