Beispiel #1
0
def handle_installer_build(optionDict, installer_type, branch, arch):
    conf_file = optionDict['RELEASE_DESCRIPTION_FILE']
    print('Parsing [{0}] installer build jobs from: {0}'.format(conf_file))
    if not os.path.isfile(conf_file):
        raise IOError('*** Fatal error! Given file does not exist: {0}'.format(
            conf_file))
    init_env(optionDict)
    license_type = optionDict['LICENSE']
    platform = optionDict['HOST_PLATFORM']
    packages_base_url = optionDict['PACKAGE_STORAGE_SERVER_PATH_HTTP']
    # parse conf file
    parser = ConfigParser.ConfigParser()
    parser.readfp(open(conf_file))
    section_name = branch + '.' + 'global'
    global_version = bldinstallercommon.safe_config_key_fetch(
        parser, section_name, 'version')
    global_version_tag = bldinstallercommon.safe_config_key_fetch(
        parser, section_name, 'version_tag')
    if not global_version:
        raise RuntimeError(
            '*** Fatal error! Invalid values in {0} -> {1}'.format(
                conf_file, section_name))
    # parse build jobs
    job_list = get_job_list(optionDict, installer_type, branch, arch,
                            global_version, global_version_tag)
    if (len(job_list) == 0):
        raise RuntimeError(
            '*** Fatal error! No [{0}] installer build jobs found from: {1}. Probably an error?'
            .format(installer_type, conf_file))
    installer_output_dir = os.path.join(
        SCRIPT_ROOT_DIR, pkg_constants.INSTALLER_OUTPUT_DIR_NAME)
    rta_descr_output_dir = os.path.join(
        SCRIPT_ROOT_DIR, pkg_constants.RTA_DESCRIPTION_FILE_DIR_NAME)
    bldinstallercommon.create_dirs(rta_descr_output_dir)
    # create rta description file
    architecture = bldinstallercommon.get_architecture()
    plat_suffix = bldinstallercommon.get_platform_suffix()
    rta_description_file_name = os.path.join(
        rta_descr_output_dir, pkg_constants.RTA_DESCRIPTION_FILE_NAME_BASE +
        '-' + plat_suffix + '-' + architecture + '.txt')
    # handle build jobs
    for job in job_list:
        # create installer
        type_arg = '--online' if 'online' in installer_type.lower(
        ) else '--offline'
        creation_ok = create_installer(job, packages_base_url, type_arg)
        # write the rta description file only if installer creation was ok
        if (creation_ok):
            rta_description_file = open(rta_description_file_name, 'a')
            rta_description_file.write(job.installer_name + ' ' +
                                       job.rta_key_list + '\n')
            rta_description_file.close()
    # if "/installer_output" directory is empty -> error
    if not os.listdir(installer_output_dir):
        raise RuntimeError(
            '*** Fatal error! No installers generated into: %s' %
            installer_output_dir)
