Skip to content

Commit

Permalink
Merge pull request #104 from markummitchell/osx
Browse files Browse the repository at this point in the history
Osx
  • Loading branch information
markummitchell committed Mar 23, 2016
2 parents c854e69 + 08244f4 commit cd5ad93
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.DS_store
.qmake.stash
\#*
digit-exe-windows-*
engauge
engauge.log
engauge.pro.user
Makefile*
object_script.engauge
qrc_*
make.exe.stackdump
Engauge Digitizer
engauge.app
engauge.dmg
292 changes: 292 additions & 0 deletions dev/engauge.pro.user.mmitchell.osx

Large diffs are not rendered by default.

Binary file added dev/osx/engauge.dmg
Binary file not shown.
20 changes: 20 additions & 0 deletions dev/osx/macosx_fix_makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# NOT FOR USE WHEN BUILDING AN APPLICATION BUNDLE!
#
# This script is for building regular application with, or without, qtcreator
#
# This script is called, between the qmake and make steps, from 3 places
# 1) Outside of qtcreator manually
# 2) In qtcreator as step 2 in Debug build proces, with Command=/usr/bin/env, Args='bash macosx_fix_makefile', Working DIrectory='${builddir}/dev/osx"
# 3) In qtcreator as step 2 in Release build proces, with Command=/usr/bin/env, Args='bash macosx_fix_makefile', Working DIrectory='${builddir}/dev/osx"

FILE=Makefile
if [ ! -f $FILE ]; then
FILE=../../Makefile
fi

/usr/bin/sed -ibak '/^LIBS/s/-lQt5/-framework Qt/g' $FILE &&
/usr/bin/sed -ibak 's|-L/usr/local/Cellar|-F/usr/local/Cellar|g' $FILE &&
/usr/bin/sed -ibak 's|-F/usr/local/Cellar/fftw|-L/usr/local/Cellar/fftw|' $FILE &&
/usr/bin/sed -ibak 's|-F/usr/local/Cellar/log4cpp|-L/usr/local/Cellar/log4cpp|' $FILE

# Check out 'qmake -spec macx-xcode engauge.pro' at http://doc.qt.io/qt-5/qmake-platform-notes.html
7 changes: 7 additions & 0 deletions dev/osx/macosx_setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Building $HOME/Qt/5.5/clang_64 puts installation into /usr/local/Qt-5.5.1
# BUT THAT FAILED with include files not working
#export QT_DIR=/usr/local/Qt-5.5.1
#export PATH=$QT_DIR/bin:$PATH

export QT_DIR=/usr/local/Cellar/qt5/5.5.1_2
export PATH=$QT_DIR/bin:$PATH
Binary file modified doc/Engauge2SoftwareDevelopmentFile.odt
Binary file not shown.
29 changes: 25 additions & 4 deletions engauge.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
#
# More comments are in the INSTALL file, and below

TEMPLATE = app

CONFIG = qt warn_on thread debug
# Comment out this CONFIG line in OSX to produce an OSX application bundle
CONFIG = qt warn_on thread debug

_ENGAUGE_RELEASE = $$(ENGAUGE_RELEASE)
isEmpty(_ENGAUGE_RELEASE) {
Expand Down Expand Up @@ -546,11 +545,33 @@ SOURCES += \
src/util/Xml.cpp \
src/Zoom/ZoomLabels.cpp

TARGET = bin/engauge
macx-* {
CONFIG += app_bundle
QMAKE_CXXFLAGS += "-stdlib=libc++"
QMAKE_LFLAGS += "-stdlib=libc++"
QT += core gui help network printsupport widgets xml
INCLUDEPATH += \
/usr/local/Cellar/fftw/3.3.4_1/include \
/usr/local/Cellar/log4cpp/1.1.1/include \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtCore.framework/Versions/5/Headers \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtHelp.framework/Versions/5/Headers \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtNetwork.framework/Versions/5/Headers \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtPrintSupport.framework/Versions/5/Headers \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Versions/5/Headers \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtXml.framework/Versions/5/Headers
LIBS += -L/$$(HOME)/fftw-3.3.4/lib -L$$(HOME)/log4cpp/lib -framework CoreFoundation
}

linux-* {
TEMPLATE = app
TARGET = bin/engauge
QT += core gui network printsupport widgets xml help
}

win32-* {
TEMPLATE = app
TARGET = bin/engauge
QT += core gui network printsupport widgets xml help
CONFIG += windows
}

Expand Down
7 changes: 5 additions & 2 deletions src/main/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2246,15 +2246,18 @@ void MainWindow::settingsReadMainWindow (QSettings &settings)
m_actionStatusTemporary->setChecked (statusBarMode == STATUS_BAR_MODE_TEMPORARY);
m_actionStatusAlways->setChecked (statusBarMode == STATUS_BAR_MODE_ALWAYS);

// Checklist guide is docked or undocked. Default is undocked so user knows it can be undocked
// Checklist guide is docked or undocked. Default is docked so it does not get overlooked by the user (which
// can happen if it opens elsewhere). The user may not know it can be undocked, but at least can resize or
// hide it if he/she needs more room for the main window.
const bool DOCKED_EQUALS_NOT_FLOATING = false;
Qt::DockWidgetArea area = (Qt::DockWidgetArea) settings.value (SETTINGS_CHECKLIST_GUIDE_DOCK_AREA,
Qt::NoDockWidgetArea).toInt();

if (area == Qt::NoDockWidgetArea) {

addDockWidget (Qt::RightDockWidgetArea,
m_dockChecklistGuide); // Add on the right to prevent error message, then immediately make undocked
m_dockChecklistGuide->setFloating(false); // Undocked is too easy to miss so start docked
m_dockChecklistGuide->setFloating(DOCKED_EQUALS_NOT_FLOATING);
if (settings.contains (SETTINGS_CHECKLIST_GUIDE_DOCK_GEOMETRY)) {
m_dockChecklistGuide->restoreGeometry (settings.value (SETTINGS_CHECKLIST_GUIDE_DOCK_GEOMETRY).toByteArray());
}
Expand Down

0 comments on commit cd5ad93

Please sign in to comment.