From d3dca5eb20021ff85aceecba40d9025c5c30de70 Mon Sep 17 00:00:00 2001 From: Jeffrey Gill Date: Wed, 25 Aug 2021 14:27:13 -0400 Subject: [PATCH] Update macOS build instructions for x64 and Qwt 6 --- .gitignore | 2 ++ README | 46 ++++++++++++++++++++++++++++++++++++++++++---- src/.gitignore | 1 + src/nernst.pro | 6 +++--- 4 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4965680 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# ignore mac directory information +.DS_Store diff --git a/README b/README index 45f0e60..f654e18 100644 --- a/README +++ b/README @@ -10,10 +10,10 @@ Dependencies This project uses code developed by the Qt, Qwt, and SFMT projects. To build this program, you will need to install the development tools for -Qt 4 (version 4.3 or later, available from www.trolltech.com) and the Qwt -libraries (available from qwt.sourceforge.net). The SFMT libraries have -been modified and are included with the source code, but the project page -can be found at http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT ). +Qt 5 (https://www.qt.io/offline-installers) and the Qwt libraries (available +from qwt.sourceforge.net). The SFMT libraries have been modified and are +included with the source code, but the project page can be found at +http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT ). Compilation Instructions ======================== @@ -23,3 +23,41 @@ This program uses the standard Qt build process run from the src directory: qmake make +macOS Compilation Details +------------------------- + +Last updated: 2021-08-25 + +Install Qt 5: + + - Download a Qt 5.12 offline installer: + https://www.qt.io/offline-installers + - Install into home directory: + /Users//Qt5.12.11 + - Include prebuilt components for macOS and sources + - Update your PATH variable in your shell's configuration file (e.g., ~/.bashrc): + export PATH="/Users//Qt5.12.11/5.12.11/clang_64/bin:$PATH" + +Build qwt: + + - Download the qwt 6.2.0 source code with compressed extension tar.bz2: + https://sourceforge.net/projects/qwt/files/qwt/ + - Unpack the source code into your home directory: + /Users//qwt-6.2.0 + - Comment out the line `QWT_CONFIG += QwtSvg` in qwtconfig.pri (or else + `QT += svg` must be added to nernst.pro) + - Build qwt: + cd ~/qwt-6.2.0/src + qmake -config release + make staticlib + +Build nernst: + + - Make sure the paths for qwt are correct in nernst.pro for macOS: + INCLUDEPATH += /Users//qwt-6.2.0/src + QMAKE_LIBDIR += /Users//qwt-6.2.0/lib + - Build nernst: + cd nernst/src + qmake -config release + make + macdeployqt "Nernst Potential Simulator.app" diff --git a/src/.gitignore b/src/.gitignore index 74d1e52..dd9947b 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,6 +3,7 @@ Makefile* *.o *~ moc_* +.qmake.stash qrc_resources.cpp Nernst Potential Simulator Nernst Potential Simulator.app diff --git a/src/nernst.pro b/src/nernst.pro index d382c56..cd20dd5 100644 --- a/src/nernst.pro +++ b/src/nernst.pro @@ -35,8 +35,8 @@ unix:!macx { } macx { - INCLUDEPATH += /usr/local/qwt-5.1.1/include - QMAKE_LIBDIR += /usr/local/qwt-5.1.1/lib + INCLUDEPATH += /Users/gill/qwt-6.2.0/src + QMAKE_LIBDIR += /Users/gill/qwt-6.2.0/lib LIBS += -lqwt ICON = img/nernst.icns @@ -44,7 +44,7 @@ macx { message( "Generating makefile for Intel Macs." ) DEFINES += BLR_USEMAC HAVE_SSE2 QMAKE_CFLAGS += -msse2 - CONFIG += x86 + CONFIG += x86_64 } contains( MACTARGET, ppc ) {