From 25b97dfce73c09b1fdf77eb45f6fb147f8af82e8 Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Mon, 20 May 2019 00:35:46 +0300 Subject: [PATCH] ap: add some support for Windows Server drivers --- win/tools/autopatch/autopatch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/win/tools/autopatch/autopatch.py b/win/tools/autopatch/autopatch.py index 0ab7fab..f5b1af6 100755 --- a/win/tools/autopatch/autopatch.py +++ b/win/tools/autopatch/autopatch.py @@ -168,10 +168,13 @@ def main(): "300": "", "301": "crd_", } + installer_basename = os.path.basename(args.installer_file) + os_prefix = ('ws2012_x64' if 'winserv' in installer_basename.lower() + else 'win10_x64') driver_name = drv_prefix[product_type] + version out_dir = os.path.join( os.path.dirname( - os.path.abspath(__file__)), '..', '..', 'win10_x64', driver_name) + os.path.abspath(__file__)), '..', '..', os_prefix, driver_name) os.mkdir(out_dir, 0o755) out_filename = os.path.join(out_dir, os.path.splitext(args.target_name)[0] + PATCH_EXT)