diff --git a/.qmake.stash b/.qmake.stash new file mode 100644 index 0000000..cdb473b --- /dev/null +++ b/.qmake.stash @@ -0,0 +1,19 @@ +QMAKE_XCODE_DEVELOPER_PATH = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer +QMAKE_XCODE_VERSION = 7.2 +QMAKE_MAC_SDK.macosx.path = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk +QMAKE_MAC_SDK.macosx.platform_path = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform +QMAKE_MAC_SDK.macosx.version = 10.11 +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_CC = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_CXX = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_FIX_RPATH = \ + /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool \ + -id +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_AR = \ + /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar \ + cq +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_RANLIB = \ + /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib \ + -s +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_LINK = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ +QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_LINK_SHLIB = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ +QMAKE_MAC_SDK.macosx.platform_name = macosx diff --git a/AwesomeBump.pro b/AwesomeBump.pro new file mode 100644 index 0000000..d844dc1 --- /dev/null +++ b/AwesomeBump.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +CONFIG += ordered +SUBDIRS += Sources diff --git a/Sources/Sources.pro b/Sources/Sources.pro new file mode 100644 index 0000000..3bebb82 --- /dev/null +++ b/Sources/Sources.pro @@ -0,0 +1,160 @@ +TEMPLATE = app +CONFIG += c++11 +QT += opengl gui widgets + +isEmpty(TOP_DIR) { + ERROR("Run build process from the top directory") +} + +QTN=utils/QtnProperty +include($$QTN/Common.pri) +include($$QTN/PEG.pri) + + +PEG_SOURCES += properties/Filter3DDOF.pef \ + properties/Filter3DBloom.pef \ + properties/Filter3DLensFlares.pef \ + properties/Filter3DToneMapping.pef \ + properties/GLSLParsedFragShader.pef \ + properties/ImageProperties.pef \ + properties/Filters3D.pef + + +release_gl330 { + DEFINES += USE_OPENGL_330 + TARGET = AwesomeBumpGL330 +} else { + TARGET = AwesomeBump +} + +debug: DBG = -dgb +GL = -gl4 +release_gl330: GL = -gl3 + +win32: LIBS += Opengl32.lib + +SPEC=$$[QMAKE_SPEC]$$DBG$$GL +DESTDIR = $$TOP_DIR/workdir/$$SPEC/bin +OBJECTS_DIR = $$TOP_DIR/workdir/$$SPEC/obj +MOC_DIR = $$TOP_DIR/workdir/$$SPEC/moc +UI_DIR = $$TOP_DIR/workdir/$$SPEC/obj +RCC_DIR = $$TOP_DIR/workdir/$$SPEC/obj + +write_file("$$TOP_DIR/workdir/current", SPEC) + + +# It's now required to define the path for resource files +# at compile time +# To keep compatibility with older releases, the application +# continues to look for these resource files in its current +# directory's subfolders (Config/* and Core/*) when using +# qmake to compile +DEFINES += RESOURCE_BASE=\\\"./\\\" + +VPATH += ../shared +INCLUDEPATH += ../shared include utils utils/QtnProperty + +HEADERS = glwidget.h \ + mainwindow.h \ + CommonObjects.h \ + formimageprop.h \ + glimageeditor.h \ + camera.h \ + dialogheightcalculator.h \ + qopenglerrorcheck.h \ + utils/Mesh.hpp \ + utils/tinyobj/tiny_obj_loader.h \ + formsettingsfield.h \ + formsettingscontainer.h \ + utils/qglbuffers.h \ + dialoglogger.h \ + glwidgetbase.h \ + formbasemapconversionlevels.h \ + formmaterialindicesmanager.h \ + dialogshortcuts.h \ + allaboutdialog.h \ + formimagebase.h \ + dockwidget3dsettings.h \ + gpuinfo.h \ + properties/Dialog3DGeneralSettings.h \ + utils/glslshaderparser.h \ + utils/glslparsedshadercontainer.h \ + properties/propertyconstructor.h \ + properties/propertydelegateabfloatslider.h + +SOURCES = glwidget.cpp \ + main.cpp \ + mainwindow.cpp \ + formimageprop.cpp \ + glimageeditor.cpp \ + CommonObjects.cpp \ + camera.cpp \ + dialogheightcalculator.cpp \ + utils/Mesh.cpp \ + utils/tinyobj/tiny_obj_loader.cc \ + formsettingsfield.cpp \ + formsettingscontainer.cpp \ + utils/qglbuffers.cpp \ + dialoglogger.cpp \ + glwidgetbase.cpp \ + formbasemapconversionlevels.cpp \ + formmaterialindicesmanager.cpp \ + dialogshortcuts.cpp \ + allaboutdialog.cpp \ + formimagebase.cpp \ + dockwidget3dsettings.cpp \ + gpuinfo.cpp \ + properties/Dialog3DGeneralSettings.cpp \ + utils/glslshaderparser.cpp \ + utils/glslparsedshadercontainer.cpp \ + properties/propertydelegateabfloatslider.cpp + + +RESOURCES += content.qrc + +RC_FILE = icon.rc + +FORMS += \ + mainwindow.ui \ + formimageprop.ui \ + dialogheightcalculator.ui \ + formsettingsfield.ui \ + formsettingscontainer.ui \ + dialoglogger.ui \ + formbasemapconversionlevels.ui \ + formmaterialindicesmanager.ui \ + allaboutdialog.ui \ + dialogshortcuts.ui \ + dockwidget3dsettings.ui \ + properties/Dialog3DGeneralSettings.ui + +ICON = resources/icon.icns + +DISTFILES += \ + resources/quad.obj \ + properties/Filter3DDOF.pef \ + properties/Filter3DBloom.pef \ + properties/Filter3DLensFlares.pef \ + properties/Filter3DToneMapping.pef \ + properties/Filters3D.pef \ + properties/GLSLParsedFragShader.pef \ + properties/ImageProperties.pef + + +# install additional files into target destination +# (require "make install") +config.path = $$DESTDIR +config.files += $$TOP_DIR/Bin/Configs $$TOP_DIR/Bin/Core +INSTALLS += config + +exists("utils/QtnProperty/QtnProperty.pri") { + DEFINES += HAVE_QTNPROP + include("utils/QtnProperty/QtnProperty.pri") +} else { + error("QtnProperty not found. Did you forget to 'git submodule init/update'") +} + +exists("utils/quazip/quazip.pri") { + CONFIG += quazip_include_zip quazip_include_unzip + include("utils/quazip/quazip.pri") +} diff --git a/unixBuildScript.sh b/unixBuildScript.sh index 6e819cc..9aa9560 100755 --- a/unixBuildScript.sh +++ b/unixBuildScript.sh @@ -9,9 +9,14 @@ if [[ "$OSTYPE" == "darwin"* ]]; then fi # Add your QT path here -MY_QT_PATH=~/Qt/5.4/$tool/bin/ +MY_QT_PATH=~/Qt/5.5/$tool/bin/ export PATH=$MY_QT_PATH:$PATH -( cd Sources && qmake && make ) \ - && cp -r Sources/Build/Bin/AwesomeBump$exe ./Bin \ - && open ./Bin/AwesomeBump$exe +if [ ! -e "$MY_QT_PATH" ]; then + echo "Qt not found at $MY_QT_PATH" + exit 1 +fi + +qmake \ + && make \ + && cp -r Sources/Build/Bin/AwesomeBump$exe ./Bin