|
35 | 35 | CLI_PACKAGE_NAME, |
36 | 36 | DESKTOP_BINARY_NAME, |
37 | 37 | DESKTOP_PACKAGE_NAME, |
| 38 | + DESKTOP_PACKAGE_PATH, |
38 | 39 | DMG_NAME, |
39 | 40 | LINUX_ARCHIVE_NAME, |
40 | 41 | LINUX_LEGACY_GNOME_EXTENSION_UUID, |
@@ -259,7 +260,7 @@ def build_macos_desktop_app( |
259 | 260 |
|
260 | 261 | run_cmd( |
261 | 262 | cargo_tauri_args, |
262 | | - cwd=DESKTOP_PACKAGE_NAME, |
| 263 | + cwd=DESKTOP_PACKAGE_PATH, |
263 | 264 | env={**os.environ, **rust_env(release=release, variant=Variant.FULL), "BUILD_DIR": BUILD_DIR}, |
264 | 265 | ) |
265 | 266 |
|
@@ -387,30 +388,6 @@ def sign_and_rebundle_macos(app_path: pathlib.Path, dmg_path: pathlib.Path, sign |
387 | 388 | info("Done signing!!") |
388 | 389 |
|
389 | 390 |
|
390 | | -def linux_bundle( |
391 | | - pty_path: pathlib.Path, |
392 | | - cli_path: pathlib.Path, |
393 | | - desktop_app_path: pathlib.Path, |
394 | | - is_minimal: bool, |
395 | | -): |
396 | | - if not is_minimal: |
397 | | - for res in [16, 22, 24, 32, 48, 64, 128, 256, 512]: |
398 | | - shutil.copy2( |
399 | | - f"{DESKTOP_PACKAGE_NAME}/icons/{res}x{res}.png", |
400 | | - f"build/usr/share/icons/hicolor/{res}x{res}/apps/fig.png", |
401 | | - ) |
402 | | - |
403 | | - info("Copying bundle files") |
404 | | - bin_path = pathlib.Path("build/usr/bin") |
405 | | - bin_path.mkdir(parents=True, exist_ok=True) |
406 | | - shutil.copy2(cli_path, bin_path) |
407 | | - shutil.copy2(pty_path, bin_path) |
408 | | - shutil.copytree("bundle/linux/minimal", BUILD_DIR, dirs_exist_ok=True) |
409 | | - if not is_minimal: |
410 | | - shutil.copytree("bundle/linux/desktop", BUILD_DIR, dirs_exist_ok=True) |
411 | | - shutil.copy2(desktop_app_path, bin_path) |
412 | | - |
413 | | - |
414 | 391 | def build_linux_minimal(cli_path: pathlib.Path, pty_path: pathlib.Path): |
415 | 392 | """ |
416 | 393 | Creates tar.gz, tar.xz, tar.zst, and zip archives under `BUILD_DIR`. |
@@ -576,7 +553,7 @@ def build_linux_deb( |
576 | 553 | desktop_icon_path.parent.mkdir(parents=True) |
577 | 554 | share_path = bundle_dir / f"usr/share/{LINUX_PACKAGE_NAME}" |
578 | 555 | share_path.mkdir(parents=True) |
579 | | - shutil.copy(pathlib.Path(f"{DESKTOP_PACKAGE_NAME}/icons/128x128.png"), desktop_icon_path) |
| 556 | + shutil.copy(DESKTOP_PACKAGE_PATH / "icons" / "128x128.png", desktop_icon_path) |
580 | 557 | shutil.copytree(resources.legacy_extension_dir_path, share_path / LINUX_LEGACY_GNOME_EXTENSION_UUID) |
581 | 558 | shutil.copytree(resources.modern_extension_dir_path, share_path / LINUX_MODERN_GNOME_EXTENSION_UUID) |
582 | 559 | shutil.copytree(resources.npm_packages.autocomplete_path, share_path / "autocomplete") |
@@ -655,7 +632,7 @@ def copy_extension(extension_uuid, extension_dir_name): |
655 | 632 | modern_extension_dir_path = copy_extension(LINUX_MODERN_GNOME_EXTENSION_UUID, "gnome-extension") |
656 | 633 |
|
657 | 634 | info("Building tauri config") |
658 | | - tauri_config_path = pathlib.Path(DESKTOP_PACKAGE_NAME) / "build-config.json" |
| 635 | + tauri_config_path = DESKTOP_PACKAGE_PATH / "build-config.json" |
659 | 636 | tauri_config_path.write_text( |
660 | 637 | linux_tauri_config( |
661 | 638 | cli_path=cli_path, |
@@ -686,7 +663,7 @@ def copy_extension(extension_uuid, extension_dir_name): |
686 | 663 | info("Building", DESKTOP_PACKAGE_NAME) |
687 | 664 | run_cmd( |
688 | 665 | cargo_tauri_args, |
689 | | - cwd=DESKTOP_PACKAGE_NAME, |
| 666 | + cwd=DESKTOP_PACKAGE_PATH, |
690 | 667 | env={**os.environ, **rust_env(release=release, variant=Variant.FULL), "BUILD_DIR": BUILD_DIR}, |
691 | 668 | ) |
692 | 669 | desktop_path = pathlib.Path(f'target/{target}/{"release" if release else "debug"}/{DESKTOP_BINARY_NAME}') |
|
0 commit comments