From 3ee9e01f03a8f0d622fcea175f734f88c8796981 Mon Sep 17 00:00:00 2001 From: Nikita Prokopov Date: Mon, 7 Aug 2023 22:06:42 +0200 Subject: [PATCH] m116-f44dbc40d8 --- .github/workflows/build.yml | 6 ++++-- patches/11081_SkLoadICU.cpp.patch | 20 ++++++++++---------- script/archive.py | 1 + script/build.py | 2 -- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07ba427..d5d727c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ on: default: 'false' env: - version: m109-664500fa93 + version: m116-f44dbc40d8 jobs: macos: @@ -52,7 +52,9 @@ jobs: steps: - uses: actions/checkout@v2 - run: sudo ./script/prepare_linux.sh - - run: sudo apt-get install g++-9-aarch64-linux-gnu -y + - run: | + sudo apt-get update + sudo apt-get --yes install g\+\+-9-aarch64-linux-gnu if: ${{ matrix.target_machine == 'arm64' }} - run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }} if: ${{ github.event.inputs.skip_release != 'true' }} diff --git a/patches/11081_SkLoadICU.cpp.patch b/patches/11081_SkLoadICU.cpp.patch index bc0e9b6..8e594e6 100644 --- a/patches/11081_SkLoadICU.cpp.patch +++ b/patches/11081_SkLoadICU.cpp.patch @@ -10,16 +10,16 @@ index 5b3b153336..8696aaf927 100644 #include "unicode/udata.h" --static void* win_mmap(const char* dataFile) { +-static void* win_mmap(const wchar_t* dataFile) { - if (!dataFile) { - return nullptr; - } -+static void* win_mmap(const std::string& dataFile, std::ostringstream& buffer) { ++static void* win_mmap(const std::wstring& dataFile, std::ostringstream& buffer) { struct FCloseWrapper { void operator()(FILE* f) { fclose(f); } }; -- std::unique_ptr stream(fopen(dataFile, "rb")); -+ std::unique_ptr stream(fopen(dataFile.c_str(), "rb")); +- std::unique_ptr stream(_wfopen(dataFile, L"rb")); ++ std::unique_ptr stream(_wfopen(dataFile, L"rb")); if (!stream) { -- fprintf(stderr, "SkIcuLoader: datafile missing: %s.\n", dataFile); +- fprintf(stderr, "SkIcuLoader: datafile missing: %ls.\n", dataFile); + buffer << "SkLoadICU: datafile '" << dataFile << "' is missing" << std::endl; return nullptr; } @@ -51,11 +51,11 @@ index 5b3b153336..8696aaf927 100644 } return addr; @@ -86,23 +84,20 @@ static std::string executable_directory() { - return end ? std::string(path, end - path) : std::string(); + return get_module_path(hModule); } --static bool load_from(const std::string& dir) { -- auto sPath = dir + "\\icudtl.dat"; +-static bool load_from(const std::wstring& dir) { +- auto sPath = dir + L"\\icudtl.dat"; - if (void* addr = win_mmap(sPath.c_str())) { - if (init_icu(addr)) { - return true; @@ -71,9 +71,9 @@ index 5b3b153336..8696aaf927 100644 std::call_once(flag, []() { - good = load_from(executable_directory()) || load_from(library_directory()); + std::ostringstream buffer; -+ void* addr = win_mmap(library_directory() + "\\icudtl.dat", buffer); ++ void* addr = win_mmap(library_directory() + L"\\icudtl.dat", buffer); + if (addr == nullptr) -+ addr = win_mmap(executable_directory() + "\\icudtl.dat", buffer); ++ addr = win_mmap(executable_directory() + L"\\icudtl.dat", buffer); + if (addr == nullptr) + fputs(buffer.str().c_str(), stderr); + if (addr) diff --git a/script/archive.py b/script/archive.py index 066b4b2..7addea9 100755 --- a/script/archive.py +++ b/script/archive.py @@ -39,6 +39,7 @@ def main(): 'modules/sksg/include/*.h', 'modules/skshaper/include/*.h', 'modules/skshaper/src/*.h', + 'modules/skunicode/include/*.h', 'modules/svg/include/*.h', 'src/**/*.h', 'third_party/externals/angle2/LICENSE', diff --git a/script/build.py b/script/build.py index a559b77..ce8697a 100755 --- a/script/build.py +++ b/script/build.py @@ -38,7 +38,6 @@ def main(): args += [ 'skia_use_system_freetype2=false', # 'skia_enable_gpu=true', - # 'skia_use_gl=true', 'skia_use_metal=true', 'extra_cflags_cc=["-frtti"]' ] @@ -50,7 +49,6 @@ def main(): args += [ 'skia_use_system_freetype2=true', # 'skia_enable_gpu=true', - # 'skia_use_gl=true', 'extra_cflags_cc=["-frtti"]', ]