CMPUT 229 - Computer Organization and Architecture I

Setting up the RARS Simulator on a macOS machine


Check out this macOS Installation Instructions Video (YouTube) by Quinn Pham.

Method 1

This method requires that you have Homebrew installed in your system. Homebrew can be installed from this page.

  1. Download the getRARS.sh script
  2. A package named wget is used within the getRARS.sh script. You can install wget with the command:
    brew install wget (this may take some time)
  3. If you don't already have Java installed, you can install Java with brew too with the command:
    brew install temurin.
  4. Execute the script you downloaded with the command:
    chmod +x getRARS.sh; ./getRARS.sh (the script may require your password)
  5. To execute the simulator, use the command:
    rars

To uninstall and remove the RARS executable, use the command:
chmod +x $HOME/.229files/cleanup.sh; $HOME/.229files/cleanup.sh

Method 2
  1. To run the RARS simulator you must have Java (Java 1.8+) installed in your system. Java can be downloaded from this page.
  2. Download the rars.jar RARS simulator
  3. Download the rars executable script
  4. Make a hidden directory named .229files in your home directory to store the rars.jar file with the command:
    mkdir -p $HOME/.229files
  5. Move the rars.jar file to the .229files directory with the command:
    mv rars.jar $HOME/.229files/rars.jar
  6. Open the rars executable script in some text editor and edit the RARSPath variable to the path on your computer where the rars.jar file is located. The path should be:
    $HOME/.229files/rars.jar
  7. Move this rars executable to /usr/local/bin directory, using the command:
    sudo mv rars /usr/local/bin/rars (you may need to enter your password)
  8. Make the simulator executable using the command:
    sudo chmod +x /usr/local/bin/rars
  9. To execute the simulator, use the command:
    rars

To uninstall and remove the RARS executable download the cleanup.sh script, and then use this command:
chmod +x cleanup.sh; ./cleanup.sh