From 6d969cab51f4c32784966a28b8b9d5fe2d5b2089 Mon Sep 17 00:00:00 2001 From: Petr Prikryl Date: Mon, 26 May 2014 11:43:50 +0200 Subject: winbuild/pack_the_distribution_for_windows.py minor updates - it failed when one of the doxygen.exe was not present --- winbuild/pack_the_distribution_for_windows.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/winbuild/pack_the_distribution_for_windows.py b/winbuild/pack_the_distribution_for_windows.py index a1b6c19..dc2c3d9 100644 --- a/winbuild/pack_the_distribution_for_windows.py +++ b/winbuild/pack_the_distribution_for_windows.py @@ -1,4 +1,4 @@ -#! python2 +#!python2 from __future__ import print_function @@ -92,16 +92,18 @@ def copyBinaries(dist_dir, subdir): # Source file should exist. sdir, fname = getThisScriptPathAndName() src = os.path.normpath(os.path.join(sdir, '..', 'bin', subdir, 'doxygen.exe')) - assert os.path.isfile(src) - - # Destination directory must not exist. It must be created first. - dst_dir = os.path.normpath(os.path.join(dist_dir, 'bin', subdir)) - assert not os.path.isdir(dst_dir) - os.makedirs(dst_dir) - - # Copy the file. - print("Copying '{}'".format(src)) - shutil.copy2(src, dst_dir) + if os.path.isfile(src): + # Destination directory must not exist. It must be created first. + dst_dir = os.path.normpath(os.path.join(dist_dir, 'bin', subdir)) + assert not os.path.isdir(dst_dir) + os.makedirs(dst_dir) + + # Copy the file. + print("Copying '{}'".format(src)) + shutil.copy2(src, dst_dir) + else: + print("The binary '" + src + "'") + print('was not found. It will not be present in the distribution.') def getBinariesZipBareName(): -- cgit v0.12