Zusier / NVIX

A fast and portable NVIDIA driver installer
MIT License
6 stars 0 forks source link

Make 2 DL links for drivers. #1

Closed Aetopia closed 2 years ago

Aetopia commented 2 years ago

In dl.rs:

impl std::fmt::Display for DriverWindowsVersion {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            DriverWindowsVersion::Win10 => write!(f, "win10"),
            DriverWindowsVersion::Win11 => write!(f, "win10-win11"),
        }
    }
}
def dl_links(version, studio=False, type='dch'):
    links = []
    BASE_LINK = 'https://international.download.nvidia.com/Windows'
    match studio:
        case True: nsd = '-nsd'
        case False: nsd = ''

    match type:
        case 'dch': type = '-dch'
        case 'std': type = ''

    for winver in ('win10', 'win10-win11'):
        links.append(
            f'{BASE_LINK}/{version}/{version}-{system_type()}-{winver}-64bit-international{nsd}{type}-whql.exe')
    return links

I would recommend to create 2 download links for drivers.

Older drivers only have win-10 in their DL links but support Windows 11 as well.

Zusier commented 2 years ago

I believe I got it, I just make sure the links are not 404's in case it's an older driver and such. Thanks