Skip to content
Snippets Groups Projects
Commit 6b142cd3 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

build: Windows: add a parameter to supply the crash report URL

This commit adds a parameter to the Windows-specific build script to
supply the crash report URL.

Gitlab: #1454
Change-Id: I9f131354c3e9041d068e399fd432c3f6c8325f51
parent 4e235d60
No related branches found
No related tags found
No related merge requests found
...@@ -261,7 +261,7 @@ def cmake_build(config_str, env_vars, cmake_build_dir): ...@@ -261,7 +261,7 @@ def cmake_build(config_str, env_vars, cmake_build_dir):
return True return True
def build(config_str, qt_dir, tests, enable_crash_reports): def build(config_str, qt_dir, tests, enable_crash_reports, crash_report_url=None):
"""Use cmake to build the project.""" """Use cmake to build the project."""
print("Building with Qt at " + qt_dir) print("Building with Qt at " + qt_dir)
...@@ -287,6 +287,8 @@ def build(config_str, qt_dir, tests, enable_crash_reports): ...@@ -287,6 +287,8 @@ def build(config_str, qt_dir, tests, enable_crash_reports):
if enable_crash_reports: if enable_crash_reports:
cmake_options.append("-DENABLE_CRASHREPORTS=ON") cmake_options.append("-DENABLE_CRASHREPORTS=ON")
if crash_report_url:
cmake_options.append(f"-DCRASH_REPORT_URL={crash_report_url}")
else: else:
cmake_options.append("-DENABLE_CRASHREPORTS=OFF") cmake_options.append("-DENABLE_CRASHREPORTS=OFF")
...@@ -347,8 +349,8 @@ def deploy_runtimes(config_str, qt_dir): ...@@ -347,8 +349,8 @@ def deploy_runtimes(config_str, qt_dir):
install_file("resources/images/jami.ico", repo_root_dir) install_file("resources/images/jami.ico", repo_root_dir)
# windeployqt # windeployqt
print("Running windeployqt (this may take a while)...")
win_deploy_qt = os.path.join(qt_dir, "bin", "windeployqt.exe") win_deploy_qt = os.path.join(qt_dir, "bin", "windeployqt.exe")
print(f"Running windeployqt ({win_deploy_qt}) (this may take a while)...")
qml_src_dir = os.path.join(repo_root_dir, "src", "app") qml_src_dir = os.path.join(repo_root_dir, "src", "app")
installation_dir = get_vs_prop("installationPath") installation_dir = get_vs_prop("installationPath")
if not installation_dir: if not installation_dir:
...@@ -491,6 +493,10 @@ def parse_args(): ...@@ -491,6 +493,10 @@ def parse_args():
action='store_true', action='store_true',
default=False, default=False,
help='Enable crash reporting') help='Enable crash reporting')
parser.add_argument(
'--crash-report-url',
help='Override the crash report submission URL',
default=None)
pack_arg_parser = subparsers.add_parser("pack") pack_arg_parser = subparsers.add_parser("pack")
pack_group = pack_arg_parser.add_mutually_exclusive_group(required=True) pack_group = pack_arg_parser.add_mutually_exclusive_group(required=True)
...@@ -543,7 +549,9 @@ def main(): ...@@ -543,7 +549,9 @@ def main():
def do_build(do_tests): def do_build(do_tests):
if not parsed_args.skip_build: if not parsed_args.skip_build:
build(config_str, parsed_args.qt, do_tests, parsed_args.enable_crash_reports) build(config_str, parsed_args.qt, do_tests,
parsed_args.enable_crash_reports,
parsed_args.crash_report_url)
if not parsed_args.skip_deploy: if not parsed_args.skip_deploy:
deploy_runtimes(config_str, parsed_args.qt) deploy_runtimes(config_str, parsed_args.qt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment