release: 2.1.2

This commit is contained in:
X1a0He
2025-08-11 12:30:34 +08:00
parent f7a0ef8e3f
commit 4d44dc264f
7 changed files with 257 additions and 13 deletions

View File

@@ -431,7 +431,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 211;
CURRENT_PROJECT_VERSION = 212;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Adobe Downloader/Preview Content\"";
ENABLE_HARDENED_RUNTIME = NO;
@@ -446,7 +446,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.1.1;
MARKETING_VERSION = 2.1.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.x1a0he.macOS.Adobe-Downloader";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -464,7 +464,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 211;
CURRENT_PROJECT_VERSION = 212;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Adobe Downloader/Preview Content\"";
ENABLE_HARDENED_RUNTIME = NO;
@@ -479,7 +479,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.1.1;
MARKETING_VERSION = 2.1.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.x1a0he.macOS.Adobe-Downloader";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;

View File

@@ -181,6 +181,14 @@ class ModernPrivilegedHelperManager: NSObject, ObservableObject {
return .notInstalled
case .enabled:
let installedBuild = UserDefaults.standard.string(forKey: "InstalledHelperBuild")
let installedVersion = UserDefaults.standard.string(forKey: "InstalledHelperVersion")
if installedBuild == nil || installedVersion == nil {
logger.info("Helper已启用但缺少版本信息需要重新注册")
return .requiresUpdate
}
if await needsUpdate() {
return .requiresUpdate
}
@@ -205,12 +213,19 @@ class ModernPrivilegedHelperManager: NSObject, ObservableObject {
return
}
logger.info("正在重新注册Helper...")
do {
try appService.register()
logger.info("Helper 注册成功")
logger.info("Helper 重新注册成功")
if let currentBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
UserDefaults.standard.set(currentBuild, forKey: "InstalledHelperBuild")
logger.info("已保存Helper Build版本: \(currentBuild)")
}
if let currentVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
UserDefaults.standard.set(currentVersion, forKey: "InstalledHelperVersion")
logger.info("已保存Helper主版本: \(currentVersion)")
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
@@ -268,6 +283,7 @@ class ModernPrivilegedHelperManager: NSObject, ObservableObject {
}
private func updateHelper() {
logger.info("检测到Helper版本不匹配开始重新安装Helper")
registerHelper()
}
@@ -288,6 +304,7 @@ class ModernPrivilegedHelperManager: NSObject, ObservableObject {
try await cleanupLegacyInstallation()
UserDefaults.standard.removeObject(forKey: "InstalledHelperBuild")
UserDefaults.standard.removeObject(forKey: "InstalledHelperVersion")
await MainActor.run {
connectionState = .disconnected
@@ -553,11 +570,59 @@ class ModernPrivilegedHelperManager: NSObject, ObservableObject {
private func needsUpdate() async -> Bool {
guard let currentBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String,
let installedBuild = UserDefaults.standard.string(forKey: "InstalledHelperBuild") else {
let currentVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String else {
logger.warning("无法获取当前应用版本信息")
return true
}
return currentBuild != installedBuild
let installedBuild = UserDefaults.standard.string(forKey: "InstalledHelperBuild")
let installedVersion = UserDefaults.standard.string(forKey: "InstalledHelperVersion")
guard let savedBuild = installedBuild, let savedVersion = installedVersion else {
logger.info("未找到已安装的Helper版本信息当前版本=\(currentVersion)(\(currentBuild))")
return true
}
let versionComparison = compareVersions(current: currentVersion, installed: savedVersion)
if versionComparison == .orderedDescending {
logger.info("主版本升级,需要更新: 当前=\(currentVersion), 已安装=\(savedVersion)")
return true
} else if versionComparison == .orderedAscending {
logger.info("当前版本低于已安装版本强制更新Helper以匹配应用: 当前=\(currentVersion), 已安装=\(savedVersion)")
return true
}
let buildComparison = compareVersions(current: currentBuild, installed: savedBuild)
if buildComparison == .orderedDescending {
logger.info("Build版本升级需要更新: 当前=\(currentBuild), 已安装=\(savedBuild)")
return true
} else if buildComparison == .orderedAscending {
logger.info("当前Build版本低于已安装版本强制更新Helper以匹配应用: 当前=\(currentBuild), 已安装=\(savedBuild)")
return true
}
logger.info("Helper版本检查通过: 当前版本=\(currentVersion)(\(currentBuild)), 已安装版本=\(savedVersion)(\(savedBuild))")
return false
}
private func compareVersions(current: String, installed: String) -> ComparisonResult {
let currentComponents = current.split(separator: ".").compactMap { Int($0) }
let installedComponents = installed.split(separator: ".").compactMap { Int($0) }
let maxCount = max(currentComponents.count, installedComponents.count)
for i in 0..<maxCount {
let currentPart = i < currentComponents.count ? currentComponents[i] : 0
let installedPart = i < installedComponents.count ? installedComponents[i] : 0
if currentPart > installedPart {
return .orderedDescending
} else if currentPart < installedPart {
return .orderedAscending
}
}
return .orderedSame
}
@objc private func handleConnectionInvalidation() {

View File

@@ -176,6 +176,17 @@
}
},
"Adobe Downloader 需要通过后台服务来安装与移动文件。请在\"系统设置 → 通用 → 登录项与扩展\"中允许此应用的后台项目。" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Adobe Downloader needs to use the background service to install and move files. Please allow this app's background project in \"System Settings → General → Login Items and Extensions\"."
}
}
}
},
"Adobe Downloader需要后台Helper服务来执行安装和文件操作。\n\n解决方法\n1. 点击下方「打开系统设置」按钮\n2. 在「登录项与扩展」中找到 Adobe Downloader\n3. 确保应用已被允许,并检查是否有任何需要启用的后台项目\n4. 如果看不到相关选项,请尝试:\n - 重启 Adobe Downloader\n - 或重启系统后再试\n\n注意macOS可能需要重启才能完全激活Helper服务。" : {
"localizations" : {
"en" : {
"stringUnit" : {
@@ -445,6 +456,16 @@
}
}
},
"Helper服务需要批准" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Helper service needs approval"
}
}
}
},
"HTTP错误 %d: %@" : {
"comment" : "HTTP error",
"localizations" : {
@@ -876,6 +897,16 @@
}
}
},
"保留文件" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Keep files"
}
}
}
},
"修改 Setup 组件失败" : {
"localizations" : {
"en" : {
@@ -1060,6 +1091,16 @@
}
}
},
"删除已完成任务时同时删除本地文件" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Delete completed tasks when deleting local files"
}
}
}
},
"删除所有已安装的 Adobe 应用程序(不包括 Adobe Downloader" : {
"localizations" : {
"en" : {
@@ -1518,6 +1559,16 @@
}
}
},
"将删除文件" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Will delete files"
}
}
}
},
"将执行的命令:" : {
"localizations" : {
"en" : {
@@ -1864,6 +1915,26 @@
}
}
},
"打开系统设置批准Helper" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Open System Settings to Approve Helper"
}
}
}
},
"打开设置" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Open Settings"
}
}
}
},
"执行卸载脚本失败: %@" : {
"extractionState" : "stale",
"localizations" : {
@@ -2438,6 +2509,17 @@
}
}
},
"条件: %@" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Condition: %@"
}
}
}
},
"查看" : {
"localizations" : {
"en" : {
@@ -2780,7 +2862,14 @@
}
},
"没有写入权限" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "No write permissions"
}
}
}
},
"没有找到产品" : {
"localizations" : {
@@ -2964,7 +3053,28 @@
}
}
},
"确定要删除所有已完成和失败的下载任务吗?\n\n• 已完成的任务:仅删除任务记录,保留本地文件\n• 失败的任务:将删除任务记录和本地文件" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Are you sure you want to delete all completed and failed downloads?\n\n• Completed tasks: Only delete task records, keep local files\n• Failed tasks: Delete task records and local files"
}
}
}
},
"确定要删除所有已完成和失败的下载任务吗?\n\n• 已完成的任务:将删除任务记录和本地文件\n• 失败的任务:将删除任务记录和本地文件" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Are you sure you want to delete all completed and failed downloads?\n\n• Completed tasks: Delete task records and local files\n• Failed tasks: Delete task records and local files"
}
}
}
},
"确定要删除所有已完成和失败的下载任务吗?此操作将同时删除本地文件。" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
@@ -3280,7 +3390,14 @@
}
},
"自行安装命令" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Self-installation command"
}
}
}
},
"自行安装命令:" : {
"localizations" : {
@@ -3731,6 +3848,7 @@
}
},
"需要在系统设置中允许 Helper" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
@@ -3750,6 +3868,16 @@
}
}
},
"需要批准" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Need to approve"
}
}
}
},
"默认" : {
"localizations" : {
"en" : {

View File

@@ -2,6 +2,34 @@
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<title>Adobe Downloader</title>
<item>
<title>2.1.2</title>
<pubDate>Mon, 11 Aug 2025 12:28:06 +0800</pubDate>
<sparkle:version>212</sparkle:version>
<sparkle:shortVersionString>2.1.2</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
<enclosure url="https://github.com/X1a0He/Adobe-Downloader/releases/download/2.1.2/Adobe.Downloader.dmg" length="4026368" type="application/octet-stream" sparkle:edSignature="LO/iyoV0Z58Xwg2OPia6x1urNbTBgXX5whJGW3E7pcggwsi9b7TJXdr4geHlCVUw77TKLwTgd9ZaQznS83lkAw=="/>
<description>
<![CDATA[
<style>ul{margin-top: 0;margin-bottom: 7;padding-left: 18;}</style>
<h4>Adobe Downloader 更新日志: </h4>
<ul>
<li>1. 修复了Helper无法连接的问题</li>
<li>2. 修复了自定义下载永远是最新版本的问题</li>
<li>3. 新增开关用于在删除任务时同时删除本地文件</li>
<li>4. 修复了Helper不会自动更新的问题</li>
</ul>
<hr>
<h4>Adobe Downloader Changes: </h4>
<ul>
<li>1. Fixed an issue where Helper could not reconnect.</li>
<li>2. Fixed an issue where the custom download is always the latest version.</li>
<li>3. Added a switch to delete local files at the same time when deleting tasks.</li>
<li>4. Fixed an issue where Helper would not automatically update.</li>
</ul>
]]>
</description>
</item>
<item>
<title>2.1.1</title>
<pubDate>Tue, 22 Jul 2025 21:21:49 +0800</pubDate>

View File

@@ -68,10 +68,13 @@ when prompted.
- For historical update logs, please go to [Update Log](update-log.md)
- 2025-07-22 Update Log
- 2025-08-11 Update Log
```markdown
1. Fixed an issue where Acrobat products could not be downloaded.
1. Fixed an issue where Helper could not reconnect.
2. Fixed an issue where the custom download is always the latest version.
3. Added a switch to delete local files at the same time when deleting tasks.
4. Fixed an issue where Helper would not automatically update.
```
### Language friendly

View File

@@ -58,10 +58,13 @@
- 更多关于 App 的更新日志,请查看 [Update Log](update-log.md)
- 2025-07-22 更新日志
- 2025-08-11 更新日志
```markdown
1. 修复了无法下载 Acrobat 的问题
1. 修复了Helper无法连接的问题
2. 修复了自定义下载永远是最新版本的问题
3. 新增开关用于在删除任务时同时删除本地文件
4. 修复了Helper不会自动更新的问题
```
### 语言支持

View File

@@ -1,5 +1,22 @@
# Change Log
## 2025-08-11 更新日志
[//]: # (2.1.2)
```markdown
1. 修复了Helper无法连接的问题
2. 修复了自定义下载永远是最新版本的问题
3. 新增开关用于在删除任务时同时删除本地文件
4. 修复了Helper不会自动更新的问题
====================
1. Fixed an issue where Helper could not reconnect.
2. Fixed an issue where the custom download is always the latest version.
3. Added a switch to delete local files at the same time when deleting tasks.
4. Fixed an issue where Helper would not automatically update.
```
## 2025-07-22 更新日志
[//]: # (2.1.1)