Update path to system settings on Ventura

"System Preferences" has been renamed to "System Settings" on Ventura.
Privacy and security settings have moved, too. This commit makes sure
these changes are reflected. (Some adjustments were already made in
#14092.)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
This commit is contained in:
Ruoyu Zhong 2023-03-17 19:13:08 +08:00
parent 650f516c5b
commit e9ce4a5a4e
No known key found for this signature in database
GPG Key ID: 42F3B7E577C2156A
5 changed files with 30 additions and 10 deletions

View File

@ -160,9 +160,15 @@ module Cask
sig { returns(String) } sig { returns(String) }
def automation_access_instructions def automation_access_instructions
navigation_path = if MacOS.version >= :ventura
"System Settings → Privacy & Security"
else
"System Preferences → Security & Privacy → Privacy"
end
<<~EOS <<~EOS
Enable Automation access for "Terminal → System Events" in: Enable Automation access for "Terminal → System Events" in:
System Preferences Security & Privacy Privacy Automation #{navigation_path} → Automation
if you haven't already. if you haven't already.
EOS EOS
end end
@ -371,8 +377,14 @@ module Cask
rescue Errno::EPERM rescue Errno::EPERM
raise if File.readable?(File.expand_path("~/Library/Application Support/com.apple.TCC")) raise if File.readable?(File.expand_path("~/Library/Application Support/com.apple.TCC"))
navigation_path = if MacOS.version >= :ventura
"System Settings → Privacy & Security"
else
"System Preferences → Security & Privacy → Privacy"
end
odie "Unable to remove some files. Please enable Full Disk Access for your terminal under " \ odie "Unable to remove some files. Please enable Full Disk Access for your terminal under " \
"System Preferences → Security & Privacy → Privacy → Full Disk Access." "#{navigation_path} → Full Disk Access."
end end
end end
end end

View File

@ -58,10 +58,16 @@ module Cask
caveat :kext do caveat :kext do
next if MacOS.version < :high_sierra next if MacOS.version < :high_sierra
navigation_path = if MacOS.version >= :ventura
"System Settings → Privacy & Security"
else
"System Preferences → Security & Privacy → General"
end
<<~EOS <<~EOS
#{@cask} requires a kernel extension to work. #{@cask} requires a kernel extension to work.
If the installation fails, retry after you enable it in: If the installation fails, retry after you enable it in:
System Preferences Security & Privacy General #{navigation_path}
For more information, refer to vendor documentation or this Apple Technical Note: For more information, refer to vendor documentation or this Apple Technical Note:
#{Formatter.url("https://developer.apple.com/library/content/technotes/tn2459/_index.html")} #{Formatter.url("https://developer.apple.com/library/content/technotes/tn2459/_index.html")}
@ -71,10 +77,10 @@ module Cask
caveat :unsigned_accessibility do |access = "Accessibility"| caveat :unsigned_accessibility do |access = "Accessibility"|
# access: the category in the privacy settings the app requires. # access: the category in the privacy settings the app requires.
navigation_path = if MacOS.version < :ventura navigation_path = if MacOS.version >= :ventura
"System Preferences → Security & Privacy → Privacy"
else
"System Settings → Privacy & Security" "System Settings → Privacy & Security"
else
"System Preferences → Security & Privacy → Privacy"
end end
<<~EOS <<~EOS

View File

@ -318,7 +318,9 @@ module OS
sig { returns(String) } sig { returns(String) }
def update_instructions def update_instructions
software_update_location = if MacOS.version >= "10.14" software_update_location = if MacOS.version >= "13"
"System Settings"
elsif MacOS.version >= "10.14"
"System Preferences" "System Preferences"
else else
"the App Store" "the App Store"

View File

@ -73,7 +73,7 @@
] ]
} }
], ],
"caveats": "Installing everything might take a while...\n\neverything requires a kernel extension to work.\nIf the installation fails, retry after you enable it in:\n System Preferences → Security & Privacy → General\n\nFor more information, refer to vendor documentation or this Apple Technical Note:\n https://developer.apple.com/library/content/technotes/tn2459/_index.html\n", "caveats": "Installing everything might take a while...\n\neverything requires a kernel extension to work.\nIf the installation fails, retry after you enable it in:\n System Settings → Privacy & Security\n\nFor more information, refer to vendor documentation or this Apple Technical Note:\n https://developer.apple.com/library/content/technotes/tn2459/_index.html\n",
"depends_on": { "depends_on": {
"cask": [ "cask": [
"something" "something"

View File

@ -386,8 +386,8 @@ The following methods may be called to generate standard warning messages:
| `reboot` | Users should reboot to complete installation. | `reboot` | Users should reboot to complete installation.
| `files_in_usr_local` | The cask installs files to `/usr/local`, which may confuse Homebrew. | `files_in_usr_local` | The cask installs files to `/usr/local`, which may confuse Homebrew.
| `discontinued` | All software development has been officially discontinued upstream. | `discontinued` | All software development has been officially discontinued upstream.
| `kext` | Users may need to enable their kexts in *System Preferences → Security & Privacy → General*. | `kext` | Users may need to enable their kexts in *System Settings → Privacy & Security* (or *System Preferences → Security & Privacy → General* in earlier macOS versions).
| `unsigned_accessibility` | Users will need to re-enable the app on each update in *System Preferences → Security & Privacy → Privacy* as it is unsigned. | `unsigned_accessibility` | Users will need to re-enable the app on each update in *System Settings → Privacy & Security* (or *System Preferences → Security & Privacy → Privacy* in earlier macOS versions) as it is unsigned.
| `license "web_page"` | Users may find the software's usage license at `web_page`. | `license "web_page"` | Users may find the software's usage license at `web_page`.
| `free_license "web_page"` | Users may obtain an official license to use the software at `web_page`. | `free_license "web_page"` | Users may obtain an official license to use the software at `web_page`.