Skip to content

Commit

Permalink
Update macOS build instructions for x64 and Qwt 6
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgill86 committed Aug 25, 2021
1 parent b79e71d commit d3dca5e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore mac directory information
.DS_Store
46 changes: 42 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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
========================
Expand All @@ -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/<my user name>/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/<my user name>/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/<my user name>/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/<my user name>/qwt-6.2.0/src
QMAKE_LIBDIR += /Users/<my user name>/qwt-6.2.0/lib
- Build nernst:
cd nernst/src
qmake -config release
make
macdeployqt "Nernst Potential Simulator.app"
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Makefile*
*.o
*~
moc_*
.qmake.stash
qrc_resources.cpp
Nernst Potential Simulator
Nernst Potential Simulator.app
Expand Down
6 changes: 3 additions & 3 deletions src/nernst.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ 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

contains( MACTARGET, intel ) {
message( "Generating makefile for Intel Macs." )
DEFINES += BLR_USEMAC HAVE_SSE2
QMAKE_CFLAGS += -msse2
CONFIG += x86
CONFIG += x86_64
}

contains( MACTARGET, ppc ) {
Expand Down

0 comments on commit d3dca5e

Please sign in to comment.