-
-
Notifications
You must be signed in to change notification settings - Fork 27
Building on Mac
Part 1 documents the build and install of nedit-ng on a fairly unmodified non-developer's Macbook, running Mojave 10.14.6. Nov 2020.
Part 2 documents the same on a MacOS Catalina 10.15.7, which already has Xcode installed and multitudes of software and tools. Also Nov 2020.
Part 3 documents the same on the Catalina Mac upgraded to MacOS Big Sur 11.1, in Jan 2021. Also Big Sur 11.2, Feb 2021.
Download nedit-ng-master.zip
from the green button labelled "Code" at https://github.com/eteran/nedit-ng. Unzip into any convenient location. This creates nedit-ng-master
.
You will need the base set of Xcode command-line tools. To get these, in a Terminal shell type xcode-select --install
A basic check that they have installed ok is: make
and make --help
.
Next we install Homebrew. For background, see https://brew.sh/ and https://osxdaily.com/2018/03/07/how-install-homebrew-mac-os/ This is a very reputable repository of all sorts of Mac/Linux tools.
To install Homebrew, use:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
You may need your system administrator password. This will take a few minutes to download and build.
Type brew
to be sure you have it, and can find it in your search PATH. For good measure type brew update
to be sure it's up-to-date. My brew --version
was 2.5.8.
Next install cmake with brew install cmake
. Type cmake
, cmake --version
, to check all is good. My version was 3.19.0-rc2.
Now install bison with brew install bison
. The install may end with a suggested command to ensure that this bison (and not some older one you may already have) is found first in your search PATH. Example:
echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> /Users/myusername/.bash_profile
Issue that command in the Terminal, start a new Terminal tab with Cmd-T (to force a new shell to start and use the new PATH), and check all good with bison --version
. Mine was 3.7. You can check your PATH environment variable with printenv PATH
. These are the locations the bash or zsh shell searches for commands.
(Note, the Mac has an older version of Bison installed as standard, Bison 2.3 from 2005. This appears to work fine in the nedit-ng build, so you could skip the above brew install of Bison 3.7 if you wish).
Next install the Boost C++ library with brew install boost
. Again there may be an addition to your PATH suggested. brew info boost
said 1.74.0.
Next install the latest Qt5 library with brew install qt5
. There may be an addition to PATH suggested. brew info qt
said 5.15.1.
Now we have all the tools and libaries. Build and install nedit-ng with ..
cd nedit-ng-master
mkdir build
cd build
cmake ..
make // There may be a number of "deprecated" and "cast" warnings, these are ok
make install // Optional. Copies the binaries to /usr/local/bin
Copy the binaries nedit-ng
, nc-ng
, nedit-import
to where you would like them, perhaps $HOME/mybin
, or /usr/local/bin
. Make sure that location is in your PATH.
- Import your old nedit settings and macros with
nedit-import nedit.rc
- Set preferred font and size from the Nedit-ng Preferences menu.
- Set preferred colour schemes from the Nedit-ng Preferences menu.
All done !
The Catalina Mac had Xcode 12.1 already installed (latest for Catalina), and also the Xcode Command-Line tools.
Download the nedit-ng source as above, and unzip.
Cmake was already installed as a full Gui aplication from https://cmake.org/ We only need the command-line tools here. Add these to your path in $HOME/.bash_profile
with a line like:
PATH=/Applications/CMake.app/Contents/bin:$PATH:
This will put the tools in front of any older version that may already be on your PATH.
Install Homebrew as above.
Install Bison (optional), Boost, Qt5 as above with the brew
command.
Build nedit-ng as above.
Note, as per Issue 174 ( https://github.com/eteran/nedit-ng/issues/174 ) if the build fails, you may need to set some env vars before you run cmake. This is based on Boost and QT5 having been installed by Homebrew. Adjust the paths as needed.
export BOOST_ROOT=/usr/local/Cellar/boost/1.74.0/
export Qt5_DIR=/usr/local/Cellar/qt/5.15.1
The process is the same as Catalina above. Versions of tools/libs now (at 11.2):
brew 2.7.5
cmake 3.19.0-rc2
bison 3.7.3
boost 1.75.0
Qt 5.15.1
XCode 12.4
To do: Put the whole sequence as one list, just for reference. Also update the tools and libs a bit more thoroughly, check again all good.