Merge pull request #773 from ONLYOFFICE/release/v7.6.0

Change fetching icu (github deprecated svn)
This commit is contained in:
Oleg Korshul
2023-12-06 18:52:21 +03:00
committed by GitHub
2 changed files with 25 additions and 4 deletions

View File

@ -7,6 +7,18 @@ import base
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")
@ -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"

View File

@ -5,11 +5,18 @@ sys.path.append('../..')
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")
@ -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()):