Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Improve reliability of modifying Final Cut Pro 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
cormiertyshawn895 committed Apr 27, 2020
1 parent 34029b7 commit 0277ee4
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Retroactive.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@
CODE_SIGN_ENTITLEMENTS = Retroactive/Support/Retroactive.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 62;
CURRENT_PROJECT_VERSION = 63;
INFOPLIST_FILE = Retroactive/Support/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -993,7 +993,7 @@
CODE_SIGN_ENTITLEMENTS = Retroactive/Support/Retroactive.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 62;
CURRENT_PROJECT_VERSION = 63;
INFOPLIST_FILE = Retroactive/Support/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
12 changes: 10 additions & 2 deletions Retroactive/AppManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ let purposeToken = "{purpose}"
let actionPresentTenseToken = "{actionPR}"

let kCustomSettingsPath = "/Library/Application Support/Final Cut Pro System Support/Custom Settings"
let kFCP7EasySetupPath = "/Applications/Final Cut Pro Additional Easy Setups"
let kFCP7EasySetupPathLocalizedPath = "/Applications/Final Cut Pro Additional Easy Setups.localized"

let lastHWForMojave = ["iMac19,2", "iMacPro1,1", "MacBook10,1", "MacBookAir8,2", "MacBookPro15,4", "Macmini8,1", "MacPro6,1"]