def handle_repo_build(optionDict, branch, arch, update_staging_repo, update_production_repo):
    conf_file = optionDict['RELEASE_DESCRIPTION_FILE']
    if not os.path.isfile(conf_file):
        raise IOError('*** Fatal error! Given file does not exist: %s' % conf_file)
    init_env(optionDict)
    packages_base_url   = optionDict['PACKAGE_STORAGE_SERVER_PATH_HTTP']
    ifw_base_url        = optionDict['IFW_TOOLS_BASE_URL']
    release_tools_dir   = SCRIPT_ROOT_DIR
    # parse conf file
    parser = ConfigParser.ConfigParser()
    parser.readfp(open(conf_file))
    section_name = branch + '.' + 'global'
    global_version     = bldinstallercommon.safe_config_key_fetch(parser, section_name, 'version')
    global_version_tag = bldinstallercommon.safe_config_key_fetch(parser, section_name, 'version_tag')
    # parse build jobs
    repo_job_list = get_repo_job_list(optionDict, branch, arch, global_version, global_version_tag)
    if (len(repo_job_list) == 0):
        raise RuntimeError('*** Fatal error! No repository build jobs found. Probably an error? %s' % conf_file)
    # init repo dirs
    init_repositories(optionDict, repo_job_list)
    # is this snapshot build? Then enable component version number forced update
    forced_version_number_bump = False
    if update_staging_repo and not update_production_repo:
        forced_version_number_bump = True
    if optionDict.get('FORCE_VERSION_NUMBER_INCREASE') in ['yes', 'true', '1']:
        forced_version_number_bump = True

    # create rta description file
    rta_descr_output_dir = os.path.join(SCRIPT_ROOT_DIR, pkg_constants.RTA_DESCRIPTION_FILE_DIR_NAME)
    bldinstallercommon.create_dirs(rta_descr_output_dir)
    architecture = bldinstallercommon.get_architecture()
    plat_suffix = bldinstallercommon.get_platform_suffix()
    rta_description_file_name = os.path.join( rta_descr_output_dir, pkg_constants.RTA_DESCRIPTION_FILE_NAME_BASE + '-' + plat_suffix + '-' + architecture + '-repo.txt')

    # handle repo build jobs
    for job in repo_job_list:
        create_online_repository(job, packages_base_url, forced_version_number_bump)
        # determine testination path on test server
        dest_path_repository, dest_path_pkg = generate_repo_dest_path_pending(optionDict, job)
        # copy repo content to test server
        source_path_repository  = os.path.join(release_tools_dir, 'repository')
        source_path_pkg         = os.path.join(release_tools_dir, 'pkg')
        push_online_repository(optionDict, optionDict['PKG_STAGING_SERVER'], optionDict['PKG_STAGING_SERVER_UNAME'], source_path_repository, dest_path_repository)
        push_online_repository(optionDict, optionDict['PKG_STAGING_SERVER'], optionDict['PKG_STAGING_SERVER_UNAME'], source_path_pkg, dest_path_pkg)
        # remove local repository and pkg directories
        bldinstallercommon.remove_tree(source_path_repository)
        bldinstallercommon.remove_tree(source_path_pkg)
        # update repo in testing area
        staging_repo_updated, dummy = update_online_repo(optionDict, job, update_staging_repo, update_production_repo)
        # write the rta description file only if staging repository creation was ok
        if (staging_repo_updated):
            rta_description_file = open(rta_description_file_name, 'a')
            rta_description_file.write(job.repo_url_specifier + ' ' + job.rta_key_list + '\n')
            rta_description_file.close()
def handle_installer_build(optionDict, installer_type, branch, arch):
    conf_file = optionDict["RELEASE_DESCRIPTION_FILE"]
    print("Parsing [{0}] installer build jobs from: {0}".format(conf_file))
    if not os.path.isfile(conf_file):
        raise IOError("*** Fatal error! Given file does not exist: {0}".format(conf_file))
    init_env(optionDict)
    license_type = optionDict["LICENSE"]
    platform = optionDict["HOST_PLATFORM"]
    packages_base_url = optionDict["PACKAGE_STORAGE_SERVER_PATH_HTTP"]
    # parse conf file
    parser = ConfigParser.ConfigParser()
    parser.readfp(open(conf_file))
    section_name = branch + "." + "global"
    global_version = bldinstallercommon.safe_config_key_fetch(parser, section_name, "version")
    global_version_tag = bldinstallercommon.safe_config_key_fetch(parser, section_name, "version_tag")
    if not global_version:
        raise RuntimeError("*** Fatal error! Invalid values in {0} -> {1}".format(conf_file, section_name))
    # parse build jobs
    job_list = get_job_list(optionDict, installer_type, branch, arch, global_version, global_version_tag)
    if len(job_list) == 0:
        raise RuntimeError(
            "*** Fatal error! No [{0}] installer build jobs found from: {1}. Probably an error?".format(
                installer_type, conf_file
            )
        )
    installer_output_dir = os.path.join(SCRIPT_ROOT_DIR, pkg_constants.INSTALLER_OUTPUT_DIR_NAME)
    rta_descr_output_dir = os.path.join(SCRIPT_ROOT_DIR, pkg_constants.RTA_DESCRIPTION_FILE_DIR_NAME)
    bldinstallercommon.create_dirs(rta_descr_output_dir)
    # create rta description file
    architecture = bldinstallercommon.get_architecture()
    plat_suffix = bldinstallercommon.get_platform_suffix()
    rta_description_file_name = os.path.join(
        rta_descr_output_dir,
        pkg_constants.RTA_DESCRIPTION_FILE_NAME_BASE + "-" + plat_suffix + "-" + architecture + ".txt",
    )
    # handle build jobs
    for job in job_list:
        # create installer
        type_arg = "--online" if "online" in installer_type.lower() else "--offline"
        creation_ok = create_installer(job, packages_base_url, type_arg)
        # write the rta description file only if installer creation was ok
        if creation_ok:
            rta_description_file = open(rta_description_file_name, "a")
            rta_description_file.write(job.installer_name + " " + job.rta_key_list + "\n")
            rta_description_file.close()
    # if "/installer_output" directory is empty -> error
    if not os.listdir(installer_output_dir):
        raise RuntimeError("*** Fatal error! No installers generated into: %s" % installer_output_dir)
