From 8401ee5ea3f2b5b9053215a1cf64d48732f8db51 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 30 Aug 2024 09:41:45 +0200 Subject: [PATCH 1/3] Fix kiwix-desktop archive name on Windows --- .github/scripts/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/common.py b/.github/scripts/common.py index c6d8f240..fb5c7adc 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -489,7 +489,7 @@ def create_desktop_image(make_release): app_name = "org.kiwix.desktop.{}.flatpak".format(postfix) print_message("archive is {}", build_path) elif platform.system() == "Windows": - archive_basename = "Kiwix-{}-win-amd64".format(postfix) + archive_basename = "kiwix-desktop_windows_x64_{}".format(postfix) working_dir = INSTALL_DIR / archive_basename build_path = working_dir.with_suffix(".zip") app_name = build_path.name From 6207b0ab0beda2d30f0e3767941b997ec25a59f9 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 30 Aug 2024 10:28:19 +0200 Subject: [PATCH 2/3] Fix binary extension on Windows --- .github/scripts/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/common.py b/.github/scripts/common.py index fb5c7adc..d85dd8b8 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -46,8 +46,10 @@ def get_build_dir(config) -> Path: TMP_DIR = Path(os.getenv("TMP_DIR", default_tmp_dir)) if platform.system() == "Windows": KBUILD_SOURCE_DIR = Path(_environ["GITHUB_WORKSPACE"]) + BIN_EXT = ".exe" else: KBUILD_SOURCE_DIR = HOME / "kiwix-build" + BIN_EXT = ".exe" if COMPILE_CONFIG.startswith("win32_") else "" _ref = _environ.get("GITHUB_REF", "").split("/")[-1] @@ -62,8 +64,6 @@ def get_build_dir(config) -> Path: FLATPAK_HTTP_GIT_REMOTE = "https://github.com/flathub/org.kiwix.desktop.git" FLATPAK_GIT_REMOTE = "git@github.com:flathub/org.kiwix.desktop.git" -BIN_EXT = ".exe" if COMPILE_CONFIG.startswith("win32_") else "" - def major_version(version: str) -> str: return version.split(".")[0] From d091c8802f65445c353924397fc2e925bc2dd2a9 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 30 Aug 2024 14:15:19 +0200 Subject: [PATCH 3/3] Fix library publication of libkiwix on Windows Fix #743 --- .github/scripts/common.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/common.py b/.github/scripts/common.py index d85dd8b8..b7c09d7a 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -137,7 +137,14 @@ def major_version(version: str) -> str: "lib/libkiwix.{}.dylib".format( major_version(main_project_versions["libkiwix"]) ), + "bin/kiwix-{version}.dll".format( + version=major_version(main_project_versions["libkiwix"]) + ), "bin/icu*.dll", + "bin/kiwix-{version}.pdb".format( + version=major_version(main_project_versions["libkiwix"]) + ), + "lib/kiwix.lib", "lib/libkiwix.dylib", "lib/*/libkiwix.pc", "include/kiwix/**/*.h",