Skip to content

Commit

Permalink
winbuild/pack_the_distribution_for_windows.py minor updates
Browse files Browse the repository at this point in the history
- it failed when one of the doxygen.exe was not present
  • Loading branch information
pepr committed May 26, 2014
1 parent 64f7743 commit 6d969ca
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions winbuild/pack_the_distribution_for_windows.py
@@ -1,4 +1,4 @@
#! python2
#!python2

from __future__ import print_function

Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 6d969ca

Please sign in to comment.