def handle_repo_build(optionDict, branch, arch, update_staging_repo, update_production_repo):
    conf_file = optionDict["RELEASE_DESCRIPTION_FILE"]
    if not os.path.isfile(conf_file):
        raise IOError("*** Fatal error! Given file does not exist: %s" % conf_file)
    init_env(optionDict)
    packages_base_url = optionDict["PACKAGE_STORAGE_SERVER_PATH_HTTP"]
    ifw_base_url = optionDict["IFW_TOOLS_BASE_URL"]
    release_tools_dir = SCRIPT_ROOT_DIR
    # parse conf file
    parser = ConfigParser.ConfigParser()
    parser.readfp(open(conf_file))
    section_name = branch + "." + "global"
    global_version = bldinstallercommon.safe_config_key_fetch(parser, section_name, "version")
    global_version_tag = bldinstallercommon.safe_config_key_fetch(parser, section_name, "version_tag")
    # parse build jobs
    repo_job_list = get_repo_job_list(optionDict, branch, arch, global_version, global_version_tag)
    if len(repo_job_list) == 0:
        raise RuntimeError("*** Fatal error! No repository build jobs found. Probably an error? %s" % conf_file)
    # init repo dirs
    init_repositories(optionDict, repo_job_list)
    # is this snapshot build? Then enable component version number forced update
    forced_version_number_bump = False
    if update_staging_repo and not update_production_repo:
        forced_version_number_bump = True
    # create rta description file
    rta_descr_output_dir = os.path.join(SCRIPT_ROOT_DIR, pkg_constants.RTA_DESCRIPTION_FILE_DIR_NAME)
    bldinstallercommon.create_dirs(rta_descr_output_dir)
    architecture = bldinstallercommon.get_architecture()
    plat_suffix = bldinstallercommon.get_platform_suffix()
    rta_description_file_name = os.path.join(
        rta_descr_output_dir,
        pkg_constants.RTA_DESCRIPTION_FILE_NAME_BASE + "-" + plat_suffix + "-" + architecture + "-repo.txt",
    )

    # handle repo build jobs
    for job in repo_job_list:
        create_online_repository(job, packages_base_url, forced_version_number_bump)
        # determine testination path on test server
        dest_path_repository, dest_path_pkg = generate_repo_dest_path_pending(optionDict, job)
        # copy repo content to test server
        source_path_repository = os.path.join(release_tools_dir, "repository")
        source_path_pkg = os.path.join(release_tools_dir, "pkg")
        push_online_repository(
            optionDict,
            optionDict["PKG_STAGING_SERVER"],
            optionDict["PKG_STAGING_SERVER_UNAME"],
            source_path_repository,
            dest_path_repository,
        )
        push_online_repository(
            optionDict,
            optionDict["PKG_STAGING_SERVER"],
            optionDict["PKG_STAGING_SERVER_UNAME"],
            source_path_pkg,
            dest_path_pkg,
        )
        # remove local repository and pkg directories
        bldinstallercommon.remove_tree(source_path_repository)
        bldinstallercommon.remove_tree(source_path_pkg)
        # update repo in testing area
        staging_repo_updated, dummy = update_online_repo(optionDict, job, update_staging_repo, update_production_repo)
        # write the rta description file only if staging repository creation was ok
        if staging_repo_updated:
            rta_description_file = open(rta_description_file_name, "a")
            rta_description_file.write(job.repo_url_specifier + " " + job.rta_key_list + "\n")
            rta_description_file.close()
