Skip to content

Commit 487bc2b

Browse files
fix: qchat build on linux minimal (#1832)
1 parent 1468246 commit 487bc2b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

build-scripts/build.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ def build_macos_desktop_app(
248248

249249
info("Building tauri config")
250250
tauri_config_path = pathlib.Path(DESKTOP_PACKAGE_PATH) / "build-config.json"
251-
tauri_config_path.write_text(macos_tauri_config(cli_path=cli_path, chat_path=chat_path, pty_path=pty_path, target=target))
251+
tauri_config_path.write_text(
252+
macos_tauri_config(cli_path=cli_path, chat_path=chat_path, pty_path=pty_path, target=target)
253+
)
252254

253255
info("Building", DESKTOP_PACKAGE_NAME)
254256

@@ -394,13 +396,14 @@ def sign_and_rebundle_macos(app_path: pathlib.Path, dmg_path: pathlib.Path, sign
394396
info("Done signing!!")
395397

396398

397-
def build_linux_minimal(cli_path: pathlib.Path, pty_path: pathlib.Path):
399+
def build_linux_minimal(cli_path: pathlib.Path, pty_path: pathlib.Path, chat_path: pathlib.Path):
398400
"""
399401
Creates tar.gz, tar.xz, tar.zst, and zip archives under `BUILD_DIR`.
400402
401403
Each archive has the following structure:
402404
- archive/bin/q
403405
- archive/bin/qterm
406+
- archive/bin/qchat
404407
- archive/install.sh
405408
- archive/README
406409
- archive/BUILD-INFO
@@ -431,6 +434,7 @@ def build_linux_minimal(cli_path: pathlib.Path, pty_path: pathlib.Path):
431434

432435
shutil.copy2(cli_path, archive_bin_path / CLI_BINARY_NAME)
433436
shutil.copy2(pty_path, archive_bin_path / PTY_BINARY_NAME)
437+
shutil.copy2(chat_path, archive_bin_path / CHAT_BINARY_NAME)
434438

435439
signer = load_gpg_signer()
436440

@@ -708,7 +712,7 @@ def copy_extension(extension_uuid, extension_dir_name):
708712
cwd=DESKTOP_PACKAGE_PATH,
709713
env={**os.environ, **rust_env(release=release, variant=Variant.FULL), "BUILD_DIR": BUILD_DIR},
710714
)
711-
desktop_path = pathlib.Path(f'target/{target}/{"release" if release else "debug"}/{DESKTOP_BINARY_NAME}')
715+
desktop_path = pathlib.Path(f"target/{target}/{'release' if release else 'debug'}/{DESKTOP_BINARY_NAME}")
712716

713717
deb_resources = LinuxDebResources(
714718
cli_path=cli_path,
@@ -732,7 +736,7 @@ def copy_extension(extension_uuid, extension_dir_name):
732736
# Determine architecture suffix based on the target triple
733737
arch_suffix = "aarch64" if "aarch64" in target else "amd64"
734738
info(f"Using architecture suffix: {arch_suffix} for target: {target}")
735-
739+
736740
bundle_name = f"{tauri_product_name()}_{version()}_{arch_suffix}"
737741
target_subdir = "release" if release else "debug"
738742
bundle_grandparent_path = f"target/{target}/{target_subdir}/bundle"
@@ -917,7 +921,7 @@ def build(
917921
)
918922
build_output[variant] = BinaryPaths(cli_path=cli_path, pty_path=pty_path)
919923
else:
920-
build_linux_minimal(cli_path=cli_path, pty_path=pty_path)
924+
build_linux_minimal(cli_path=cli_path, pty_path=pty_path, chat_path=chat_path)
921925
build_output[variant] = BinaryPaths(cli_path=cli_path, pty_path=pty_path)
922926

923927
return build_output

build-scripts/signing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def cd_signer_request(method: str, path: str, data: str | None = None):
5757
response = requests.request(method=method, url=url, headers=dict(request.headers), data=data)
5858
info(f"CDSigner Request ({url}): {response.status_code}")
5959
if response.status_code == 429:
60-
warn(f"Too many requests, backing off for {2 ** i} seconds")
60+
warn(f"Too many requests, backing off for {2**i} seconds")
6161
time.sleep(2**i)
6262
continue
6363
return response

0 commit comments

Comments
 (0)