Skip to content

Commit

Permalink
Merge pull request #773 from ONLYOFFICE/release/v7.6.0
Browse files Browse the repository at this point in the history
Change fetching icu (github deprecated svn)
  • Loading branch information
K0R0L authored Dec 6, 2023
2 parents 4a2fd9f + afd5f2b commit e54e7ad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
18 changes: 16 additions & 2 deletions scripts/core_common/modules/icu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
import os
import icu_android

def fetch_icu(major, minor):
base.cmd("git", ["clone", "--depth", "1", "--branch", "maint/maint-" + major, "https://github.com/unicode-org/icu.git", "./icu2"])
base.copy_dir("./icu2/icu4c", "./icu")
base.delete_dir_with_access_error("icu2")
#base.cmd("svn", ["export", "https://github.com/unicode-org/icu/tags/release-" + icu_major + "-" + icu_minor + "/icu4c", "./icu", "--non-interactive", "--trust-server-cert"])
return

def clear_module():
if base.is_dir("icu"):
base.delete_dir_with_access_error("icu")
return

def make():
print("[fetch & build]: icu")

Expand All @@ -18,10 +30,12 @@ def make():
os.chdir(base_dir)

icu_major = "58"
icu_minor = "2"
icu_minor = "3"

base.check_module_version("1", clear_module)

if not base.is_dir("icu"):
base.cmd("svn", ["export", "https://github.com/unicode-org/icu/tags/release-" + icu_major + "-" + icu_minor + "/icu4c", "./icu", "--non-interactive", "--trust-server-cert"])
fetch_icu(icu_major, icu_minor)

if ("windows" == base.host_platform()):
platformToolset = "v140"
Expand Down
11 changes: 9 additions & 2 deletions scripts/core_common/modules/icu_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
import base
import os

def fetch_icu(major, minor):
base.cmd("git", ["clone", "--depth", "1", "--branch maint/maint-" + major, "https://github.com/unicode-org/icu.git", "./icu2"])
base.copy_dir("./icu2/icu4c", "./icu")
base.delete_dir_with_access_error("icu2")
#base.cmd("svn", ["export", "https://github.com/unicode-org/icu/tags/release-" + icu_major + "-" + icu_minor + "/icu4c", "./icu", "--non-interactive", "--trust-server-cert"])
return

current_dir = base.get_script_dir() + "/../../core/Common/3dParty/icu/android"

toolshains_dir = current_dir + "/toolchains"
icu_major = "58"
icu_minor = "2"
icu_minor = "3"
icu_is_shared = False

current_path = base.get_env("PATH")
Expand Down Expand Up @@ -77,7 +84,7 @@ def make():
os.chdir(current_dir)

if not base.is_dir("icu"):
base.cmd("svn", ["export", "https://github.com/unicode-org/icu/tags/release-" + icu_major + "-" + icu_minor + "/icu4c", "./icu", "--non-interactive", "--trust-server-cert"])
fetch_icu(icu_major, icu_minor)
if ("linux" == base.host_platform()):
base.replaceInFile(current_dir + "/icu/source/i18n/digitlst.cpp", "xlocale", "locale")
if ("mac" == base.host_platform()):
Expand Down

0 comments on commit e54e7ad

Please sign in to comment.