Beispiel #5
0
    def __init__(self,
                 qt_source_package_uri,
                 qt_configure_options,
                 qt_installer_framework_uri,
                 qt_installer_framework_branch,
                 qt_installer_framework_qmake_args,
                 openssl_dir,
                 product_key_checker_pri,
                 incremental_build=False):
        self.incremental_mode = incremental_build
        self.qt_source_dir = os.path.join(ROOT_DIR, 'qt-src')
        self.qt_build_dir = os.path.join(ROOT_DIR, 'qt-bld')
        self.qt_build_dir_dynamic = os.path.join(ROOT_DIR, 'qt-bld-dynamic')
        self.installer_framework_source_dir = os.path.join(ROOT_DIR, 'ifw-src')
        self.installer_framework_build_dir = os.path.join(ROOT_DIR, 'ifw-bld')
        self.installer_framework_pkg_dir = os.path.join(ROOT_DIR, 'ifw-pkg')
        self.installer_framework_target_dir = os.path.join(
            ROOT_DIR, 'ifw-target')
        self.qt_installer_framework_uri = qt_installer_framework_uri
        self.qt_installer_framework_uri_saveas = os.path.join(
            ROOT_DIR, os.path.basename(self.qt_installer_framework_uri))
        self.qt_installer_framework_branch = qt_installer_framework_branch
        self.qt_installer_framework_qmake_args = qt_installer_framework_qmake_args
        self.openssl_dir = openssl_dir
        self.qt_build_modules = " module-qtbase module-qtdeclarative module-qttools module-qttranslations"
        self.qt_build_modules_docs = " module-qttools"
        if bldinstallercommon.is_win_platform():
            self.qt_build_modules += " module-qtwinextras"
            self.make_cmd = 'nmake'
            self.make_doc_cmd = 'nmake'
            self.make_install_cmd = 'nmake install'
            self.qt_qmake_bin = 'qmake.exe'
            self.qt_configure_bin = self.qt_source_dir + os.sep + 'configure.bat'
        else:
            self.make_cmd = 'make -j' + str(multiprocessing.cpu_count() + 1)
            self.make_doc_cmd = 'make'
            self.make_install_cmd = 'make install'
            self.qt_qmake_bin = 'qmake'
            self.qt_configure_bin = self.qt_source_dir + os.sep + 'configure'

        self.build_artifacts_dir = os.path.join(
            ROOT_DIR, pkg_constants.IFW_BUILD_ARTIFACTS_DIR)
        self.mac_deploy_qt_archive_name = 'macdeployqt.7z'
        self.mac_qt_menu_nib_archive_name = 'qt_menu.nib.7z'
        # determine filenames used later on
        self.architecture = ''
        # if this is cross-compilation attempt to parse the target architecture from the given -platform
        if '-platform' in qt_configure_options:
            temp = qt_configure_options.split(' ')
            plat = temp[temp.index('-platform') + 1]
            bits = ''.join(re.findall(r'\d+', plat))
            if bits == '32':
                self.architecture = 'x86'
            else:
                self.architecture = 'x64'
        if not self.architecture:
            self.architecture = bldinstallercommon.get_architecture()
        self.plat_suffix = bldinstallercommon.get_platform_suffix()
        self.installer_framework_archive_name = 'installer-framework-build-' + self.plat_suffix + '-' + self.architecture + '.7z'
        self.installer_base_archive_name = 'installerbase-' + self.plat_suffix + '-' + self.architecture + '.7z'
        self.installer_framework_payload_arch = 'installer-framework-build-stripped-' + self.plat_suffix + '-' + self.architecture + '.7z'
        self.qt_source_package_uri = qt_source_package_uri
        self.qt_source_package_uri_saveas = os.path.join(
            ROOT_DIR, os.path.basename(self.qt_source_package_uri))
        # Set Qt build prefix
        qt_prefix = ' -prefix ' + self.qt_build_dir + os.sep + 'qtbase'
        self.qt_configure_options = qt_configure_options + qt_prefix
        # Product key checker
        self.product_key_checker_pri = product_key_checker_pri
        if product_key_checker_pri:
            if os.path.isfile(product_key_checker_pri):
                self.qt_installer_framework_qmake_args += [
                    '-r',
                    'PRODUCTKEYCHECK_PRI_FILE=' + self.product_key_checker_pri
                ]
        # macOS specific
        if bldinstallercommon.is_mac_platform():
            self.qt_installer_framework_qmake_args += [
                '-r', '"LIBS+=-framework IOKit"'
            ]
        # sanity check
        self.sanity_check()
