From 66aa8fa6a1149a322f54f906d49536bbbd18f3b4 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Wed, 9 Dec 2015 16:14:33 +0000 Subject: [PATCH] successful Mac build on OSX 10.10 --- Builds/QtCreator/Fractorium/Fractorium.pro | 7 +++-- Builds/QtCreator/defaults.pri | 9 +++--- Builds/package/osx/build_osx_package.sh | 30 ------------------- {Builds/package/osx => Data}/Fractorium.icns | Bin Source/Ember/Isaac.h | 8 ++--- 5 files changed, 14 insertions(+), 40 deletions(-) delete mode 100755 Builds/package/osx/build_osx_package.sh rename {Builds/package/osx => Data}/Fractorium.icns (100%) diff --git a/Builds/QtCreator/Fractorium/Fractorium.pro b/Builds/QtCreator/Fractorium/Fractorium.pro index ca98fea..3d31594 100644 --- a/Builds/QtCreator/Fractorium/Fractorium.pro +++ b/Builds/QtCreator/Fractorium/Fractorium.pro @@ -7,6 +7,10 @@ TARGET = fractorium include(../defaults.pri) +# TODO: Figure out how to build the app bundle correctly. +# This will build a binary instead of an app bundle. +macx:CONFIG -= app_bundle + PRJ_DIR = $$SRC_DIR/Fractorium target.path = $$BIN_INSTALL_DIR @@ -16,8 +20,7 @@ assets.path = $$SHARE_INSTALL_DIR assets.files = $$ASSETS_DIR/flam3-palettes.xml $$ASSETS_DIR/dark.qss INSTALLS += assets -# FIXME: move to Data and install to $$SHARE_INSTALL_DIR ? -macx:ICON = ../../package/osx/Fractorium.icns +macx:ICON = $$ASSETS_DIR/Fractorium.icns LIBS += -L$$absolute_path($$DESTDIR) -lEmber LIBS += -L$$absolute_path($$DESTDIR) -lEmberCL diff --git a/Builds/QtCreator/defaults.pri b/Builds/QtCreator/defaults.pri index be37d1e..70bc0d9 100644 --- a/Builds/QtCreator/defaults.pri +++ b/Builds/QtCreator/defaults.pri @@ -1,7 +1,7 @@ VERSION = 0.9.9.2 # When this file is included: -# - $$PWD is ./Builds/QtCreator/ +# - $$(PWD) is ./Builds/QtCreator/ # - $(PWD) is the project folder, e.g. ./Builds/QtCreator/Ember/ LIB_INSTALL_DIR = /usr/lib @@ -29,11 +29,12 @@ macx { LIBS += -L/usr/local/lib INCLUDEPATH += /usr/local/include - INCLUDEPATH += $(PWD)/../Deps + INCLUDEPATH += $$(PWD)/../../../Deps - QMAKE_MAC_SDK = macosx10.9 + QMAKE_MAC_SDK = macosx10.11 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 - + + QMAKE_CXXFLAGS += -mmacosx-version-min=10.9 -arch x86_64 QMAKE_CXXFLAGS += -stdlib=libc++ } else { CONFIG += precompile_header diff --git a/Builds/package/osx/build_osx_package.sh b/Builds/package/osx/build_osx_package.sh deleted file mode 100755 index 751b4e2..0000000 --- a/Builds/package/osx/build_osx_package.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) - -FRACTORIUM_ROOT=$DIR/../../.. -PACKAGE=$FRACTORIUM_ROOT/release/Fractorium.app -export QMAKE=~/Qt/5.4.2-static/qtbase/bin/qmake - -# Uncomment to force rebuild of package every time -# Probably a good idea in future -rm -rf "$FRACTORIUM_ROOT/release" -$FRACTORIUM_ROOT/Builds/QtCreator/build_all.sh --rebuild - -cp $FRACTORIUM_ROOT/Data/flam3-palettes.xml $PACKAGE/Contents/MacOS/ - -export DYLD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$FRACTORIUM_ROOT/release - -cp /usr/lib/libxml2* $PACKAGE/Contents/libs -install_name_tool -id @executable_path/../libs/libxml2.2.dylib $PACKAGE/Contents/libs/libxml2.2.dylib -install_name_tool -change /usr/lib/libxml2.2.dylib @executable_path/../libs/libxml2.2.dylib $PACKAGE/Contents/MacOS/Fractorium - -dylibbundler -od -b -x $PACKAGE/Contents/MacOS/Fractorium -d $PACKAGE/Contents/libs - -for i in EmberAnimate EmberGenome EmberRender -do - cp $FRACTORIUM_ROOT/release/$i $PACKAGE/Contents/MacOS/ - dylibbundler -od -b -x $PACKAGE/Contents/MacOS/$i -d $PACKAGE/Contents/libs - install_name_tool -change /usr/lib/libxml2.2.dylib @executable_path/../libs/libxml2.2.dylib $PACKAGE/Contents/MacOS/$i -done - diff --git a/Builds/package/osx/Fractorium.icns b/Data/Fractorium.icns similarity index 100% rename from Builds/package/osx/Fractorium.icns rename to Data/Fractorium.icns diff --git a/Source/Ember/Isaac.h b/Source/Ember/Isaac.h index 708f700..39a841e 100644 --- a/Source/Ember/Isaac.h +++ b/Source/Ember/Isaac.h @@ -202,7 +202,7 @@ public: static inline floatType LockedFrand(floatType fMin, floatType fMax) { m_CS.Enter(); - floatType t = GlobalRand->Frand(fMin, fMax); + floatType t = GlobalRand->template Frand(fMin, fMax); m_CS.Leave(); return t; } @@ -230,7 +230,7 @@ public: static inline floatType LockedFrand01() { m_CS.Enter(); - floatType t = GlobalRand->Frand01(); + floatType t = GlobalRand->template Frand01(); m_CS.Leave(); return t; } @@ -258,7 +258,7 @@ public: static inline floatType LockedFrand11() { m_CS.Enter(); - floatType t = GlobalRand->Frand11(); + floatType t = GlobalRand->template Frand11(); m_CS.Leave(); return t; } @@ -281,7 +281,7 @@ public: static inline floatType LockedGoldenBit() { m_CS.Enter(); - floatType t = GlobalRand->GoldenBit(); + floatType t = GlobalRand->template GoldenBit(); m_CS.Leave(); return t; }