Skip to content

Commit 0361ace

Browse files
authored
Blend2D をミラーからダウンロードするように変更し、ハッシュチェックを追加 (#61)
- DEPS に BLEND2D_SHA256_HASH を追加 - buildbase.py の install_blend2d_official 関数をミラー URL 対応に変更 - SHA256 ハッシュチェック機能を追加して整合性を検証
1 parent 16c31f9 commit 0361ace

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

DEPS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ BOOST_VERSION=1.88.0
44
CLI11_VERSION=v2.4.2
55
CMAKE_VERSION=4.0.3
66
BLEND2D_VERSION=0.12.0
7+
BLEND2D_SHA256_HASH=8d2f9466451fc0e464bf67edef34c28391a5bf57d26d684453a03d1a1a5b2730
78
OPENH264_VERSION=v2.6.0

buildbase.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,13 +1464,17 @@ def install_blend2d_official(
14641464
install_dir,
14651465
ios,
14661466
cmake_args,
1467+
expected_sha256: Optional[str] = None,
14671468
):
14681469
rm_rf(os.path.join(source_dir, "blend2d"))
14691470
rm_rf(os.path.join(build_dir, "blend2d"))
14701471
rm_rf(os.path.join(install_dir, "blend2d"))
14711472

1472-
url = f"https://blend2d.com/download/blend2d-{version}.tar.gz"
1473-
path = download(url, source_dir)
1473+
# 公式サイトに負荷をかけないための時雨堂によるミラー
1474+
url = f"https://oss-mirrors.shiguredo.jp/blend2d-{version}.tar.gz"
1475+
# Blend2d 公式
1476+
# url = f"https://blend2d.com/download/blend2d-{version}.tar.gz"
1477+
path = download(url, source_dir, expected_sha256=expected_sha256)
14741478
extract(path, source_dir, "blend2d")
14751479
_build_blend2d(
14761480
configuration=configuration,

run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def install_deps(
194194
"install_dir": install_dir,
195195
"ios": False,
196196
"cmake_args": cmake_args,
197+
"expected_sha256": deps["BLEND2D_SHA256_HASH"],
197198
}
198199
install_blend2d_official(**install_blend2d_args)
199200

0 commit comments

Comments
 (0)