mirror of
https://github.com/X1a0He/Adobe-Downloader.git
synced 2025-11-25 11:18:53 +08:00
feat: 新增修复Helper的sh脚本和入口
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
shouldAutocreateTestPlan = "YES">
|
shouldAutocreateTestPlan = "YES">
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
|
|||||||
58
Adobe Downloader/Scripts/fix-helper.sh
Normal file
58
Adobe Downloader/Scripts/fix-helper.sh
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# fix-helper.sh
|
||||||
|
# Adobe Downloader
|
||||||
|
#
|
||||||
|
# 用于在 Helper 已安装但无法连接时,尝试修复并重启 LaunchDaemon。
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
LABEL="com.x1a0he.macOS.Adobe-Downloader.helper"
|
||||||
|
PLIST="/Library/LaunchDaemons/${LABEL}.plist"
|
||||||
|
HELPER="/Library/PrivilegedHelperTools/${LABEL}"
|
||||||
|
|
||||||
|
echo "=== Adobe Downloader Helper 修复工具 ==="
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [ ! -f "$PLIST" ] || [ ! -f "$HELPER" ]; then
|
||||||
|
echo "未找到 Helper 的系统文件:"
|
||||||
|
echo " $PLIST"
|
||||||
|
echo " $HELPER"
|
||||||
|
echo
|
||||||
|
echo "请先在 Adobe Downloader 的「设置 - Helper 设置」中点击「重新安装」,"
|
||||||
|
echo "完成重新安装后,再运行本脚本进行修复。"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "正在尝试重启并启用 Helper 对应的 LaunchDaemon..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
# 尽量先将已有的 job 退出,忽略错误
|
||||||
|
if launchctl print system/"$LABEL" >/dev/null 2>&1; then
|
||||||
|
echo "检测到已有运行中的 Helper,尝试停止..."
|
||||||
|
sudo launchctl bootout system/"$LABEL" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "重新加载 LaunchDaemon 配置..."
|
||||||
|
|
||||||
|
# 优先使用新的 bootstrap / enable / kickstart 流程
|
||||||
|
if command -v launchctl >/dev/null 2>&1; then
|
||||||
|
# bootstrap 会在 job 未加载时加载,在已加载时返回错误,忽略错误即可
|
||||||
|
sudo launchctl bootstrap system "$PLIST" 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "确保 Helper 处于启用状态..."
|
||||||
|
sudo launchctl enable system/"$LABEL" 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "尝试立即启动 Helper..."
|
||||||
|
sudo launchctl kickstart -k system/"$LABEL" 2>/dev/null || true
|
||||||
|
else
|
||||||
|
echo "系统不支持新的 launchctl 子命令,尝试使用兼容模式加载..."
|
||||||
|
sudo /bin/launchctl unload "$PLIST" 2>/dev/null || true
|
||||||
|
sudo /bin/launchctl load -w "$PLIST"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "操作已完成。"
|
||||||
|
echo "如果 Adobe Downloader 仍然提示「无法连接到 Helper」,"
|
||||||
|
echo "请将本终端窗口的全部输出内容复制后反馈给开发者。"
|
||||||
|
|
||||||
@@ -33,12 +33,18 @@ struct CleanConfigView: View {
|
|||||||
Text("重置程序")
|
Text("重置程序")
|
||||||
}) {
|
}) {
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
HStack {
|
HStack(spacing: 8) {
|
||||||
Button("重置程序") {
|
Button("重置程序") {
|
||||||
showConfirmation = true
|
showConfirmation = true
|
||||||
}
|
}
|
||||||
.buttonStyle(BeautifulButtonStyle(baseColor: .red.opacity(0.8)))
|
.buttonStyle(BeautifulButtonStyle(baseColor: .red.opacity(0.8)))
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
|
|
||||||
|
Button("修复 Helper") {
|
||||||
|
runFixHelperScript()
|
||||||
|
}
|
||||||
|
.buttonStyle(BeautifulButtonStyle(baseColor: .blue.opacity(0.8)))
|
||||||
|
.foregroundColor(.white)
|
||||||
}
|
}
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
@@ -142,6 +148,41 @@ struct CleanConfigView: View {
|
|||||||
showAlert = true
|
showAlert = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func runFixHelperScript() {
|
||||||
|
do {
|
||||||
|
let downloadsURL = try FileManager.default.url(for: .downloadsDirectory,
|
||||||
|
in: .userDomainMask,
|
||||||
|
appropriateFor: nil,
|
||||||
|
create: false)
|
||||||
|
let scriptURL = downloadsURL.appendingPathComponent("fix-helper.sh")
|
||||||
|
|
||||||
|
guard let scriptPath = Bundle.main.path(forResource: "fix-helper", ofType: "sh"),
|
||||||
|
let scriptContent = try? String(contentsOfFile: scriptPath, encoding: .utf8) else {
|
||||||
|
throw NSError(domain: "ScriptError",
|
||||||
|
code: 1,
|
||||||
|
userInfo: [NSLocalizedDescriptionKey: "无法读取修复脚本文件"])
|
||||||
|
}
|
||||||
|
|
||||||
|
try scriptContent.write(to: scriptURL, atomically: true, encoding: .utf8)
|
||||||
|
try FileManager.default.setAttributes([.posixPermissions: 0o755],
|
||||||
|
ofItemAtPath: scriptURL.path)
|
||||||
|
|
||||||
|
let terminalURL = URL(fileURLWithPath: "/System/Applications/Utilities/Terminal.app")
|
||||||
|
NSWorkspace.shared.open([scriptURL],
|
||||||
|
withApplicationAt: terminalURL,
|
||||||
|
configuration: NSWorkspace.OpenConfiguration()) { _, error in
|
||||||
|
if let error = error {
|
||||||
|
alertMessage = "打开终端失败: \(error.localizedDescription)"
|
||||||
|
showAlert = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
alertMessage = String(localized: "修复 Helper 失败: \(error.localizedDescription)")
|
||||||
|
showAlert = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CleanupLog: Identifiable {
|
struct CleanupLog: Identifiable {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
"(可能导致处理失败)" : {
|
"(可能导致处理失败)" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"(无法使用安装功能)" : {
|
"(无法使用安装功能)" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -146,6 +148,12 @@
|
|||||||
},
|
},
|
||||||
"•" : {
|
"•" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"✅" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"❌" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"1-10" : {
|
"1-10" : {
|
||||||
|
|
||||||
@@ -293,7 +301,6 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
"Debug 模式" : {
|
"Debug 模式" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -396,6 +403,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Helper 未连接" : {
|
"Helper 未连接" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -437,7 +445,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Helper 重新安装成功,但权限不是root: %@" : {
|
"Helper 重新安装成功,但权限不是root: %@" : {
|
||||||
|
"localizations": {
|
||||||
|
"en": {
|
||||||
|
"stringUnit": {
|
||||||
|
"state": "translated",
|
||||||
|
"value": "Helper reinstalled successfully, but the permission is not root: %@"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Helper 重新连接成功" : {
|
"Helper 重新连接成功" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
@@ -450,7 +465,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Helper 重新连接成功,但权限不是root: %@" : {
|
"Helper 重新连接成功,但权限不是root: %@" : {
|
||||||
|
"localizations": {
|
||||||
|
"en": {
|
||||||
|
"stringUnit": {
|
||||||
|
"state": "translated",
|
||||||
|
"value": "Helper reconnected successfully, but the permission is not root: %@"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Helper服务需要批准" : {
|
"Helper服务需要批准" : {
|
||||||
"extractionState" : "stale",
|
"extractionState" : "stale",
|
||||||
@@ -479,9 +501,15 @@
|
|||||||
},
|
},
|
||||||
"macOS %@" : {
|
"macOS %@" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Match:" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"OK" : {
|
"OK" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Reason:" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Setup 组件是 Adobe 官方的安装程序组件,我们需要对其进行修改以实现绕过验证的功能。如果没有下载并处理 Setup 组件,将无法使用安装功能。" : {
|
"Setup 组件是 Adobe 官方的安装程序组件,我们需要对其进行修改以实现绕过验证的功能。如果没有下载并处理 Setup 组件,将无法使用安装功能。" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
@@ -504,6 +532,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Setup 组件未处理,无法安装" : {
|
"Setup 组件未处理,无法安装" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -522,6 +551,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Target:" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"v%@" : {
|
"v%@" : {
|
||||||
|
|
||||||
@@ -907,6 +939,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"修复 Helper" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Fix helper"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"修复 Helper 失败: %@" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Fix helper failed: %@"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"修改 Setup 组件失败" : {
|
"修改 Setup 组件失败" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
@@ -1212,7 +1264,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"可选模块" : {
|
"可选模块" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -1618,7 +1669,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"展开全部" : {
|
"展开全部" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -1659,6 +1709,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"已处理" : {
|
"已处理" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -1669,6 +1720,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"已备份" : {
|
"已备份" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -1987,7 +2039,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"折叠全部" : {
|
"折叠全部" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -1998,7 +2049,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"持久化文件" : {
|
"持久化文件" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -2372,6 +2422,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"未处理" : {
|
"未处理" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -2382,6 +2433,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"未备份" : {
|
"未备份" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -2402,7 +2454,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"未对 Setup 组件进行处理或者 Setup 组件不存在,无法使用安装功能\n你可以通过设置页面再次对 Setup 组件进行处理" : {
|
"未对 Setup 组件进行处理或者 Setup 组件不存在,无法使用安装功能\n你可以通过设置页面再次对 Setup 组件进行处理" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -2413,6 +2464,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"未对 Setup 组件进行处理或者 Setup 组件不存在,无法使用安装功能\n你可以通过设置页面对 Setup 组件进行处理" : {
|
"未对 Setup 组件进行处理或者 Setup 组件不存在,无法使用安装功能\n你可以通过设置页面对 Setup 组件进行处理" : {
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
@@ -2511,7 +2563,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"条件: %@" : {
|
"条件: %@" : {
|
||||||
"extractionState" : "stale",
|
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
# channels 的分析
|
|
||||||
|
|
||||||
> 关于 Adobe 的 JSON 文件中 channels 的分析
|
|
||||||
|
|
||||||
channels是一个数组,有两个成员,两个成员结构大致相同,分别是
|
|
||||||
|
|
||||||
- sti
|
|
||||||
- ccm
|
|
||||||
|
|
||||||
## sti
|
|
||||||
|
|
||||||
sti 里的产品一般是 Adobe App 中的必要组件,主要有以下
|
|
||||||
> 数据更新日为: 2025.02.25
|
|
||||||
|
|
||||||
- CAI
|
|
||||||
- Camera Raw
|
|
||||||
- Camera Raw CC
|
|
||||||
- Adobe Character Animator (Preview 4)
|
|
||||||
- CCX Process
|
|
||||||
- Codecs
|
|
||||||
- STI_ColorCommonSet_CMYK_HD
|
|
||||||
- STI_Color_MotionPicture_HD
|
|
||||||
- STI_Color_Photoshop_HD
|
|
||||||
- STI_Color_HD
|
|
||||||
- STI_ColorCommonSet_RGB_HD
|
|
||||||
- CoreSync
|
|
||||||
- Adobe Captivate Assets 2017
|
|
||||||
- Adobe Captivate Voices 2017
|
|
||||||
- Camera Raw Elements
|
|
||||||
- Animate HLAN
|
|
||||||
- HD_ASU
|
|
||||||
- Adobe Fonts
|
|
||||||
- CC Library
|
|
||||||
- Adobe Preview CC
|
|
||||||
- Substance 3D Viewer for Photoshop
|
|
||||||
- SeashellPSPlugin
|
|
||||||
|
|
||||||
## ccm
|
|
||||||
|
|
||||||
ccm 里的产品一般是 Adobe App 中的主程序版本,主要有以下
|
|
||||||
> 数据更新日为: 2025.02.25
|
|
||||||
|
|
||||||
- Adobe Application Manager
|
|
||||||
- After Effects
|
|
||||||
- After Effects (Beta)
|
|
||||||
- Aero (Beta)
|
|
||||||
- Aero (Desktop)
|
|
||||||
- InCopy
|
|
||||||
- Media Encoder
|
|
||||||
- Media Encoder (Beta)
|
|
||||||
- Acrobat
|
|
||||||
- Scout CC
|
|
||||||
- Audition
|
|
||||||
- Audition (Beta)
|
|
||||||
- Character Animator
|
|
||||||
- Character Animator (Beta)
|
|
||||||
- Dreamweaver
|
|
||||||
- Dimension
|
|
||||||
- Flash Builder Premium
|
|
||||||
- Animate
|
|
||||||
- Fireworks CS6
|
|
||||||
- Gaming SDK 1.4
|
|
||||||
- InDesign
|
|
||||||
- InDesign (Beta)
|
|
||||||
- Illustrator
|
|
||||||
- Illustrator (Prerelease)
|
|
||||||
- Bridge
|
|
||||||
- Bridge (Beta)
|
|
||||||
- Creative Cloud
|
|
||||||
- Extension Manager CC
|
|
||||||
- Extendscript Toolkit CC
|
|
||||||
- Lightroom
|
|
||||||
- Lightroom Classic
|
|
||||||
- Muse CC
|
|
||||||
- Muse CC (2017)
|
|
||||||
- Photoshop
|
|
||||||
- Premiere Pro
|
|
||||||
- Premiere Pro (Beta)
|
|
||||||
- Premiere Rush
|
|
||||||
- Premiere Rush CC
|
|
||||||
- Premiere Rush (Beta)
|
|
||||||
- Substance 3D Sampler
|
|
||||||
- Substance Alchemist
|
|
||||||
- Substance 3D Designer
|
|
||||||
- Substance Designer
|
|
||||||
- Substance 3D Painter
|
|
||||||
- Substance Painter
|
|
||||||
- Substance 3D Viewer (Beta)
|
|
||||||
- Substance 3D Stager
|
|
||||||
- Touch App Plugins
|
|
||||||
- UXP Developer Tools
|
|
||||||
Reference in New Issue
Block a user