WIP: unify project, product and plugin class spelling; migration pending
这个提交包含在:
1 父节点
d1137edd83
当前提交
47f6e55ecd
40 个文件已更改
+138
-116
没有与搜索条件相匹配的文件
+10
-10
@@ -9,7 +9,7 @@ parser.add_argument('--wait-for-hosts',action='store_true',help='After notarizat
|
||||
parser.add_argument('--user-tests',action='store_true',help='After non-UI installed-app verification, record native effect QA as pending user testing and clean known generated copies without the interactive validation prompt.')
|
||||
parser.add_argument('--resume-prepared',action='store_true',help='Resume an already Accepted and stapled staged app after checking its recorded signature, version and unchanged product source.')
|
||||
args=parser.parse_args()
|
||||
bundle_id='com.dayu.beatygril'
|
||||
bundle_id='com.dayu.fcpbeautygirl'
|
||||
lock=pathlib.Path('/Users/dayu/.codex/app-delivery-locks')/(bundle_id+'.lock')
|
||||
lock.parent.mkdir(parents=True,exist_ok=True)
|
||||
try:lock.mkdir()
|
||||
@@ -17,12 +17,12 @@ except FileExistsError:raise SystemExit('Delivery lock occupied; inspect owner.j
|
||||
(lock/'owner.json').write_text(json.dumps({'pid':os.getpid(),'cwd':str(root),'bundle_id':bundle_id}))
|
||||
staging=pathlib.Path('/tmp/paintfcp-build-20261021')
|
||||
logs=root/'build'/'delivery';logs.mkdir(parents=True,exist_ok=True)
|
||||
app=staging/'Build/Products/Release/beatygril.app'
|
||||
installed=pathlib.Path('/Library/Plug-Ins/FxPlug/beatygril.app')
|
||||
app=staging/'Build/Products/Release/FCP-BeautyGirl.app'
|
||||
installed=pathlib.Path('/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app')
|
||||
archive=logs/'notarization.zip'
|
||||
identity='Developer ID Application: zhong luo (B3W25FX5H5)'
|
||||
keychain='/Users/dayu/Library/Keychains/login.keychain-db'
|
||||
previous=logs/'previous-beatygril.app'
|
||||
previous=logs/'previous-FCP-BeautyGirl.app'
|
||||
receipt_path=logs/'delivery-receipt.json'
|
||||
receipt={'status':'preparing','bundleIdentifier':bundle_id,'installationPath':str(installed),
|
||||
'options':{'waitForHosts':args.wait_for_hosts,'userTests':args.user_tests},
|
||||
@@ -80,7 +80,7 @@ def cleanup_known_products():
|
||||
try:
|
||||
delivery_source={'commit':run(['git','rev-parse','HEAD']).strip(),
|
||||
'trackedWorktreeChanges':run(['git','status','--porcelain','--untracked-files=no']).splitlines()}
|
||||
plugin=app/'Contents/PlugIns/beatygril XPC Service.pluginkit'
|
||||
plugin=app/'Contents/PlugIns/FCP-BeautyGirl XPC Service.pluginkit'
|
||||
if args.resume_prepared:
|
||||
old_receipt=json.loads(receipt_path.read_text())
|
||||
result=old_receipt.get('notarization',{})
|
||||
@@ -94,7 +94,7 @@ try:
|
||||
if not expected or not actual or expected.group(1)!=actual.group(1):raise RuntimeError('Prepared signature hash changed')
|
||||
if info.get('CFBundleShortVersionString')!=old_receipt.get('version') or info.get('CFBundleVersion')!=old_receipt.get('build'):raise RuntimeError('Prepared version changed')
|
||||
source_commit=old_receipt.get('source',{}).get('commit')
|
||||
if not source_commit or run(['git','diff',source_commit,'--','beatygril']).strip():raise RuntimeError('Product source changed since prepared build')
|
||||
if not source_commit or run(['git','diff',source_commit,'--','FCP-BeautyGirl']).strip():raise RuntimeError('Product source changed since prepared build')
|
||||
receipt.update(old_receipt);receipt.pop('failure',None)
|
||||
receipt['resumedBy']=delivery_source
|
||||
receipt['options']={'waitForHosts':args.wait_for_hosts,'userTests':args.user_tests,'resumePrepared':True}
|
||||
@@ -107,14 +107,14 @@ try:
|
||||
identities=run(['security','find-identity','-v','-p','codesigning',keychain])
|
||||
if identity not in identities:raise RuntimeError('Valid Developer ID Application identity is unavailable')
|
||||
print('Building universal Release…',flush=True)
|
||||
run(['xcodebuild','-project','beatygril/beatygril.xcodeproj','-scheme','Wrapper Application','-configuration','Release','-derivedDataPath',str(staging),'-destination','generic/platform=macOS','build'],logs/'build.log')
|
||||
run(['xcodebuild','-project','FCP-BeautyGirl/FCP-BeautyGirl.xcodeproj','-scheme','Wrapper Application','-configuration','Release','-derivedDataPath',str(staging),'-destination','generic/platform=macOS','build'],logs/'build.log')
|
||||
# Xcode can register a fresh build. Remove this known generated path before
|
||||
# lengthy signing/notarization while a user may still be testing the old app.
|
||||
unregister_generated_plugin(plugin)
|
||||
for framework in sorted((plugin/'Contents/Frameworks').glob('*.framework')):
|
||||
run(['codesign','--force','--timestamp','--options','runtime','--sign',identity,str(framework)])
|
||||
run(['codesign','--force','--timestamp','--options','runtime','--sign',identity,str(plugin)])
|
||||
run(['codesign','--force','--timestamp','--options','runtime','--entitlements',str(root/'beatygril/beatygril/Wrapper Application/SandboxEntitlements.entitlements'),'--sign',identity,str(app)])
|
||||
run(['codesign','--force','--timestamp','--options','runtime','--entitlements',str(root/'FCP-BeautyGirl/FCP-BeautyGirl/Wrapper Application/SandboxEntitlements.entitlements'),'--sign',identity,str(app)])
|
||||
run(['codesign','--verify','--deep','--strict',str(app)])
|
||||
info=require_product(app)
|
||||
receipt['version']=info.get('CFBundleShortVersionString');receipt['build']=info.get('CFBundleVersion')
|
||||
@@ -156,11 +156,11 @@ try:
|
||||
signature=subprocess.run(['codesign','-dvvv',str(installed)],capture_output=True,text=True,check=True).stderr
|
||||
if info.get('CFBundleIdentifier')!=bundle_id or 'TeamIdentifier=B3W25FX5H5' not in signature:raise RuntimeError('Installed app identity mismatch')
|
||||
(logs/'installed-signature.txt').write_text(signature)
|
||||
run(['pluginkit','-a',str(installed/'Contents/PlugIns/beatygril XPC Service.pluginkit')])
|
||||
run(['pluginkit','-a',str(installed/'Contents/PlugIns/FCP-BeautyGirl XPC Service.pluginkit')])
|
||||
# Xcode may register its build product. Only the installed plugin should
|
||||
# be discoverable while native host validation is in progress.
|
||||
unregister_generated_plugin(plugin)
|
||||
installed_plugin=installed/'Contents/PlugIns/beatygril XPC Service.pluginkit'
|
||||
installed_plugin=installed/'Contents/PlugIns/FCP-BeautyGirl XPC Service.pluginkit'
|
||||
plugin_info=plistlib.loads((installed_plugin/'Contents/Info.plist').read_bytes())
|
||||
discovered=run(['pluginkit','-m','-A','-D','-v','-i',plugin_info['CFBundleIdentifier']])
|
||||
if str(installed_plugin) not in discovered:raise RuntimeError('PluginKit did not report the formal installed plug-in path')
|
||||
|
||||
@@ -38,7 +38,7 @@ with zipfile.ZipFile(source_zip) as z:
|
||||
assert z.testzip() is None and any(n.endswith('/Wrapper Application/AppDelegate.m') for n in z.namelist())
|
||||
status=request('/dayu-publisher/v1/status');assert status['can_publish'] and status['can_upload'] and 'seo' in status['fields']
|
||||
source=upload('source',ROOT/'build/Dayu-Portrait-1.2.0-source.zip','application/zip')
|
||||
card=upload('card',ROOT/'beatygril/beatygril/Wrapper Application/Resources/LauncherInfo.png','image/png')
|
||||
card=upload('card',ROOT/'FCP-BeautyGirl/FCP-BeautyGirl/Wrapper Application/Resources/LauncherInfo.png','image/png')
|
||||
content=(ROOT/'releases/1.2.0/article.html').read_text().replace('{{source_url}}',html.escape(source['url'],quote=True)).replace('{{card_url}}',html.escape(card['url'],quote=True))
|
||||
seo={
|
||||
'title':{'enabled':True,'value':'大鱼人像美化 1.2.0|FCP / Motion 免费开源自动美颜插件'},
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
#!/bin/zsh
|
||||
set -euo pipefail
|
||||
cd "${0:A:h:h}"
|
||||
output_dir=$(mktemp -d /tmp/paintfcp-host-tests.XXXXXX)
|
||||
output_dir=$(mktemp -d /tmp/fcp-beautygirl-host-tests.XXXXXX)
|
||||
trap 'rm -rf "$output_dir"' EXIT
|
||||
plugin_dir="$PWD/beatygril/beatygril/Plugin"
|
||||
plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
|
||||
sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks
|
||||
runtime_frameworks=/Library/Developer/Frameworks
|
||||
compiler_extra=()
|
||||
if [[ "${PAINTFCP_HOST_ASAN:-0}" == 1 ]]; then
|
||||
if [[ "${FCP_BEAUTYGIRL_HOST_ASAN:-0}" == 1 ]]; then
|
||||
compiler_extra=(-fsanitize=address -g)
|
||||
fi
|
||||
xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \
|
||||
@@ -16,7 +16,7 @@ xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unuse
|
||||
-Wl,-rpath,"$runtime_frameworks" \
|
||||
"$plugin_dir/PGBeautyRenderer.m" "$plugin_dir/PGFaceProcessor.m" \
|
||||
"$plugin_dir/PGInspectorState.m" "$plugin_dir/PGInspectorView.m" \
|
||||
"$plugin_dir/beatygrilPlugIn.m" tests/host_adapter_tests.m \
|
||||
"$plugin_dir/FCPBeautyGirlPlugIn.m" tests/host_adapter_tests.m \
|
||||
-framework Foundation -framework AppKit -framework CoreImage -framework CoreGraphics \
|
||||
-framework CoreMedia -framework CoreVideo -framework IOSurface -framework Metal \
|
||||
-framework Vision -framework ImageIO -framework FxPlug -framework PluginManager \
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/zsh
|
||||
set -euo pipefail
|
||||
cd "${0:A:h:h}"
|
||||
output_dir=$(mktemp -d /tmp/paintfcp-inspector-tests.XXXXXX)
|
||||
output_dir=$(mktemp -d /tmp/fcp-beautygirl-inspector-tests.XXXXXX)
|
||||
trap 'rm -rf "$output_dir"' EXIT
|
||||
plugin_dir="$PWD/beatygril/beatygril/Plugin"
|
||||
plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
|
||||
compiler_extra=()
|
||||
if [[ "${PAINTFCP_INSPECTOR_ASAN:-0}" == 1 ]]; then
|
||||
if [[ "${FCP_BEAUTYGIRL_INSPECTOR_ASAN:-0}" == 1 ]]; then
|
||||
compiler_extra=(-fsanitize=address -g)
|
||||
fi
|
||||
python3 scripts/inspector-template.py audit 'Templates/大鱼人像美化/大鱼人像美化.moef' \
|
||||
@@ -16,7 +16,7 @@ xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unuse
|
||||
-Wl,-rpath,/Library/Developer/Frameworks \
|
||||
"$plugin_dir/PGBeautyRenderer.m" "$plugin_dir/PGFaceProcessor.m" \
|
||||
"$plugin_dir/PGInspectorState.m" "$plugin_dir/PGInspectorView.m" \
|
||||
"$plugin_dir/beatygrilPlugIn.m" tests/inspector_tests.m \
|
||||
"$plugin_dir/FCPBeautyGirlPlugIn.m" tests/inspector_tests.m \
|
||||
-framework Foundation -framework AppKit -framework CoreImage -framework CoreGraphics \
|
||||
-framework CoreMedia -framework CoreVideo -framework IOSurface -framework Metal \
|
||||
-framework Vision -framework ImageIO -framework FxPlug -framework PluginManager \
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
#!/bin/zsh
|
||||
set -euo pipefail
|
||||
cd "${0:A:h:h}"
|
||||
output_dir=$(mktemp -d /tmp/paintfcp-osc-tests.XXXXXX)
|
||||
output_dir=$(mktemp -d /tmp/fcp-beautygirl-osc-tests.XXXXXX)
|
||||
trap 'rm -rf "$output_dir"' EXIT
|
||||
plugin_dir="$PWD/beatygril/beatygril/Plugin"
|
||||
plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
|
||||
sdk_frameworks=/Library/Developer/SDKs/FxPlug.sdk/Library/Frameworks
|
||||
runtime_frameworks=/Library/Developer/Frameworks
|
||||
compiler_extra=()
|
||||
if [[ "${PAINTFCP_OSC_ASAN:-0}" == 1 ]]; then
|
||||
if [[ "${FCP_BEAUTYGIRL_OSC_ASAN:-0}" == 1 ]]; then
|
||||
compiler_extra=(-fsanitize=address -g)
|
||||
fi
|
||||
xcrun clang "${compiler_extra[@]}" -fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter \
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
#!/bin/zsh
|
||||
set -euo pipefail
|
||||
cd "${0:A:h:h}"
|
||||
output_dir=$(mktemp -d /tmp/paintfcp-tests.XXXXXX)
|
||||
output_dir=$(mktemp -d /tmp/fcp-beautygirl-tests.XXXXXX)
|
||||
trap 'rm -rf "$output_dir"' EXIT
|
||||
plugin_dir="$PWD/beatygril/beatygril/Plugin"
|
||||
plugin_dir="$PWD/FCP-BeautyGirl/FCP-BeautyGirl/Plugin"
|
||||
common=(-fobjc-arc -fmodules -Wall -Wextra -Wno-unused-parameter -DCI_SILENCE_GL_DEPRECATION -mmacosx-version-min=13.0 -I "$plugin_dir" -framework Foundation -framework CoreImage -framework CoreGraphics -framework CoreMedia -framework Metal -framework Vision -framework ImageIO)
|
||||
xcrun clang "${common[@]}" "$plugin_dir/PGBeautyRenderer.m" tests/beauty_render_tests.m -o "$output_dir/beauty-tests"
|
||||
"$output_dir/beauty-tests"
|
||||
|
||||
@@ -10,7 +10,7 @@ parser.add_argument('--expanded',default='build/pkg-expanded')
|
||||
parser.add_argument('--fixture',default='build/pkg-isolation')
|
||||
args=parser.parse_args()
|
||||
expanded=root/args.expanded/'Payload.pkg';payload=expanded/'Payload'
|
||||
formal=Path('/Library/Plug-Ins/FxPlug/beatygril.app');packed=payload/'Library/Plug-Ins/FxPlug/beatygril.app'
|
||||
formal=Path('/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app');packed=payload/'Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app'
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
def files(p):
|
||||
return {str(x.relative_to(p)):('symlink:'+os.readlink(x) if x.is_symlink() else sha(x)) for x in p.rglob('*') if x.is_file() or x.is_symlink()}
|
||||
@@ -33,7 +33,7 @@ base=root/args.fixture;base.mkdir(exist_ok=False)
|
||||
volume=base/'volume';home=base/'user';home.mkdir()
|
||||
start=post.index('CURRENT_ACTIVE=0')
|
||||
isolated='#!/bin/zsh\nset -eu\nTARGET_VOLUME="'+str(volume)+'"\nCONSOLE_USER="'+os.getlogin()+'"\nCONSOLE_UID="'+str(os.getuid())+'"\nCONSOLE_GROUP="staff"\nUSER_HOME="'+str(home)+'"\n'+post[start:]
|
||||
isolated=isolated[:isolated.index('fx_verify_app "${TARGET_VOLUME%/}/Library/Plug-Ins/FxPlug/beatygril.app"')]+'exit 0\n'
|
||||
isolated=isolated[:isolated.index('fx_verify_app "${TARGET_VOLUME%/}/Library/Plug-Ins/FxPlug/FCP-BeautyGirl.app"')]+'exit 0\n'
|
||||
isolated=isolated.replace('/usr/sbin/chown -R','/usr/bin/true')
|
||||
new_copy=next(l for l in isolated.splitlines() if l.startswith('/usr/bin/ditto "${TARGET_VOLUME%/}'))
|
||||
def refill():
|
||||
|
||||
在新工单中引用
屏蔽一个用户