From e3a76be92acbbcb2cd18bdab3404c0ad39691ab6 Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Thu, 6 Mar 2025 13:19:26 +0530 Subject: [PATCH 01/11] Adding parallels to macos15 image --- images/macos/scripts/build/configure-system.sh | 2 +- images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 | 2 +- images/macos/toolsets/toolset-15.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/macos/scripts/build/configure-system.sh b/images/macos/scripts/build/configure-system.sh index 62fdb5bfc9..77983c4163 100644 --- a/images/macos/scripts/build/configure-system.sh +++ b/images/macos/scripts/build/configure-system.sh @@ -12,7 +12,7 @@ close_finder_window # Remove Parallels Desktop # https://github.com/actions/runner-images/issues/6105 # https://github.com/actions/runner-images/issues/10143 -if is_SonomaX64 || is_VenturaX64; then +if is_SonomaX64 || is_VenturaX64 || is_SequoiaX64; then brew uninstall parallels fi diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index a099454b86..3a22c580a0 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -179,7 +179,7 @@ if ($os.IsSonoma -or $os.IsVentura) { $miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion)) } -if ($os.IsSonomaX64 -or $os.IsVenturaX64) { +if ($os.IsSonomaX64 -or $os.IsVenturaX64 -or $os.IsSequoiaX64) { Write-Host "Adding environment variables for parallels" diff --git a/images/macos/toolsets/toolset-15.json b/images/macos/toolsets/toolset-15.json index 300867d00d..6a5ecb2b87 100644 --- a/images/macos/toolsets/toolset-15.json +++ b/images/macos/toolsets/toolset-15.json @@ -85,7 +85,7 @@ "xcodes" ], "cask_packages": [ - "" + "parallels" ] }, "gcc": { From 29950c294db9c9cd9b392c547ffe3a1c84db6304 Mon Sep 17 00:00:00 2001 From: susmitamane Date: Sat, 8 Mar 2025 00:41:34 +0530 Subject: [PATCH 02/11] [macOS] Fix null reference issue for `$miscellaneous` initialization --- images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index 3a22c580a0..50cfb103b5 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -174,7 +174,7 @@ $android.AddTable($androidTable) $androidEnv = $android.AddHeader("Environment variables") $androidEnv.AddTable($(Build-AndroidEnvironmentTable)) -if ($os.IsSonoma -or $os.IsVentura) { +if ($os.IsSonoma -or $os.IsVentura -or $os.IsSequoiaX64) { $miscellaneous = $installedSoftware.AddHeader("Miscellaneous") $miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion)) } From 3b67e908031c7988fde26b520a4ff3c3fc08504d Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Mon, 10 Mar 2025 12:54:46 +0530 Subject: [PATCH 03/11] Added parallels to required files --- .../scripts/build/install-common-utils.sh | 11 +++--- ...confirm-identified-developers-macos15.scpt | 34 +++++++++++++++++++ images/macos/templates/macOS-15.anka.pkr.hcl | 1 + 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt diff --git a/images/macos/scripts/build/install-common-utils.sh b/images/macos/scripts/build/install-common-utils.sh index bdab996d1b..1cbcac9544 100644 --- a/images/macos/scripts/build/install-common-utils.sh +++ b/images/macos/scripts/build/install-common-utils.sh @@ -35,13 +35,13 @@ for package in $cask_packages; do done # Load "Parallels International GmbH" -if is_SonomaX64 || is_VenturaX64; then +if is_SonomaX64 || is_VenturaX64 || is_SequoiaX64; then sudo kextload /Applications/Parallels\ Desktop.app/Contents/Library/Extensions/10.9/prl_hypervisor.kext || true fi -# Execute AppleScript to change security preferences for macOS12, macOS13 and macOS14 +# Execute AppleScript to change security preferences for macOS12, macOS13, macOS14 and macOS15 # System Preferences -> Security & Privacy -> General -> Unlock -> Allow -> Not now -if is_SonomaX64 || is_VenturaX64; then +if is_SonomaX64 || is_VenturaX64 || is_SequoiaX64; then for retry in {4..0}; do echo "Executing AppleScript to change security preferences. Retries left: $retry" { @@ -54,6 +54,9 @@ if is_SonomaX64 || is_VenturaX64; then if is_SonomaX64; then osascript $HOME/utils/confirm-identified-developers-macos14.scpt $USER_PASSWORD fi + if is_SequoiaX64; then + osascript $HOME/utils/confirm-identified-developers-macos15.scpt $USER_PASSWORD + fi } && break if [[ $retry -eq 0 ]]; then @@ -67,7 +70,7 @@ if is_SonomaX64 || is_VenturaX64; then fi # Validate "Parallels International GmbH" kext -if is_SonomaX64 || is_VenturaX64; then +if is_SonomaX64 || is_VenturaX64 || is_SequoiaX64; then echo "Closing System Settings window if it is still opened" killall "System Settings" || true diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt new file mode 100644 index 0000000000..e40875ffe3 --- /dev/null +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -0,0 +1,34 @@ +# This AppleScript clicks "Allow" for "System Software from developer "Parallels International GmbH" +# Steps: +# - Open System Settings -> Privacy & Security +# - Click 'Allow' for 'System Software from developer "Parallels International GmbH' +# - Enter password for runner + +on run argv + set userpassword to item 1 of argv + + tell application "System Settings" + activate + delay 5 + end tell + + tell application "System Events" + tell process "System Settings" + set frontmost to true + repeat until exists window 1 + delay 2 + end repeat + + tell splitter group 1 of group 1 of window 1 + select row 21 of outline 1 of scroll area 1 of group 1 + delay 5 + click UI Element 2 of group 5 of scroll area 1 of group 1 of group 2 + delay 5 + keystroke userpassword + delay 5 + keystroke return + delay 5 + end tell + end tell + end tell +end run diff --git a/images/macos/templates/macOS-15.anka.pkr.hcl b/images/macos/templates/macOS-15.anka.pkr.hcl index 618478dd7d..4d78f10b95 100644 --- a/images/macos/templates/macOS-15.anka.pkr.hcl +++ b/images/macos/templates/macOS-15.anka.pkr.hcl @@ -156,6 +156,7 @@ build { inline = [ "mv ${local.image_folder}/docs-gen ${local.image_folder}/software-report", "mkdir ~/utils", + "mv ${local.image_folder}/helpers/confirm-identified-developers-macos15.scpt ~/utils", "mv ${local.image_folder}/helpers/invoke-tests.sh ~/utils", "mv ${local.image_folder}/helpers/utils.sh ~/utils" ] From 66503efce1536d5ab1675f8f3c6efe82599c16ee Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Mon, 10 Mar 2025 15:27:14 +0530 Subject: [PATCH 04/11] change the script --- ...confirm-identified-developers-macos15.scpt | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index e40875ffe3..4b12668ee4 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -22,6 +22,9 @@ on run argv tell splitter group 1 of group 1 of window 1 select row 21 of outline 1 of scroll area 1 of group 1 delay 5 + repeat until exists group 5 of scroll area 1 of group 1 of group 2 + delay 2 + end repeat click UI Element 2 of group 5 of scroll area 1 of group 1 of group 2 delay 5 keystroke userpassword @@ -32,3 +35,37 @@ on run argv end tell end tell end run + +--- + +on run argv + set userpassword to item 1 of argv + + tell application "System Settings" + activate + delay 5 + end tell + + tell application "System Events" + tell process "System Settings" + set frontmost to true + repeat until exists window 1 + delay 2 + end repeat + + tell splitter group 1 of group 1 of window 1 + select row 21 of outline 1 of scroll area 1 of group 1 + delay 5 + repeat until exists group 5 of scroll area 1 of group 1 of group 2 + delay 2 + end repeat + click UI Element 2 of group 5 of scroll area 1 of group 1 of group 2 + delay 5 + keystroke userpassword + delay 5 + keystroke return + delay 5 + end tell + end tell + end tell +end run From 2a809bc564f7f0e2a7553e8e55ef8b3c517ca526 Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Mon, 10 Mar 2025 16:30:30 +0530 Subject: [PATCH 05/11] add parallel script --- ...confirm-identified-developers-macos15.scpt | 61 +++++-------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index 4b12668ee4..a511a03147 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -6,7 +6,8 @@ on run argv set userpassword to item 1 of argv - + + -- Open System Settings tell application "System Settings" activate delay 5 @@ -15,57 +16,25 @@ on run argv tell application "System Events" tell process "System Settings" set frontmost to true - repeat until exists window 1 - delay 2 - end repeat - - tell splitter group 1 of group 1 of window 1 - select row 21 of outline 1 of scroll area 1 of group 1 - delay 5 - repeat until exists group 5 of scroll area 1 of group 1 of group 2 - delay 2 - end repeat - click UI Element 2 of group 5 of scroll area 1 of group 1 of group 2 - delay 5 - keystroke userpassword - delay 5 - keystroke return - delay 5 - end tell - end tell - end tell -end run - ---- - -on run argv - set userpassword to item 1 of argv - - tell application "System Settings" - activate - delay 5 - end tell - tell application "System Events" - tell process "System Settings" - set frontmost to true - repeat until exists window 1 + -- Navigate to "Privacy & Security" + repeat until exists window "Privacy & Security" delay 2 end repeat - - tell splitter group 1 of group 1 of window 1 - select row 21 of outline 1 of scroll area 1 of group 1 - delay 5 - repeat until exists group 5 of scroll area 1 of group 1 of group 2 - delay 2 - end repeat - click UI Element 2 of group 5 of scroll area 1 of group 1 of group 2 + + -- Click the "Allow" button for Parallels International GmbH + try + click button "Allow" of scroll area 1 of window "Privacy & Security" delay 5 + + -- Enter password keystroke userpassword - delay 5 + delay 2 keystroke return - delay 5 - end tell + delay 3 + on error + display dialog "Failed to find the 'Allow' button. Please check UI changes." + end try end tell end tell end run From 210763c85866632d2fdc3bf75f3d550536510ab2 Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Mon, 10 Mar 2025 21:57:46 +0530 Subject: [PATCH 06/11] adding parallel code --- ...confirm-identified-developers-macos15.scpt | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index a511a03147..7a000f0bd8 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -5,36 +5,42 @@ # - Enter password for runner on run argv - set userpassword to item 1 of argv - + set userpassword to item 1 of argv -- Retrieve the user's password from the arguments + -- Open System Settings tell application "System Settings" activate - delay 5 + delay 2 end tell tell application "System Events" tell process "System Settings" set frontmost to true + -- Wait until the window appears + repeat until exists window 1 + delay 1 + end repeat - -- Navigate to "Privacy & Security" - repeat until exists window "Privacy & Security" + -- Navigate to "Privacy & Security" in the sidebar + tell splitter group 1 of window 1 + select row 20 of outline 1 of scroll area 1 delay 2 - end repeat - + end tell + -- Click the "Allow" button for Parallels International GmbH - try - click button "Allow" of scroll area 1 of window "Privacy & Security" - delay 5 - - -- Enter password - keystroke userpassword + tell window 1 + click button "Allow" of group 1 of scroll area 1 delay 2 - keystroke return - delay 3 - on error - display dialog "Failed to find the 'Allow' button. Please check UI changes." - end try + end tell + + -- Enter the administrator password if prompted + if exists sheet 1 of window 1 then + tell sheet 1 of window 1 + set value of text field 1 to userpassword + delay 1 + click button "OK" + end tell + end if end tell end tell end run From 82de3745f4b8ab603102e33b62cedf8f290def77 Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Tue, 11 Mar 2025 11:04:53 +0530 Subject: [PATCH 07/11] replace splitter with window --- .../scripts/helpers/confirm-identified-developers-macos15.scpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index 7a000f0bd8..0bd98d0c68 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -22,7 +22,7 @@ on run argv end repeat -- Navigate to "Privacy & Security" in the sidebar - tell splitter group 1 of window 1 + tell window 1 select row 20 of outline 1 of scroll area 1 delay 2 end tell From 9da2518214c0db2cba9d0c61abfd0dc02c6e8b45 Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Tue, 11 Mar 2025 13:17:02 +0530 Subject: [PATCH 08/11] change the row number to 27 for privacy&security --- ...confirm-identified-developers-macos15.scpt | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index 0bd98d0c68..9f8e9dd528 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -44,3 +44,34 @@ on run argv end tell end tell end run + + + +on run argv + set userpassword to item 1 of argv + + tell application "System Settings" + activate + delay 5 + end tell + + tell application "System Events" + tell process "System Settings" + set frontmost to true + repeat until exists window 1 + delay 2 + end repeat + + tell splitter group 1 of group 1 of window 1 + select row 27 of outline 1 of scroll area 1 of group 1 + delay 5 + click UI Element 2 of group 4 of scroll area 1 of group 1 of group 2 + delay 5 + keystroke userpassword + delay 5 + keystroke return + delay 5 + end tell + end tell + end tell +end run From cdc64aad606b93333a6089b7a609d8d45aca8356 Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Tue, 11 Mar 2025 13:19:30 +0530 Subject: [PATCH 09/11] replaced code for privacy and security --- ...confirm-identified-developers-macos15.scpt | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index 9f8e9dd528..cdae6f136c 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -4,49 +4,6 @@ # - Click 'Allow' for 'System Software from developer "Parallels International GmbH' # - Enter password for runner -on run argv - set userpassword to item 1 of argv -- Retrieve the user's password from the arguments - - -- Open System Settings - tell application "System Settings" - activate - delay 2 - end tell - - tell application "System Events" - tell process "System Settings" - set frontmost to true - -- Wait until the window appears - repeat until exists window 1 - delay 1 - end repeat - - -- Navigate to "Privacy & Security" in the sidebar - tell window 1 - select row 20 of outline 1 of scroll area 1 - delay 2 - end tell - - -- Click the "Allow" button for Parallels International GmbH - tell window 1 - click button "Allow" of group 1 of scroll area 1 - delay 2 - end tell - - -- Enter the administrator password if prompted - if exists sheet 1 of window 1 then - tell sheet 1 of window 1 - set value of text field 1 to userpassword - delay 1 - click button "OK" - end tell - end if - end tell - end tell -end run - - - on run argv set userpassword to item 1 of argv From 778acf336a76091691b93c97fc75f3fc70ac328e Mon Sep 17 00:00:00 2001 From: Suresh kumar Date: Tue, 11 Mar 2025 15:39:43 +0530 Subject: [PATCH 10/11] replace UI element with 1 for row 27 --- ...confirm-identified-developers-macos15.scpt | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt index cdae6f136c..75073de983 100644 --- a/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt +++ b/images/macos/scripts/helpers/confirm-identified-developers-macos15.scpt @@ -5,30 +5,30 @@ # - Enter password for runner on run argv - set userpassword to item 1 of argv - - tell application "System Settings" - activate - delay 5 - end tell - - tell application "System Events" - tell process "System Settings" - set frontmost to true - repeat until exists window 1 - delay 2 - end repeat - - tell splitter group 1 of group 1 of window 1 - select row 27 of outline 1 of scroll area 1 of group 1 - delay 5 - click UI Element 2 of group 4 of scroll area 1 of group 1 of group 2 - delay 5 - keystroke userpassword - delay 5 - keystroke return - delay 5 - end tell - end tell - end tell + set userpassword to item 1 of argv + + tell application "System Settings" + activate + delay 5 + end tell + + tell application "System Events" + tell process "System Settings" + set frontmost to true + repeat until exists window 1 + delay 2 + end repeat + + tell splitter group 1 of group 1 of window 1 + select row 27 of outline 1 of scroll area 1 of group 1 + delay 5 + click UI element 1 of row 27 of outline 1 of scroll area 1 of group 1 + delay 5 + keystroke userpassword + delay 5 + keystroke return + delay 5 + end tell + end tell + end tell end run From 14cb685bd93c87aa3592842764814192fbba665f Mon Sep 17 00:00:00 2001 From: Erik Bershel <110455084+erik-bershel@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:22:49 +0100 Subject: [PATCH 11/11] Exclude TCL/TK from the SR on macOS-15 --- images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index 50cfb103b5..edeae3fead 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -176,6 +176,9 @@ $androidEnv.AddTable($(Build-AndroidEnvironmentTable)) if ($os.IsSonoma -or $os.IsVentura -or $os.IsSequoiaX64) { $miscellaneous = $installedSoftware.AddHeader("Miscellaneous") +} + +if ($os.IsSonoma -or $os.IsVentura) { $miscellaneous.AddToolVersion("Tcl/Tk", $(Get-TclTkVersion)) }