From ba3a66a8f0d338177bcf1331f8b868b1e8a6da39 Mon Sep 17 00:00:00 2001 From: Iikka Eklund <iikka.eklund@digia.com> Date: Thu, 4 Oct 2012 12:29:04 +0300 Subject: [PATCH] Fix devmode and incremental mode usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Litlle clean up and update function parameter usage Change-Id: If39cae4c889b4471cfdd2020b964e396684a6395 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com> Reviewed-by: Simo Fält <simo.falt@digia.com> --- release-tools/bld_ifw_tools.py | 2 +- release-tools/bld_ifw_tools_impl.py | 11 ++++------- release-tools/create_installer.py | 5 +---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/release-tools/bld_ifw_tools.py b/release-tools/bld_ifw_tools.py index 2c10ff0..93edefb 100644 --- a/release-tools/bld_ifw_tools.py +++ b/release-tools/bld_ifw_tools.py @@ -66,7 +66,7 @@ arg_count = len(sys.argv) if arg_count > 2: configurations_dir = sys.argv[2] # build ifw tools -bld_ifw_tools_impl.build_ifw('release', configurations_dir, platformIdentifier) +bld_ifw_tools_impl.build_ifw(False, False, configurations_dir, platformIdentifier) diff --git a/release-tools/bld_ifw_tools_impl.py b/release-tools/bld_ifw_tools_impl.py index adea6e0..7ef4ec2 100644 --- a/release-tools/bld_ifw_tools_impl.py +++ b/release-tools/bld_ifw_tools_impl.py @@ -430,15 +430,12 @@ def archive_qt(): ############################### # main ############################### -def build_ifw(build_mode, incremental_mode, configurations_dir, platform): +def build_ifw(development_mode, incremental_mode, configurations_dir, platform): global DEVELOPMENT_MODE global INCREMENTAL_MODE global PLATFORM_IDENTIFIER - - if build_mode == 'devmode': - DEVELOPMENT_MODE = True - if incremental_mode == 'incmode': - INCREMENTAL_MODE = True + DEVELOPMENT_MODE = development_mode + INCREMENTAL_MODE = incremental_mode PLATFORM_IDENTIFIER = platform # init @@ -463,7 +460,7 @@ def build_ifw(build_mode, incremental_mode, configurations_dir, platform): archive_macdeployqt() # archive static qt package archive_qt() - if build_mode == 'devmode': + if DEVELOPMENT_MODE: #TODO, the returned values should be in config file, not return it here! return os.path.basename(INSTALLER_FRAMEWORK_BUILD_DIR) else: diff --git a/release-tools/create_installer.py b/release-tools/create_installer.py index 5cacd0f..94ff62d 100644 --- a/release-tools/create_installer.py +++ b/release-tools/create_installer.py @@ -861,10 +861,7 @@ def install_ifw_tools(): # if "devmode" mode used, then build IFW from sources if DEVELOPMENT_MODE: - if INCREMENTAL_MODE: - tools_dir_temp = bld_ifw_tools_impl.build_ifw('devmode', 'incmode', CONFIGURATIONS_DIR, PLATFORM_IDENTIFIER) - else: - tools_dir_temp = bld_ifw_tools_impl.build_ifw('devmode', '', CONFIGURATIONS_DIR, PLATFORM_IDENTIFIER) + tools_dir_temp = bld_ifw_tools_impl.build_ifw(True, INCREMENTAL_MODE, CONFIGURATIONS_DIR, PLATFORM_IDENTIFIER) tools_bin_path = SCRIPT_ROOT_DIR + os.sep + tools_dir_temp else: tools_dir_name = bldinstallercommon.config_section_map(CONFIG_PARSER_TARGET,'InstallerFrameworkTools')['name'] -- GitLab