mirror of
https://github.com/X1a0He/Adobe-Downloader.git
synced 2025-11-26 03:28:37 +08:00
Add: Added Adobe Creative Cloud installation detection.
This commit is contained in:
@@ -7,6 +7,7 @@ struct Adobe_DownloaderApp: App {
|
|||||||
@State private var showBackupAlert = false
|
@State private var showBackupAlert = false
|
||||||
@State private var showTipsSheet = false
|
@State private var showTipsSheet = false
|
||||||
@State private var showLanguagePicker = false
|
@State private var showLanguagePicker = false
|
||||||
|
@State private var showCreativeCloudAlert = false
|
||||||
@AppStorage("useDefaultLanguage") private var useDefaultLanguage: Bool = true
|
@AppStorage("useDefaultLanguage") private var useDefaultLanguage: Bool = true
|
||||||
@AppStorage("defaultLanguage") private var defaultLanguage: String = "ALL"
|
@AppStorage("defaultLanguage") private var defaultLanguage: String = "ALL"
|
||||||
@AppStorage("downloadAppleSilicon") private var downloadAppleSilicon: Bool = true
|
@AppStorage("downloadAppleSilicon") private var downloadAppleSilicon: Bool = true
|
||||||
@@ -44,6 +45,8 @@ struct Adobe_DownloaderApp: App {
|
|||||||
.frame(width: 850, height: 800)
|
.frame(width: 850, height: 800)
|
||||||
.tint(.blue)
|
.tint(.blue)
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
checkCreativeCloudSetup()
|
||||||
|
|
||||||
if ModifySetup.checkSetupBackup() {
|
if ModifySetup.checkSetupBackup() {
|
||||||
showBackupAlert = true
|
showBackupAlert = true
|
||||||
}
|
}
|
||||||
@@ -128,6 +131,19 @@ struct Adobe_DownloaderApp: App {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.alert("未安装 Adobe Creative Cloud", isPresented: $showCreativeCloudAlert) {
|
||||||
|
Button("前往下载") {
|
||||||
|
if let url = URL(string: "https://creativecloud.adobe.com/apps/download/creative-cloud") {
|
||||||
|
NSWorkspace.shared.open(url)
|
||||||
|
}
|
||||||
|
NSApplication.shared.terminate(nil)
|
||||||
|
}
|
||||||
|
Button("取消", role: .cancel) {
|
||||||
|
NSApplication.shared.terminate(nil)
|
||||||
|
}
|
||||||
|
} message: {
|
||||||
|
Text("需要先安装 Adobe Creative Cloud 才能继续使用本程序")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.windowStyle(.hiddenTitleBar)
|
.windowStyle(.hiddenTitleBar)
|
||||||
.windowResizability(.contentSize)
|
.windowResizability(.contentSize)
|
||||||
@@ -138,6 +154,13 @@ struct Adobe_DownloaderApp: App {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func checkCreativeCloudSetup() {
|
||||||
|
let setupPath = "/Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Setup"
|
||||||
|
if !FileManager.default.fileExists(atPath: setupPath) {
|
||||||
|
showCreativeCloudAlert = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func getLanguageName(code: String) -> String {
|
private func getLanguageName(code: String) -> String {
|
||||||
AppStatics.supportedLanguages.first { $0.code == code }?.name ?? code
|
AppStatics.supportedLanguages.first { $0.code == code }?.name ?? code
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ struct DownloadManagerView: View {
|
|||||||
|
|
||||||
var description: String {
|
var description: String {
|
||||||
switch self {
|
switch self {
|
||||||
case .addTime: return "按添加时间"
|
case .addTime: return String(localized: "按添加时间")
|
||||||
case .name: return "按名称"
|
case .name: return String(localized: "按名称")
|
||||||
case .status: return "按状态"
|
case .status: return String(localized: "按状态")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -330,6 +330,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"前往下载" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Go to download"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"加载失败" : {
|
"加载失败" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
@@ -461,6 +471,36 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"按名称" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Sort by name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"按添加时间" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Sort by added time"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"按状态" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Sort by status"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"搜索应用" : {
|
"搜索应用" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
@@ -522,6 +562,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"未安装 Adobe Creative Cloud" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Adobe Creative Cloud not installed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"未找到语言" : {
|
"未找到语言" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
@@ -795,6 +845,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"需要先安装 Adobe Creative Cloud 才能继续使用本程序" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "You need to install Adobe Creative Cloud before you can continue using this program"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version" : "1.0"
|
"version" : "1.0"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
- For historical update logs, please go to [Update Log](update-log.md)
|
- For historical update logs, please go to [Update Log](update-log.md)
|
||||||
|
|
||||||
- 2024-11-06 15:15 Update Log
|
- 2024-11-06 15:50 Update Log
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
1. 增加程序首次启动时的默认配置设定与提示
|
1. 增加程序首次启动时的默认配置设定与提示
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
4. 移除主界面的语言选择和目录选择,移动到了设置中
|
4. 移除主界面的语言选择和目录选择,移动到了设置中
|
||||||
5. 版本选择页面增加架构提示
|
5. 版本选择页面增加架构提示
|
||||||
6. 移除了安装程序的机制,现在不会再生成安装程序
|
6. 移除了安装程序的机制,现在不会再生成安装程序
|
||||||
|
7. 增加了Adobe Creative Cloud安装检测,未安装前无法使用
|
||||||
|
|
||||||
====================
|
====================
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
4. Removed the language selection and directory selection on the main interface and moved them to settings
|
4. Removed the language selection and directory selection on the main interface and moved them to settings
|
||||||
5. Added architecture prompts on the version selection page
|
5. Added architecture prompts on the version selection page
|
||||||
6. Removed the installer mechanism, and now no installer will be generated
|
6. Removed the installer mechanism, and now no installer will be generated
|
||||||
|
7. Added Adobe Creative Cloud installation detection, which cannot be used before installation
|
||||||
```
|
```
|
||||||
|
|
||||||
### Language friendly
|
### Language friendly
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
- 2024-11-06 15:15 更新日志
|
- 2024-11-06 15:50 更新日志
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
1. 增加程序首次启动时的默认配置设定与提示
|
1. 增加程序首次启动时的默认配置设定与提示
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
4. 移除主界面的语言选择和目录选择,移动到了设置中
|
4. 移除主界面的语言选择和目录选择,移动到了设置中
|
||||||
5. 版本选择页面增加架构提示
|
5. 版本选择页面增加架构提示
|
||||||
6. 移除了安装程序的机制,现在不会再生成安装程序
|
6. 移除了安装程序的机制,现在不会再生成安装程序
|
||||||
|
7. 增加了Adobe Creative Cloud安装检测,未安装前无法使用
|
||||||
|
|
||||||
====================
|
====================
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
4. Removed the language selection and directory selection on the main interface and moved them to settings
|
4. Removed the language selection and directory selection on the main interface and moved them to settings
|
||||||
5. Added architecture prompts on the version selection page
|
5. Added architecture prompts on the version selection page
|
||||||
6. Removed the installer mechanism, and now no installer will be generated
|
6. Removed the installer mechanism, and now no installer will be generated
|
||||||
|
7. Added Adobe Creative Cloud installation detection, which cannot be used before installation
|
||||||
```
|
```
|
||||||
|
|
||||||
- 2024-11-05 21:15 更新日志
|
- 2024-11-05 21:15 更新日志
|
||||||
|
|||||||
Reference in New Issue
Block a user