diff options
author | Iikka Eklund <iikka.eklund@theqtcompany.com> | 2015-11-01 22:03:52 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-11-02 06:48:43 +0000 |
commit | 1abc30c6e1f131ab0ef4e17bf979758e39e8eb99 (patch) | |
tree | 0851abedeada54ef47660d5fe0fc442f3e38f7be /packaging-tools/create_installer.py | |
parent | 7d07c4e56eb483646987eb4d555a0884f1968b1c (diff) |
Use short path names on Windows
Temporary paths exceed 255 characters on Windows which cause errors
when handling the paths. Use win32api to generate Windows short style
paths.
Change-Id: I7863258024f922c39b475bde9f003d799e429102
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Diffstat (limited to 'packaging-tools/create_installer.py')
-rw-r--r-- | packaging-tools/create_installer.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packaging-tools/create_installer.py b/packaging-tools/create_installer.py index 91174dd98..fad9afd1d 100644 --- a/packaging-tools/create_installer.py +++ b/packaging-tools/create_installer.py @@ -50,6 +50,9 @@ import re from time import gmtime, strftime from optparse import OptionParser, Option import multiprocessing # to get the cpu core count +import platform +if platform.system().lower().startswith('win'): + import win32api from threadedwork import ThreadedWork import bld_utils @@ -926,6 +929,9 @@ def create_target_components(target_config): bldinstallercommon.create_dirs(install_dir) if not os.path.lexists(data_dir_dest): bldinstallercommon.create_dirs(data_dir_dest) + if platform.system().lower().startswith('win'): + install_dir = win32api.GetShortPathName(install_dir) + data_dir_dest = win32api.GetShortPathName(data_dir_dest) getComponentDataWork.addTask("adding {0} to {1}".format(archive.archive_name, sdk_component.package_name), get_component_data, sdk_component, archive, install_dir, data_dir_dest, compress_content_dir) |