Add dark defaults, modular effect templates and canvas leveling
这个提交包含在:
1 父节点
ffabdca5b1
当前提交
5ca307414c
25 个文件已更改
+1702
-88
没有与搜索条件相匹配的文件
+17
-14
@@ -11,8 +11,11 @@ import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import tempfile
|
||||
import sys
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(ROOT / "tools"))
|
||||
from template_payload import template_files
|
||||
APP = Path("/Library/Plug-Ins/FxPlug/大鱼调色.app")
|
||||
CACHE = Path.home() / "Library/Caches/CodexBuilds/com.dayu.color"
|
||||
LOCK = Path.home() / ".codex/app-delivery-locks/com.dayu.color.lock"
|
||||
@@ -79,31 +82,29 @@ def main():
|
||||
LOCK.mkdir()
|
||||
(LOCK / "owner.json").write_text(json.dumps(dict(PID=os.getpid(), cwd=str(ROOT),
|
||||
product="大鱼调色", phase="PKG packaging", started=datetime.datetime.now(datetime.timezone.utc).isoformat())))
|
||||
stage = None
|
||||
try:
|
||||
check_bundle_access((path, path.lstat().st_mode) for path in [APP, *APP.rglob("*")])
|
||||
source = APP / "Contents/Resources/FCP Templates"
|
||||
staged = CACHE / "pkg-inputs/大鱼调色/大鱼调色"
|
||||
staged.mkdir(parents=True, exist_ok=True)
|
||||
# Use a fresh staging directory, so historical files cannot leak into
|
||||
# the new payload or override the intended effect list.
|
||||
stage = Path(tempfile.mkdtemp(prefix="pkg-inputs-", dir=CACHE))
|
||||
staged = stage / "大鱼调色"
|
||||
hashes = {}
|
||||
for name in ["大鱼调色.moef", "large.png", "small.png"]:
|
||||
data = (source / name).read_bytes()
|
||||
assert data == (ROOT / "template" / name).read_bytes(), name
|
||||
target = staged / name
|
||||
if target.exists():
|
||||
os.chflags(target, 0)
|
||||
for reference, bundled, installed in template_files():
|
||||
data = (source / bundled).read_bytes()
|
||||
assert data == (ROOT / "template" / reference).read_bytes(), installed
|
||||
target = staged / installed
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_bytes(data)
|
||||
target.chmod(0o644)
|
||||
if name.endswith(".png"):
|
||||
os.chflags(target, 2)
|
||||
hashes[name] = hashlib.sha256(data).hexdigest()
|
||||
for folder in [staged, staged.parent]:
|
||||
folder.chmod(0o755)
|
||||
hashes[str(installed)] = hashlib.sha256(data).hexdigest()
|
||||
keychain = str(Path.home() / "Library/Keychains/login.keychain-db")
|
||||
profile = "codex-dayu-notary-B3W25FX5H5"
|
||||
version = info["CFBundleShortVersionString"]
|
||||
manifest = dict(name="大鱼调色", output=str(args.output_dir / "大鱼调色.pkg"),
|
||||
identifierPrefix="com.dayu.color.installer", resources=[dict(source=str(APP)),
|
||||
dict(source=str(staged.parent), destination="~/Movies/Motion Templates.localized/Effects.localized")],
|
||||
dict(source=str(staged), destination="~/Movies/Motion Templates.localized/Effects.localized")],
|
||||
signing=dict(identity="Developer ID Installer: zhong luo (B3W25FX5H5)", profile=profile,
|
||||
keychain=keychain, notaryKeychain=keychain),
|
||||
appearance=dict(title="大鱼调色", subtitle="适用于 Final Cut Pro 与 Motion 的原生调色效果",
|
||||
@@ -142,6 +143,8 @@ def main():
|
||||
report_path.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n")
|
||||
print("正式安装包:" + str(package))
|
||||
finally:
|
||||
if stage and not args.prepare_only:
|
||||
shutil.rmtree(stage)
|
||||
(LOCK / "owner.json").unlink()
|
||||
LOCK.rmdir()
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户