From 0d0f9c8bf26c4d227d9992ea728bb78082ad16f3 Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Sun, 9 Jun 2019 20:00:01 +0300 Subject: [PATCH] ap: add support for WS2016-2019 --- win/tools/autopatch/autopatch.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/win/tools/autopatch/autopatch.py b/win/tools/autopatch/autopatch.py index 77782a3..99074ad 100755 --- a/win/tools/autopatch/autopatch.py +++ b/win/tools/autopatch/autopatch.py @@ -168,9 +168,13 @@ def main(): "300": "", "301": "nsd_", } - installer_basename = os.path.basename(args.installer_file) - os_prefix = ('ws2012_x64' if 'winserv' in installer_basename.lower() - else 'win10_x64') + installer_name = os.path.basename(args.installer_file).lower() + if 'winserv2008' in installer_name: + os_prefix = 'ws2012_x64' + elif 'winserv-2016' in installer_name: + os_prefix = 'ws2016_x64' + else: + os_prefix = 'win10_x64' driver_name = drv_prefix[product_type] + version out_dir = os.path.join( os.path.dirname(