Skip to content

Commit 2426e5e

Browse files
authored
Merge pull request #55 from ejortega/check_rosetta_status
Check if Rosetta installation is necessary
2 parents 9238bc6 + 1d22e65 commit 2426e5e

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Expect the installation process to last about one to two hours and download ~20
1818
### Preparations
1919
You first need to install [Docker®](https://www.docker.com/products/docker-desktop/) (make sure to choose "Apple Chip" instead of "Intel Chip"). You may find it useful to disable the option "Open Docker Dashboard when Docker Desktop starts".
2020

21-
Rossetta must be installed on your Mac. The installer will ask you to install it if it is not already installed.
21+
Rosetta must be installed on your Mac. The installer will ask you to install it if it is not already installed.
2222

2323
You will also need the Vivado installer file (the "Linux® Self Extracting Web Installer").
2424

@@ -93,7 +93,7 @@ This version of xvcd only supports the FT2232C chip. There are forks of this sof
9393
## License, copyright and trademark information
9494
The repository's contents are licensed under the Creative Commons Zero v1.0 Universal license.
9595

96-
Note that the scripts are configured such that you automatically agree to Xilinx' and 3rd party EULAs (which can be obtained by extracting the installer yourself) by running them. You also automatically agree to [Apple's software licence agreement](https://www.apple.com/legal/sla/) for Rosetta 2.
96+
Note that the scripts are configured such that you automatically agree to Xilinx' and 3rd party EULAs (which can be obtained by extracting the installer yourself) by running them. You also automatically agree to [Apple's software license agreement](https://www.apple.com/legal/sla/) for Rosetta 2.
9797

9898
If you are installing Vivado version 2021.1:
9999
- WebTalk data collection is enabled, and you automatically agree to the corresponding terms.

scripts/setup.sh

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,10 @@ f_echo "- Agreeing to Xilinx'/AMD's EULAs (which can be obtained by extracting t
2828
f_echo "- Enabling WebTalk data collection for version 2021.1 and agreeing to corresponding terms"
2929
f_echo "- Installation of Rosetta 2 and agreeing to Apple's corresponding software license agreement"
3030
f_echo "Proceed [Y/n]?"
31-
read rosetta_install
32-
case $rosetta_install in
31+
read user_consent
32+
case $user_consent in
3333
[yY]|[yY][eE]*)
34-
f_echo "Installing Rosetta..."
35-
if ! softwareupdate --install-rosetta --agree-to-license
36-
then
37-
f_echo "Error installing Rosetta."
38-
exit 1
39-
fi
34+
f_echo "Continuing setup..."
4035
;;
4136
[nN]|[nN][oO]*)
4237
f_echo "Aborting setup."
@@ -48,6 +43,22 @@ case $rosetta_install in
4843
;;
4944
esac
5045

46+
# Check if the Mac is Intel or Apple Silicon
47+
if [[ "$(uname -m)" == "x86_64" ]]; then
48+
f_echo "Mac is Intel-based. Rosetta installation is not required."
49+
else
50+
if arch -arch x86_64 uname -m > /dev/null 2>&1; then
51+
f_echo "Rosetta is already installed."
52+
else
53+
f_echo "Rosetta is not installed."
54+
f_echo "Proceeding with Rosetta installation..."
55+
if ! softwareupdate --install-rosetta --agree-to-license; then
56+
f_echo "Error installing Rosetta."
57+
exit 1
58+
fi
59+
fi
60+
fi
61+
5162
# Get Vivado installation file
5263
f_echo "You need to put the Vivado installation file into this folder if you have not done so already."
5364
installation_binary=""

0 commit comments

Comments
 (0)