aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/mkqt5bld.py
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@theqtcompany.com>2015-05-19 13:33:52 +0300
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-05-26 09:42:30 +0000
commite94be3f3ffa9f9f6ba34323cd6010f8c4bb25d5b (patch)
tree6d2ba1b6a2a495d01a6b2745046fc74be9d10837 /packaging-tools/mkqt5bld.py
parent8ddaaf1a8148994f0dcc15ae16646b3e8eb857fe (diff)
Archive .pdb files separately
If .pdb files exists in release packages archive them into separate qt5_pdb.7z archive for further usage. Change-Id: Ia0d584e2f1feb434c7c6bf7bd623068b8eb95c8b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Diffstat (limited to 'packaging-tools/mkqt5bld.py')
-rw-r--r--packaging-tools/mkqt5bld.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/packaging-tools/mkqt5bld.py b/packaging-tools/mkqt5bld.py
index 69220a1fb..6507b8970 100644
--- a/packaging-tools/mkqt5bld.py
+++ b/packaging-tools/mkqt5bld.py
@@ -54,6 +54,7 @@ import patch_qmake_qt_key
from optparse import OptionParser, Option
import shlex
import time
+import fnmatch
SCRIPT_ROOT_DIR = os.getcwd()
WORK_DIR_NAME = 'qt5_workdir'
@@ -672,6 +673,9 @@ def archive_submodules():
print_wrap('---------------- Archiving submodules ------------------------------')
bldinstallercommon.create_dirs(MODULE_ARCHIVE_DIR)
+ # archive .pdb files into separate archive if such exists
+ archive_pdb_files(MAKE_INSTALL_ROOT_DIR, MODULE_ARCHIVE_DIR)
+
if QNX_BUILD:
print_wrap('---------- Archiving Qt modules')
install_path = MAKE_INSTALL_ROOT_DIR + os.sep + SINGLE_INSTALL_DIR_NAME
@@ -697,6 +701,24 @@ def archive_submodules():
###############################
# function
###############################
+def archive_pdb_files(search_dir, destination_dir):
+ pdb_tmp_dir = os.path.join(destination_dir, 'pdb_tmp')
+ bldinstallercommon.create_dirs(pdb_tmp_dir)
+ # locate
+ for root, dirnames, filenames in os.walk(search_dir):
+ for filename in fnmatch.filter(filenames, '*.pdb'):
+ shutil.move(os.path.join(root, filename), os.path.join(pdb_tmp_dir, filename))
+ # archive if pdb files found
+ if os.listdir(pdb_tmp_dir):
+ cmd_args = '7z a ' + destination_dir + os.sep + 'qt5_pdb.7z *'
+ bldinstallercommon.do_execute_sub_process(cmd_args.split(' '), pdb_tmp_dir, True, True)
+ # remove tmp dir
+ bldinstallercommon.remove_tree(pdb_tmp_dir)
+
+
+###############################
+# function
+###############################
def patch_android_prl_files():
## QTBUG-33660
# remove references to absolute path of the NDK on the build machine