From 2c8d9425686b32c73c28573cc3612a7e9a5c27b5 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Fri, 9 Nov 2018 18:05:40 -0800 Subject: [PATCH] add error if library is not included #1924 Signed-off-by: Nikolaj Bjorner --- scripts/mk_win_dist.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/mk_win_dist.py b/scripts/mk_win_dist.py index 384e1d080..e226a275e 100644 --- a/scripts/mk_win_dist.py +++ b/scripts/mk_win_dist.py @@ -258,7 +258,7 @@ def cp_vs_runtime(x64): platform = "x86" vcdir = os.environ['VCINSTALLDIR'] path = '%sredist\\%s' % (vcdir, platform) - VS_RUNTIME_FILES = [] + vs_runtime_files = [] for root, dirs, files in os.walk(path): for filename in files: if fnmatch(filename, '*.dll'): @@ -266,10 +266,11 @@ def cp_vs_runtime(x64): if pat.match(filename): fname = os.path.join(root, filename) if not os.path.isdir(fname): - VS_RUNTIME_FILES.append(fname) - + vs_runtime_files.append(fname) + if not vs_runtime_files: + raise MKException("Did not find any runtime files to include") bin_dist_path = os.path.join(DIST_DIR, get_dist_path(x64), 'bin') - for f in VS_RUNTIME_FILES: + for f in vs_runtime_files: shutil.copy(f, bin_dist_path) if is_verbose(): print("Copied '%s' to '%s'" % (f, bin_dist_path))