Expand Down Expand Up @@ -519,7 +521,13 @@ class AppManager: NSObject {
let contents = try FileManager.default.contentsOfDirectory(atPath: kCustomSettingsPath)
let presets = contents.filter { $0.lowercased().hasSuffix(".fcpre") }
if (presets.count == 0) {
return
print("No presets are left at the custom settings path.")
}
if (FileManager.default.fileExists(atPath: kFCP7EasySetupPath)) {
try FileManager.default.removeItem(atPath: kFCP7EasySetupPath)
}
if (FileManager.default.fileExists(atPath: kFCP7EasySetupPathLocalizedPath)) {
try FileManager.default.removeItem(atPath: kFCP7EasySetupPathLocalizedPath)
}
} catch {
print("Can't determine if custom settings exist \(error)")
Expand Down Expand Up @@ -1172,7 +1180,7 @@ class AppManager: NSObject {
case .itunes:
return ""
case .finalCutPro7:
return dvdTemplate
return dvdTemplate + twoNewLines + "If you have already installed Final Cut Pro X on your Mac, the Final Cut Pro 7 package will be grayed out in the Final Cut Studio 3 installer. You need to rename “Final Cut Pro.app” into “Final Cut Pro X.app”, or move it into a different folder.".localized()
case .logicPro9:
return dvdTemplate + twoNewLines + appStoreTemplate
case .keynote5, .pages4, .numbers2:
Expand Down
2 changes: 1 addition & 1 deletion Retroactive/StepOne/AppFinder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class AppFinder: NSObject {
secondParagraph = String(format: "Directly download %@ from the Apple Developer website, then run Retroactive again.".localized(), name)
} else if AppManager.shared.hasChoseniWork {
secondParagraph = onlyRequiresMinorUpdate ?
String(format: "Click on “Download Update to download and install the iWork 9.3 Update.".localized(), name, compat) :
String(format: "Click on “Download Update to download and install the iWork 9.3 Update.".localized(), name, compat) :
"Download and install iWork ’09 from The Internet Archive, then install the iWork 9.3 Update.".localized()
} else {
secondParagraph = String(format: "Download the latest version of %@ %@ from the Purchased list in the Mac App Store, then run Retroactive again.".localized(), name, compat)
Expand Down
4 changes: 4 additions & 0 deletions Retroactive/StepThree/ProgressViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ class ProgressViewController: NSViewController, URLSessionDelegate, URLSessionDa
let kAudioToolboxCopyPath = "\(appPath)/Contents/Frameworks/AudioToolbox.framework"
let kMobileDeviceCopyPath = "\(appPath)/Contents/Frameworks/MobileDevice.framework"
let fsCustomSettingsPath = kCustomSettingsPath.fileSystemString
let fsEasySetupPath = kFCP7EasySetupPath.fileSystemString
let fsEasySetupLocalizedPath = kFCP7EasySetupPathLocalizedPath.fileSystemString

if (fullMode == true) {
// It shouldn't be possible to have ProKit or BrowserKit at /System/Library/Frameworks on High Sierra or Mojave, and deleting them will fail with SIP.
Expand Down Expand Up @@ -239,6 +241,8 @@ class ProgressViewController: NSViewController, URLSessionDelegate, URLSessionDa

// Having custom settings will hang Final Cut Pro at launch, let's delete it.
self.runTask(toolPath: "/bin/rm", arguments: ["-rf", fsCustomSettingsPath])
self.runTask(toolPath: "/bin/rm", arguments: ["-rf", fsEasySetupPath])
self.runTask(toolPath: "/bin/rm", arguments: ["-rf", fsEasySetupLocalizedPath])

self.stage4Started()
self.runTask(toolPath: "/usr/bin/codesign", arguments: ["-fs", "-", appPath, "--deep"])
Expand Down
8 changes: 4 additions & 4 deletions Retroactive/Support/SupportPath.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>NewVersionVisibleTitle</key>
<string>Retroactive 1.7 (Build 62) improves compatibility between iWork ’09 and macOS Mojave, and contains bug fixes for Logic Pro 9.</string>
<string>Retroactive 1.7 (Build 63) improves compatibility between iWork ’09 and macOS Mojave, and contains bug fixes for Logic Pro 9.</string>
<key>NewVersionChangelog</key>
<string>• Resolves an issue where typing and scrolling in Pages ’09 may be slow
• Resolves an issue where Pages may fail to resize when the Styles drawer is visible
Expand All @@ -13,7 +13,7 @@
• Resolves an issue where text in Japanese, Traditional Chinese, and Simplified Chinese may be invisible or appear as special characters in iWork ’09
• Resolves an issue where 32-bit Audio Bridge may quit unexpectedly when opening Logic Pro 9</string>
<key>NewVersionVisibleTitlezhHans</key>
<string>新版本解印 1.7 (版本号 62) 改进了 iWork ’09 与 macOS Mojave 的兼容性,并包含对 Logic Pro 9 的错误修正</string>
<string>新版本解印 1.7 (版本号 63) 改进了 iWork ’09 与 macOS Mojave 的兼容性,并包含对 Logic Pro 9 的错误修正</string>
<key>NewVersionChangelogzhHans</key>
<string>• 解决了在 Pages ’09 中输入文字和滚动可能响应缓慢的问题
• 解决了在 Pages ’09 中显示样式抽屉时窗口可能无法调整大小的问题
Expand All @@ -23,7 +23,7 @@
• 解决了在 iWork ’09 中简体中文、繁体中文和日文字符可能不可见或被特殊字符替代的问题
• 解决了在启动 Logic Pro 9 时,32 位 Audio Bridge 可能意外退出的问题</string>
<key>NewVersionVisibleTitlezhHant</key>
<string>新版本解印 1.7 (版本號 62) 改進了 iWork ’09 與 macOS Mojave 的兼容性,並包含對 Logic Pro 9 的錯誤修正</string>
<string>新版本解印 1.7 (版本號 63) 改進了 iWork ’09 與 macOS Mojave 的兼容性,並包含對 Logic Pro 9 的錯誤修正</string>
<key>NewVersionChangelogzhHant</key>
<string>• 解決了在 Pages ’09 中輸入文字和滾動可能響應緩慢的問題
• 解決了在 Pages ’09 中顯示樣式抽屜時窗口可能無法調整大小的問題
Expand All @@ -35,7 +35,7 @@
<key>LatestZIP</key>
<string>https://github.com/cormiertyshawn895/Retroactive/releases/download/1.7/Retroactive.1.7.zip</string>
<key>LatestBuildNumber</key>
<integer>62</integer>
<integer>63</integer>
<key>SupportPathURL</key>
<string>https://raw.githubusercontent.com/cormiertyshawn895/Retroactive/master/Retroactive/Support/SupportPath.plist</string>
<key>ReleasePage</key>
Expand Down
3 changes: 2 additions & 1 deletion Retroactive/Support/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Cancel" = "取消";
"Check Again" = "重新检查";
"Classic Look" = "经典外观";
"Click on “Download Update to download and install the iWork 9.3 Update." = "点击 “下载更新” 以下载并安装 iWork 9.3 更新。";
"Click on “Download Update to download and install the iWork 9.3 Update." = "点击 “下载更新” 以下载并安装 iWork 9.3 更新。";
"Completed" = "完成";
"Configure %@" = "配置 %@";
"Connect an iOS device to Apple Configurator 2" = "将 iOS 设备连接至 Apple Configurator 2";
Expand Down Expand Up @@ -53,6 +53,7 @@
"If iTunes 12.6.5 can't back up your device, try to use iTunes 12.9.5 or Finder instead." = "如果 iTunes 12.6.5 无法备份您的设备,请安装 iTunes 12.9.5 或直接使用访达。";
"If you have a DVD installer for %@, insert the DVD and install it. If you don't have a DVD installer, You may be able to purchase a boxed copy of %@ on eBay." = "如果您有 %@ 的 DVD 安装光盘,插入光盘并安装该应用程序。如果您没有 DVD 安装光盘,您可能可以在咸鱼等二手交易平台上购买盒装版 %@。";
"If you have already installed %@ %@ at a custom location, you can also locate it manually." = "如果您已经在自定义位置安装了 %@ %@,请手动寻找并选择该应用程序。";
"If you have already installed Final Cut Pro X on your Mac, the Final Cut Pro 7 package will be grayed out in the Final Cut Studio 3 installer. You need to rename “Final Cut Pro.app” into “Final Cut Pro X.app”, or move it into a different folder." = "如果您已经在 Mac 上安装了 Final Cut Pro X,在安装 Final Cut Studio 3 时,您将无法选择 Final Cut Pro 7 选项。您需要将已安装的 “Final Cut Pro.app” 重命名为 “Final Cut Pro X.app”,或将其移动到另一个文件夹中。";
"If you have installed %@ at a custom location, locate it manually." = "如果您将 %@ 安装在了自定义的位置,请手动寻找并选择该应用程序。";
"If you have previously downloaded %@ from the Mac App Store, download it again from the Purchased list." = "如果您此前曾在 Mac App Store 下载过 %@,请前往已购清单将其重新下载。";
"If you upgrade to macOS Catalina, Final Cut Pro 7, Logic Pro 9, and iWork ’09 will be locked again, and can’t be unlocked. However, Retroactive can still unlock Aperture and iPhoto, or install iTunes on macOS Catalina." = "如果您将 Mac 更新到 macOS Catalina,Final Cut Pro 7、Logic Pro 9 和 iWork ’09 会被重新封印且无法解除。但解印依然可以在 macOS Catalina 下解锁 Aperture 和 iPhoto,或安装 iTunes。";
Expand Down
3 changes: 2 additions & 1 deletion Retroactive/Support/zh-Hant.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Cancel" = "取消";
"Check Again" = "重新檢查";
"Classic Look" = "經典外觀";
"Click on “Download Update to download and install the iWork 9.3 Update." = "點擊 “下載更新” 以下載並安裝 iWork 9.3 更新。";
"Click on “Download Update to download and install the iWork 9.3 Update." = "點擊 “下載更新” 以下載並安裝 iWork 9.3 更新。";
"Completed" = "完成";
"Configure %@" = "配置 %@";
"Connect an iOS device to Apple Configurator 2" = "將 iOS 設備連接至 Apple Configurator 2";
Expand Down Expand Up @@ -53,6 +53,7 @@
"If iTunes 12.6.5 can't back up your device, try to use iTunes 12.9.5 or Finder instead." = "如果 iTunes 12.6.5 無法備份您的設備,請安裝 iTunes 12.9.5 或直接使用 Finder。";
"If you have a DVD installer for %@, insert the DVD and install it. If you don't have a DVD installer, You may be able to purchase a boxed copy of %@ on eBay." = "如果您有 %@ 的 DVD 安裝光盤,插入光盤並安裝該應用程序。如果您沒有 DVD 安裝光盤,您可能可以在鹹魚等二手交易平台上購買盒裝版 %@。";
"If you have already installed %@ %@ at a custom location, you can also locate it manually." = "如果您已經在自定義位置安裝了 %@ %@,請手動尋找並選擇該應用程序。";
"If you have already installed Final Cut Pro X on your Mac, the Final Cut Pro 7 package will be grayed out in the Final Cut Studio 3 installer. You need to rename “Final Cut Pro.app” into “Final Cut Pro X.app”, or move it into a different folder." = "如果您已經在 Mac 上安裝了 Final Cut Pro X,在安裝 Final Cut Studio 3 時,您將無法選擇 Final Cut Pro 7 選項。您需要將已安裝的 “Final Cut Pro.app” 重命名為 “Final Cut Pro X.app”,或將其移動到另一個文件夾中。";
"If you have installed %@ at a custom location, locate it manually." = "如果您將 %@ 安裝在了自定義的位置,請手動尋找並選擇該應用程序。";
"If you have previously downloaded %@ from the Mac App Store, download it again from the Purchased list." = "如果您此前曾在 Mac App Store 下載過 %@,請前往已購清單將其重新下載。";
"If you upgrade to macOS Catalina, Final Cut Pro 7, Logic Pro 9, and iWork ’09 will be locked again, and can’t be unlocked. However, Retroactive can still unlock Aperture and iPhoto, or install iTunes on macOS Catalina." = "如果您將 Mac 更新到 macOS Catalina,Final Cut Pro 7、Logic Pro 9 和 iWork ’09 會被重新封印且無法解除。但解印依然可以在 macOS Catalina 下解鎖 Aperture 和 iPhoto,或安裝 iTunes。 ";
Expand Down

0 comments on commit 0277ee4

Please sign in to comment.