Skip to content

Commit

Permalink
Merge pull request #744 from kiwix/naming_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr authored Aug 30, 2024
2 parents 5f65164 + d091c88 commit b527c7c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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 = "[email protected]:flathub/org.kiwix.desktop.git"

BIN_EXT = ".exe" if COMPILE_CONFIG.startswith("win32_") else ""


def major_version(version: str) -> str:
return version.split(".")[0]
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -489,7 +496,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
Expand Down

0 comments on commit b527c7c

Please sign in to comment.