def handle_repo_build(optionDict, branch, arch, update_staging_repo, update_production_repo):
    conf_file = optionDict['RELEASE_DESCRIPTION_FILE']
    if not os.path.isfile(conf_file):
        raise IOError('*** Fatal error! Given file does not exist: %s' % conf_file)
    init_env(optionDict)
    packages_base_url   = optionDict['PACKAGE_STORAGE_SERVER_PATH_HTTP']
    ifw_base_url        = optionDict['IFW_TOOLS_BASE_URL']
    release_tools_dir   = SCRIPT_ROOT_DIR
    # parse conf file
    parser = ConfigParser.ConfigParser()
    parser.readfp(open(conf_file))
    section_name = branch + '.' + 'global'
    global_version     = bldinstallercommon.safe_config_key_fetch(parser, section_name, 'version')
    global_version_tag = bldinstallercommon.safe_config_key_fetch(parser, section_name, 'version_tag')
    # parse build jobs
    repo_job_list = get_repo_job_list(optionDict, branch, arch, global_version, global_version_tag)
    if (len(repo_job_list) == 0):
        raise RuntimeError('*** Fatal error! No repository build jobs found. Probably an error? %s' % conf_file)
    # init repo dirs
    init_repositories(optionDict, repo_job_list)
    # is this snapshot build? Then enable component version number forced update
    forced_version_number_bump = False
    if update_staging_repo and not update_production_repo:
        forced_version_number_bump = True
    if optionDict.get('FORCE_VERSION_NUMBER_INCREASE') in ['yes', 'true', '1']:
        forced_version_number_bump = True

    # create rta description file
    rta_descr_output_dir = os.path.join(SCRIPT_ROOT_DIR, pkg_constants.RTA_DESCRIPTION_FILE_DIR_NAME)
    bldinstallercommon.create_dirs(rta_descr_output_dir)
    architecture = bldinstallercommon.get_architecture()
    plat_suffix = bldinstallercommon.get_platform_suffix()
    rta_description_file_name = os.path.join( rta_descr_output_dir, pkg_constants.RTA_DESCRIPTION_FILE_NAME_BASE + '-' + plat_suffix + '-' + architecture + '-repo.txt')

    # handle repo build jobs
    for job in repo_job_list:
        create_online_repository(job, packages_base_url, forced_version_number_bump)
        # determine testination path on test server
        dest_path_repository, dest_path_pkg = generate_repo_dest_path_pending(optionDict, job)
        # copy repo content to test server
        source_path_repository  = os.path.join(release_tools_dir, 'online_repository')
        source_path_pkg         = os.path.join(release_tools_dir, 'pkg')
        push_online_repository(optionDict, optionDict['PKG_STAGING_SERVER'], optionDict['PKG_STAGING_SERVER_UNAME'], source_path_repository, dest_path_repository)
        push_online_repository(optionDict, optionDict['PKG_STAGING_SERVER'], optionDict['PKG_STAGING_SERVER_UNAME'], source_path_pkg, dest_path_pkg)
        # remove local repository and pkg directories
        bldinstallercommon.remove_tree(source_path_repository)
        bldinstallercommon.remove_tree(source_path_pkg)
        # update repo in testing area
        staging_repo_updated, production_repo_updated = update_online_repo(optionDict, job, update_staging_repo, update_production_repo)
        # write the rta description file only if staging repository creation was ok
        # remove also temp staging repositories from 'staging_pending' and 'production_dist_update_work' directories
        server_addr = optionDict['PKG_STAGING_SERVER_UNAME'] + '@' + optionDict['PKG_STAGING_SERVER']
        if (staging_repo_updated):
            rta_description_file = open(rta_description_file_name, 'a')
            rta_description_file.write(job.repo_url_specifier + ' ' + job.rta_key_list + '\n')
            rta_description_file.close()
            staging_temp_content_to_be_deleted = generate_repo_path_for_pending_area(optionDict, job)
            delete_online_repo_paths(optionDict, server_addr, staging_temp_content_to_be_deleted)
        if (production_repo_updated):
            production_temp_content_to_be_deleted = optionDict['REPO_STAGING_SERVER_TEST_REPO_DIST_WORK'] + '/' + optionDict['ONLINE_REPOSITORY_BASE_NAME'] + '/' + job.repo_url_specifier
            delete_online_repo_paths(optionDict, server_addr, production_temp_content_to_be_deleted)
