From fbbf6f2c52654325e7390a28fdb758d4080014cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 12 Mar 2021 16:20:55 +0100
Subject: [PATCH] On macOS, recommend the Homebrew package for running Dynare
 with Octave

---
 _includes/download-snapshot.html | 10 +++++-----
 _includes/download-stable.html   | 10 ++++++----
 resources/quick_start.md         | 34 +++++++++++++++++---------------
 3 files changed, 29 insertions(+), 25 deletions(-)

diff --git a/_includes/download-snapshot.html b/_includes/download-snapshot.html
index 688dec2..843d9dd 100644
--- a/_includes/download-snapshot.html
+++ b/_includes/download-snapshot.html
@@ -38,11 +38,11 @@
 
   <section class="dynare_section" id="snapshot_content2">
     <p>
-      Compatible with macOS 11 (Intel x86-64 processor only), MATLAB (R2014a
-      and later), and GNU Octave (4.4.1 installed
-      via <a href="https://octave-app.org">https://octave-app.org</a>). <b>NB</b>:
-      This package is unsigned; to run it, you need to right click on it and
-      select "Open" from the menu that pops up.
+      Compatible with macOS 11 (Intel x86-64 processor only) and MATLAB (R2014a
+      and later). <b>NB</b>: This package is unsigned; to run it, you need to
+      right click on it and select "Open" from the menu that pops up. No
+      snapshot is available for Octave (compilation from source is therefore
+      the only option).
     </p>
     <div class="download_table">
       {% include snapshot/download-snapshot-macos.html %}
diff --git a/_includes/download-stable.html b/_includes/download-stable.html
index 54a6739..e788895 100644
--- a/_includes/download-stable.html
+++ b/_includes/download-stable.html
@@ -37,10 +37,12 @@
   <section class="dynare_section" id="stable_content2">
     <p>
       Compatible with macOS (10.11 and later, earlier versions may work but
-      have not been tested), any 64-bit MATLAB, and GNU Octave (4.4.1 installed
-      via <a href="https://octave-app.org">https://octave-app.org</a>). <b>NB</b>:
-      This package is unsigned; to run it, you need to right click on it and
-      select "Open" from the menu that pops up.
+      have not been tested) and any 64-bit MATLAB. <b>NB</b>: This package is
+      unsigned; to run it, you need to right click on it and select "Open" from
+      the menu that pops up. If you want to use Dynare with Octave, do not
+      download this package, but rather use the one from Homebrew (see
+      the <a href="/resources/quick_start">quick start guide</a> for
+      instructions).
     </p>
     <p class="stable">
       <i class="fas fa-file-download"></i>
diff --git a/resources/quick_start.md b/resources/quick_start.md
index 8764a35..a6d9c13 100644
--- a/resources/quick_start.md
+++ b/resources/quick_start.md
@@ -104,12 +104,16 @@ If you don’t want to type this command every time you run Octave, you can put
 
 ## Using Dynare with Octave
 
- 1. Download and install the [latest Dynare package](/download#stable)
- 1. Download and install the [Octave app for macOS](https://octave-app.org). Be
-    careful to install the Octave version that is compatible with the Dynare
-    package you downloaded (as indicated on the Dynare download page)
- 1. Open Octave
- 1. Install some Octave add-ons (you only have to do it once)
+ 1. Install [Homebrew](https://brew.sh/)
+ 1. Install Dynare (and Octave) by typing the following in a terminal:
+    ```
+    brew install dynare
+    ```
+ 1. Open Octave by running the following in a terminal:
+    ```
+    octave --gui
+    ```
+ 1. Install some Octave add-ons from the Octave prompt (you only have to do it once)
     ```
     >> pkg install -forge io statistics control struct optim
     ```
@@ -148,26 +152,24 @@ You will only have to do this once as MATLAB will remember the setting the next
 
 ## Configuring Octave for Dynare on macOS
 
-If you have Dynare installed in the standard location type the following at the Octave command prompt, replacing `4.x.y` with your Dynare version:
-```
->> addpath /Applications/Dynare/4.x.y/matlab
-```
-For example, for Dynare {{ dynare_stable_version }} type:
+Type the following at the Octave command prompt:
 ```
->> addpath /Applications/Dynare/{{ dynare_stable_version }}/matlab
+>> addpath /usr/local/lib/dynare/matlab
 ```
 
 If you don’t want to type this command every time you run Octave, you can put
 it in a file called `.octaverc` in your home directory. This file will usually
-be called `/home/USERNAME/.octaverc`.
+be called `/Users/USERNAME/.octaverc`.
 
 ## Running and editing a Dynare example on macOS
 
- 1. Create a working directory that will hold your Dynare models. For example, `/home/USERNAME/work`.
- 1. Assuming that you are using Dynare {{ dynare_stable_version }}, copy the example model file `/Applications/Dynare/{{ dynare_stable_version }}/examples/example1.mod` to your working directory.
+ 1. Create a working directory that will hold your Dynare models. For example, `/Users/USERNAME/work`.
+ 1. Assuming that you are using Dynare {{ dynare_stable_version }}, copy the
+    example model file (either `/Applications/Dynare/{{ dynare_stable_version }}/examples/example1.mod` or `/usr/local/lib/dynare/examples/example1.mod`)
+    to your working directory.
  1. At the MATLAB or Octave command prompt, type the following to change the working directory:
     ```
-    >> cd /home/USERNAME/work
+    >> cd /Users/USERNAME/work
     ```
  1. Then type the following to run the example model file:
     ```
-- 
GitLab