Beispiel #7
0
    def __init__(self,
                 qt_source_package_uri,
                 qt_configure_options,
                 qt_installer_framework_uri,
                 qt_installer_framework_branch,
                 qt_installer_framework_qmake_args,
                 openssl_dir,
                 product_key_checker_pri,
                 qt_binaries_static,
                 qt_binaries_dynamic,
                 signserver,
                 signpwd,
                 incremental_build = False,
                 squish_dir = "",
                 squish_src = ""
                 ):
        self.squish_dir                                 = squish_dir
        self.squish_src                                 = squish_src
        self.signserver                                 = signserver
        self.signpwd                                    = signpwd
        self.incremental_mode                           = incremental_build
        self.qt_source_dir                              = os.path.join(ROOT_DIR, 'qt-src')
        self.qt_build_dir                               = os.path.join(ROOT_DIR, 'qt-bld')
        self.qt_build_dir_dynamic                       = os.path.join(ROOT_DIR, 'qt-bld-dynamic')
        self.installer_framework_source_dir             = os.path.join(ROOT_DIR, 'ifw-src')
        self.installer_framework_build_dir              = os.path.join(ROOT_DIR, 'ifw-bld')
        self.installer_framework_build_dir_squish       = os.path.join(ROOT_DIR, 'ifw-bld_squish')
        self.installer_framework_pkg_dir                = os.path.join(ROOT_DIR, 'ifw-pkg')
        self.installer_framework_target_dir             = os.path.join(ROOT_DIR, 'ifw-target')
        self.qt_installer_framework_uri                 = qt_installer_framework_uri
        self.qt_installer_framework_uri_saveas          = os.path.join(ROOT_DIR, os.path.basename(self.qt_installer_framework_uri))
        self.qt_installer_framework_branch              = qt_installer_framework_branch
        self.qt_installer_framework_branch_pretty       = qt_installer_framework_branch.replace("/", "_")
        self.qt_installer_framework_qmake_args          = qt_installer_framework_qmake_args
        self.openssl_dir                                = openssl_dir
        self.qt_binaries_static                         = qt_binaries_static
        if self.qt_binaries_static:
            self.qt_binaries_static_saveas              = os.path.join(ROOT_DIR, os.path.basename(self.qt_binaries_static))
        self.qt_binaries_dynamic                        = qt_binaries_dynamic
        if self.qt_binaries_dynamic:
            self.qt_binaries_dynamic_saveas             = os.path.join(ROOT_DIR, os.path.basename(self.qt_binaries_dynamic))
        self.qt_build_modules                           = ["qtbase", "qtdeclarative", "qttools", "qttranslations"]
        self.qt_build_modules_docs                      = ["qtbase", "qttools"]
        if bldinstallercommon.is_win_platform():
            self.qt_build_modules.append("qtwinextras")
            self.make_cmd                               = 'jom.exe'
            self.make_doc_cmd                           = 'jom.exe'
            self.make_install_cmd                       = 'jom.exe install'
            self.qt_qmake_bin                           = 'qmake.exe'
            self.qt_configure_bin                       = self.qt_source_dir + os.sep + 'configure.bat'
        else:
            self.make_cmd                               = 'make -j' + str(multiprocessing.cpu_count() + 1)
            self.make_doc_cmd                           = 'make'
            self.make_install_cmd                       = 'make install'
            self.qt_qmake_bin                           = 'qmake'
            self.qt_configure_bin                       = self.qt_source_dir + os.sep + 'configure'

        self.build_artifacts_dir                        = os.path.join(ROOT_DIR, pkg_constants.IFW_BUILD_ARTIFACTS_DIR)
        self.mac_deploy_qt_archive_name                 = 'macdeployqt.7z'
        self.mac_qt_menu_nib_archive_name               = 'qt_menu.nib.7z'
        # determine filenames used later on
        self.architecture = ''
        # if this is cross-compilation attempt to parse the target architecture from the given -platform
        if '-platform' in qt_configure_options:
            temp = qt_configure_options.split(' ')
            plat = temp[temp.index('-platform') + 1]
            bits = ''.join(re.findall(r'\d+', plat))
            if bits == '32':
                self.architecture = 'x86'
            else:
                self.architecture = 'x64'
        if not self.architecture:
            self.architecture = bldinstallercommon.get_architecture()
        self.plat_suffix                                = bldinstallercommon.get_platform_suffix()
        self.installer_framework_archive_name           = 'installer-framework-build-' + self.qt_installer_framework_branch_pretty + "-" + self.plat_suffix + '-' + self.architecture + '.7z'
        self.installer_framework_with_squish_archive_name = 'installer-framework-build-squish-' + self.qt_installer_framework_branch_pretty + "-" + self.plat_suffix + '-' + self.architecture + '.7z'
        self.installer_base_archive_name                = 'installerbase-' + self.qt_installer_framework_branch_pretty + "-" + self.plat_suffix + '-' + self.architecture + '.7z'
        self.installer_framework_payload_arch           = 'installer-framework-build-stripped-' + self.qt_installer_framework_branch_pretty + "-" + self.plat_suffix + '-' + self.architecture + '.7z'
        self.qt_source_package_uri                      = qt_source_package_uri
        self.qt_source_package_uri_saveas               = os.path.join(ROOT_DIR, os.path.basename(self.qt_source_package_uri))
        # Set Qt build prefix
        qt_prefix                                       = ' -prefix ' + self.qt_build_dir + os.sep + 'qtbase'
        self.qt_configure_options                       = qt_configure_options + qt_prefix
        # Product key checker
        self.product_key_checker_pri                    = product_key_checker_pri
        if product_key_checker_pri:
            if os.path.isfile(product_key_checker_pri):
                self.qt_installer_framework_qmake_args += ['PRODUCTKEYCHECK_PRI_FILE=' + self.product_key_checker_pri]
        # macOS specific
        if bldinstallercommon.is_mac_platform():
            self.qt_installer_framework_qmake_args     += ['"LIBS+=-framework IOKit"']
        # sanity check
        self.sanity_check()