From d60bc4dc6cfea1c6a6cbc8b6cd850852102da5fd Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Tue, 1 Dec 2015 17:33:27 +0000 Subject: [PATCH 01/14] hard-code /usr/share/fractorium for now --- Source/Fractorium/FractoriumEmberController.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp index 3e4d5b3..2f3a796 100644 --- a/Source/Fractorium/FractoriumEmberController.cpp +++ b/Source/Fractorium/FractoriumEmberController.cpp @@ -77,7 +77,14 @@ FractoriumEmberController::FractoriumEmberController(Fractorium* fractorium) m_PreviewRenderer = unique_ptr>(new EmberNs::Renderer()); //Initial combo change event to fill the palette table will be called automatically later. - if (!InitPaletteList(QCoreApplication::applicationDirPath().toLocal8Bit().data())) + + // TODO: Use QStandardPaths::DataLocation(), on linux one of the paths it + // returns should be "/usr/share/fractorium". It might have to be lowercased + // to make sure. + // + // http://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum + + if (!InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data())) throw "No palettes found, exiting."; BackgroundChanged(QColor(0, 0, 0));//Default to black. From fa5e6188ee275868f83527678af187c6a9647a1b Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Tue, 8 Dec 2015 11:49:19 +0000 Subject: [PATCH 02/14] squashed linux packaging commits Squashed commit of the following: commit e7261977580bfd08d08717c27732eb0b0f534bb2 Author: Gambhiro Date: Tue Dec 8 11:25:00 2015 +0000 build signed source package commit e652848b5e2d5dadfe1143282af204c13f8db418 Author: Gambhiro Date: Sun Dec 6 12:51:42 2015 +0000 linux packaging helper script commit 0c8bf8fcea9d62692c3e973a277c9014b9ef636b Author: Gambhiro Date: Sat Dec 5 21:38:37 2015 +0000 changelog commit d6c6815d3a59779e03119c0546f01c778188c918 Author: Gambhiro Date: Sat Dec 5 21:37:32 2015 +0000 now it's all qmake commit c37673a0d747134766bf9a1c3a898bbb9e416ed6 Author: Gambhiro Date: Sat Dec 5 08:46:27 2015 +0000 don't symlink in manual makefile commit 2593da2401cbb5b83ea8ec188a3450f52595186e Author: Gambhiro Date: Thu Dec 3 16:53:31 2015 +0000 postfix the version with an 'a' commit 03d4bdde55d428354d8a8ebe4827ff191162bcb1 Author: Gambhiro Date: Thu Dec 3 14:55:33 2015 +0000 use MAKE_OPTS env if set commit 6f7847c7c0e3eb32ec14e60736a4e2a7b5175a7c Author: Gambhiro Date: Thu Dec 3 14:36:21 2015 +0000 also install dark theme, build only amd64 for now commit e36d863b3101d4440816e08b9af704e89316d2e9 Author: Gambhiro Date: Wed Dec 2 18:01:42 2015 +0000 rules.dh7 commit 0e35f2ddf3b70eaf0040fcac6453d79c1a9571c8 Author: Gambhiro Date: Wed Dec 2 17:57:57 2015 +0000 deps commit 492b4ae7aa41374bf89cd8accf82d5ab0283a5f9 Author: Gambhiro Date: Wed Dec 2 10:40:04 2015 +0000 typo commit 6f0ed09a37849323f220d9aa50ac7c6bd3d411cb Author: Gambhiro Date: Wed Dec 2 10:37:55 2015 +0000 deps and version commit 82f2fd07b6703d5699926c297dee25a59111acb9 Author: Gambhiro Date: Wed Dec 2 09:50:00 2015 +0000 rev logic commit e5d33b62236e0b33653fa79d82274e157cb26bc2 Author: Gambhiro Date: Wed Dec 2 09:17:50 2015 +0000 create bin and libdir commit 84153860e6861a43ffc0f1073d462f2452f7e7c4 Author: Gambhiro Date: Wed Dec 2 08:48:23 2015 +0000 support prefix commit a5da29a15a15fc130ef1147ed495d86238e7a2f3 Author: Gambhiro Date: Wed Dec 2 08:45:52 2015 +0000 support DESTDIR commit da1be8b940fb3e51632ed4a35b6afe7defe17848 Author: Gambhiro Date: Tue Dec 1 21:06:01 2015 +0000 rev clean logic commit 738c78a93b159d27fc5c00361bb621cd864ac224 Author: Gambhiro Date: Tue Dec 1 20:59:34 2015 +0000 better make clean commit 2bf382412e573cd93c8a744b374196d5ea59c218 Author: Gambhiro Date: Tue Dec 1 20:44:48 2015 +0000 debian folder commit af420ef5d98744315fa526f0d072197b00b1af28 Author: Gambhiro Date: Tue Dec 1 18:18:51 2015 +0000 make clean ./Bin too commit 6d0243a10dac725251ea566ad717ff9b4fd0eea2 Author: Gambhiro Date: Tue Dec 1 17:56:31 2015 +0000 lowercase commit 41b4eaef6d9adbbb8ec00a9a15c20498f300924e Author: Gambhiro Date: Tue Dec 1 17:34:21 2015 +0000 configure and Makefile --- .bzrignore | 62 ++++++ .gitignore | 13 +- Builds/QtCreator/Ember/Ember.pro | 88 +++++---- .../QtCreator/EmberAnimate/EmberAnimate.pro | 29 +-- Builds/QtCreator/EmberCL/EmberCL.pro | 51 ++--- Builds/QtCreator/EmberGenome/EmberGenome.pro | 29 +-- Builds/QtCreator/EmberRender/EmberRender.pro | 29 +-- Builds/QtCreator/Fractorium/Fractorium.pro | 183 +++++++++--------- Builds/QtCreator/build_all.sh | 47 ----- .../{shared_settings.pri => defaults.pri} | 36 ++-- debian/changelog | 23 +++ debian/compat | 1 + debian/control | 20 ++ debian/copyright | 41 ++++ debian/docs | 1 + debian/rules | 32 +++ debian/source/format | 1 + main.pro | 5 + package-linux.sh | 66 +++++++ 19 files changed, 510 insertions(+), 247 deletions(-) create mode 100644 .bzrignore delete mode 100644 Builds/QtCreator/build_all.sh rename Builds/QtCreator/{shared_settings.pri => defaults.pri} (73%) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 main.pro create mode 100755 package-linux.sh diff --git a/.bzrignore b/.bzrignore new file mode 100644 index 0000000..39b5c6f --- /dev/null +++ b/.bzrignore @@ -0,0 +1,62 @@ +*.user +*.opensdf +*.sdf +*.suo +*.obj +*.tlog +*.def +*.dll +*.manifest +*.exp +*.lastbuildstate +*.lib +*.log +*.map +*.pdb +*.cache +*.res +*.ipch +*.bsc +*.exe +*.xml +*.ilk +*.wixobj +*.pch +*.txt +*.msi +*.idb +*.flam3 +*moc_* +*GeneratedFiles* +*.unsuccessfulbuild +*\Obj\* +Builds/MSVC/VS2010/Obj/x64/Debug/EmberCL_manifest.rc +Builds/MSVC/VS2010/Obj/EmberTester/x64/Debug/EmberTester_manifest.rc +Builds/MSVC/VS2010/Obj/EmberRender/x64/Debug/EmberRender_manifest.rc +Builds/MSVC/VS2010/Obj/EmberGenome/x64/Debug/EmberGenome_manifest.rc +Builds/MSVC/VS2010/Obj/EmberAnimate/x64/Debug/EmberAnimate_manifest.rc +Builds/MSVC/VS2010/Obj/Ember/x64/Debug/Ember_manifest.rc +Bin/x64/Release/testallvarsout.flame +Data/~$Bench.xlsx +*.ps1 +*.o +ui_*.h +qrc_*.cpp +Bin/x64/Release/Bench.flame +Builds/QtCreator/build* +.qmake.stash +*.gch +debug/ +release/ +Bin/ +Makefile +Builds/QtCreator/.obj/ +Builds/QtCreator/.moc/ +Builds/QtCreator/.qrc/ +Builds/QtCreator/.ui/ +Builds/QtCreator/Ember/Makefile +Builds/QtCreator/EmberAnimate/Makefile +Builds/QtCreator/EmberCL/Makefile +Builds/QtCreator/EmberGenome/Makefile +Builds/QtCreator/EmberRender/Makefile +Builds/QtCreator/Fractorium/Makefile diff --git a/.gitignore b/.gitignore index 03c1080..39b5c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -44,8 +44,19 @@ ui_*.h qrc_*.cpp Bin/x64/Release/Bench.flame Builds/QtCreator/build* -Makefile .qmake.stash *.gch debug/ release/ +Bin/ +Makefile +Builds/QtCreator/.obj/ +Builds/QtCreator/.moc/ +Builds/QtCreator/.qrc/ +Builds/QtCreator/.ui/ +Builds/QtCreator/Ember/Makefile +Builds/QtCreator/EmberAnimate/Makefile +Builds/QtCreator/EmberCL/Makefile +Builds/QtCreator/EmberGenome/Makefile +Builds/QtCreator/EmberRender/Makefile +Builds/QtCreator/Fractorium/Makefile diff --git a/Builds/QtCreator/Ember/Ember.pro b/Builds/QtCreator/Ember/Ember.pro index 188a059..ac070ab 100644 --- a/Builds/QtCreator/Ember/Ember.pro +++ b/Builds/QtCreator/Ember/Ember.pro @@ -4,56 +4,62 @@ CONFIG += shared CONFIG -= app_bundle CONFIG -= qt -include(../shared_settings.pri) +include(../defaults.pri) -!macx:PRECOMPILED_HEADER = ../../../Source/Ember/EmberPch.h +PRJ_DIR = $$SRC_DIR/Ember -QMAKE_CXXFLAGS += -D_USRDLL +target.path = $$LIB_INSTALL_DIR +INSTALLS += target + +!macx:PRECOMPILED_HEADER = $$PRJ_DIR/EmberPch.h + +QMAKE_CXXFLAGS += -D_USRDLL QMAKE_CXXFLAGS += -D_CONSOLE QMAKE_CXXFLAGS += -BUILDING_EMBER SOURCES += \ - ../../../Source/Ember/Affine2D.cpp \ - ../../../Source/Ember/DllMain.cpp \ - ../../../Source/Ember/Ember.cpp \ - ../../../Source/Ember/EmberPch.cpp \ - ../../../Source/Ember/Renderer.cpp \ - ../../../Source/Ember/RendererBase.cpp + $$PRJ_DIR/Affine2D.cpp \ + $$PRJ_DIR/DllMain.cpp \ + $$PRJ_DIR/Ember.cpp \ + $$PRJ_DIR/EmberPch.cpp \ + $$PRJ_DIR/RendererBase.cpp \ + $$PRJ_DIR/Renderer.cpp include(deployment.pri) qtcAddDeployment() HEADERS += \ - ../../../Source/Ember/Affine2D.h \ - ../../../Source/Ember/CarToRas.h \ - ../../../Source/Ember/DensityFilter.h \ - ../../../Source/Ember/Ember.h \ - ../../../Source/Ember/EmberDefines.h \ - ../../../Source/Ember/EmberPch.h \ - ../../../Source/Ember/EmberToXml.h \ - ../../../Source/Ember/Interpolate.h \ - ../../../Source/Ember/Isaac.h \ - ../../../Source/Ember/Iterator.h \ - ../../../Source/Ember/Palette.h \ - ../../../Source/Ember/PaletteList.h \ - ../../../Source/Ember/Point.h \ - ../../../Source/Ember/Renderer.h \ - ../../../Source/Ember/RendererBase.h \ - ../../../Source/Ember/SheepTools.h \ - ../../../Source/Ember/SpatialFilter.h \ - ../../../Source/Ember/TemporalFilter.h \ - ../../../Source/Ember/Timing.h \ - ../../../Source/Ember/Utils.h \ - ../../../Source/Ember/Variation.h \ - ../../../Source/Ember/VariationList.h \ - ../../../Source/Ember/Variations01.h \ - ../../../Source/Ember/Variations02.h \ - ../../../Source/Ember/Variations03.h \ - ../../../Source/Ember/Variations04.h \ - ../../../Source/Ember/Variations05.h \ - ../../../Source/Ember/Variations06.h \ - ../../../Source/Ember/VariationsDC.h \ - ../../../Source/Ember/Xform.h \ - ../../../Source/Ember/XmlToEmber.h \ - ../../../Source/Ember/EmberMotion.h + $$PRJ_DIR/Affine2D.h \ + $$PRJ_DIR/CarToRas.h \ + $$PRJ_DIR/Curves.h \ + $$PRJ_DIR/DensityFilter.h \ + $$PRJ_DIR/EmberDefines.h \ + $$PRJ_DIR/Ember.h \ + $$PRJ_DIR/EmberMotion.h \ + $$PRJ_DIR/EmberPch.h \ + $$PRJ_DIR/EmberToXml.h \ + $$PRJ_DIR/Interpolate.h \ + $$PRJ_DIR/Isaac.h \ + $$PRJ_DIR/Iterator.h \ + $$PRJ_DIR/Palette.h \ + $$PRJ_DIR/PaletteList.h \ + $$PRJ_DIR/Point.h \ + $$PRJ_DIR/RendererBase.h \ + $$PRJ_DIR/Renderer.h \ + $$PRJ_DIR/SheepTools.h \ + $$PRJ_DIR/SpatialFilter.h \ + $$PRJ_DIR/TemporalFilter.h \ + $$PRJ_DIR/Timing.h \ + $$PRJ_DIR/Utils.h \ + $$PRJ_DIR/Variation.h \ + $$PRJ_DIR/VariationList.h \ + $$PRJ_DIR/Variations01.h \ + $$PRJ_DIR/Variations02.h \ + $$PRJ_DIR/Variations03.h \ + $$PRJ_DIR/Variations04.h \ + $$PRJ_DIR/Variations05.h \ + $$PRJ_DIR/Variations06.h \ + $$PRJ_DIR/VariationsDC.h \ + $$PRJ_DIR/Xform.h \ + $$PRJ_DIR/XmlToEmber.h diff --git a/Builds/QtCreator/EmberAnimate/EmberAnimate.pro b/Builds/QtCreator/EmberAnimate/EmberAnimate.pro index 1e87165..687721b 100644 --- a/Builds/QtCreator/EmberAnimate/EmberAnimate.pro +++ b/Builds/QtCreator/EmberAnimate/EmberAnimate.pro @@ -3,26 +3,33 @@ CONFIG += console CONFIG -= app_bundle CONFIG -= qt -include(../shared_settings.pri) +TARGET = emberanimate + +include(../defaults.pri) + +PRJ_DIR = $$SRC_DIR/EmberAnimate + +target.path = $$BIN_INSTALL_DIR +INSTALLS += target LIBS += -L$$absolute_path($$DESTDIR) -lEmber LIBS += -L$$absolute_path($$DESTDIR) -lEmberCL -!macx:PRECOMPILED_HEADER = ../../../Source/EmberCommon/EmberCommonPch.h +!macx:PRECOMPILED_HEADER = $$SRC_COMMON_DIR/EmberCommonPch.h SOURCES += \ - ../../../Source/EmberAnimate/EmberAnimate.cpp \ - ../../../Source/EmberCommon/EmberCommonPch.cpp + $$PRJ_DIR/EmberAnimate.cpp \ + $$SRC_COMMON_DIR/EmberCommonPch.cpp include(deployment.pri) qtcAddDeployment() HEADERS += \ - ../../../Source/EmberAnimate/EmberAnimate.h \ - ../../../Source/EmberCommon/EmberCommon.h \ - ../../../Source/EmberCommon/EmberCommonPch.h \ - ../../../Source/EmberCommon/EmberOptions.h \ - ../../../Source/EmberCommon/JpegUtils.h \ - ../../../Source/EmberCommon/SimpleGlob.h \ - ../../../Source/EmberCommon/SimpleOpt.h + $$PRJ_DIR/EmberAnimate.h \ + $$SRC_COMMON_DIR/EmberCommon.h \ + $$SRC_COMMON_DIR/EmberCommonPch.h \ + $$SRC_COMMON_DIR/EmberOptions.h \ + $$SRC_COMMON_DIR/JpegUtils.h \ + $$SRC_COMMON_DIR/SimpleGlob.h \ + $$SRC_COMMON_DIR/SimpleOpt.h diff --git a/Builds/QtCreator/EmberCL/EmberCL.pro b/Builds/QtCreator/EmberCL/EmberCL.pro index 9083604..299dbb4 100644 --- a/Builds/QtCreator/EmberCL/EmberCL.pro +++ b/Builds/QtCreator/EmberCL/EmberCL.pro @@ -4,40 +4,45 @@ CONFIG += shared CONFIG -= app_bundle CONFIG -= qt -include(../shared_settings.pri) +include(../defaults.pri) + +PRJ_DIR = $$SRC_DIR/EmberCL + +target.path = $$LIB_INSTALL_DIR +INSTALLS += target LIBS += -L$$absolute_path($$DESTDIR) -lEmber -!macx:PRECOMPILED_HEADER = ../../../Source/EmberCL/EmberCLPch.h +!macx:PRECOMPILED_HEADER = $$PRJ_DIR/EmberCLPch.h -QMAKE_CXXFLAGS += -D_USRDLL +QMAKE_CXXFLAGS += -D_USRDLL QMAKE_CXXFLAGS += -D_CONSOLE QMAKE_CXXFLAGS += -BUILDING_EMBERCL SOURCES += \ - ../../../Source/EmberCL/DllMain.cpp \ - ../../../Source/EmberCL/DEOpenCLKernelCreator.cpp \ - ../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp \ - ../../../Source/EmberCL/FunctionMapper.cpp \ - ../../../Source/EmberCL/IterOpenCLKernelCreator.cpp \ - ../../../Source/EmberCL/OpenCLInfo.cpp \ - ../../../Source/EmberCL/OpenCLWrapper.cpp \ - ../../../Source/EmberCL/RendererCL.cpp \ - ../../../Source/EmberCL/RendererCLDevice.cpp + $$PRJ_DIR/DEOpenCLKernelCreator.cpp \ + $$PRJ_DIR/DllMain.cpp \ + $$PRJ_DIR/FinalAccumOpenCLKernelCreator.cpp \ + $$PRJ_DIR/FunctionMapper.cpp \ + $$PRJ_DIR/IterOpenCLKernelCreator.cpp \ + $$PRJ_DIR/OpenCLInfo.cpp \ + $$PRJ_DIR/OpenCLWrapper.cpp \ + $$PRJ_DIR/RendererCL.cpp \ + $$PRJ_DIR/RendererClDevice.cpp include(deployment.pri) qtcAddDeployment() HEADERS += \ - ../../../Source/EmberCL/DEOpenCLKernelCreator.h \ - ../../../Source/EmberCL/EmberCLFunctions.h \ - ../../../Source/EmberCL/EmberCLPch.h \ - ../../../Source/EmberCL/EmberCLStructs.h \ - ../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h \ - ../../../Source/EmberCL/FunctionMapper.h \ - ../../../Source/EmberCL/IterOpenCLKernelCreator.h \ - ../../../Source/EmberCL/OpenCLInfo.h \ - ../../../Source/EmberCL/OpenCLWrapper.h \ - ../../../Source/EmberCL/RendererCL.h \ - ../../../Source/EmberCL/RendererCLDevice.h + $$PRJ_DIR/DEOpenCLKernelCreator.h \ + $$PRJ_DIR/EmberCLFunctions.h \ + $$PRJ_DIR/EmberCLPch.h \ + $$PRJ_DIR/EmberCLStructs.h \ + $$PRJ_DIR/FinalAccumOpenCLKernelCreator.h \ + $$PRJ_DIR/FunctionMapper.h \ + $$PRJ_DIR/IterOpenCLKernelCreator.h \ + $$PRJ_DIR/OpenCLInfo.h \ + $$PRJ_DIR/OpenCLWrapper.h \ + $$PRJ_DIR/RendererClDevice.h \ + $$PRJ_DIR/RendererCL.h diff --git a/Builds/QtCreator/EmberGenome/EmberGenome.pro b/Builds/QtCreator/EmberGenome/EmberGenome.pro index 2433760..4851c16 100644 --- a/Builds/QtCreator/EmberGenome/EmberGenome.pro +++ b/Builds/QtCreator/EmberGenome/EmberGenome.pro @@ -3,26 +3,33 @@ CONFIG += console CONFIG -= app_bundle CONFIG -= qt -include(../shared_settings.pri) +TARGET = embergenome + +include(../defaults.pri) + +target.path = $$BIN_INSTALL_DIR +INSTALLS += target LIBS += -L$$absolute_path($$DESTDIR) -lEmber LIBS += -L$$absolute_path($$DESTDIR) -lEmberCL -!macx:PRECOMPILED_HEADER = ../../../Source/EmberCommon/EmberCommonPch.h +PRJ_DIR = $$SRC_DIR/EmberGenome + +!macx:PRECOMPILED_HEADER = $$SRC_COMMON_DIR/EmberCommonPch.h SOURCES += \ - ../../../Source/EmberGenome/EmberGenome.cpp \ - ../../../Source/EmberCommon/EmberCommonPch.cpp + $$PRJ_DIR/EmberGenome.cpp \ + $$SRC_COMMON_DIR/EmberCommonPch.cpp include(deployment.pri) qtcAddDeployment() HEADERS += \ - ../../../Source/EmberGenome/EmberGenome.h \ - ../../../Source/EmberCommon/EmberCommon.h \ - ../../../Source/EmberCommon/EmberCommonPch.h \ - ../../../Source/EmberCommon/EmberOptions.h \ - ../../../Source/EmberCommon/JpegUtils.h \ - ../../../Source/EmberCommon/SimpleGlob.h \ - ../../../Source/EmberCommon/SimpleOpt.h + $$PRJ_DIR/EmberGenome.h \ + $$SRC_COMMON_DIR/EmberCommon.h \ + $$SRC_COMMON_DIR/EmberCommonPch.h \ + $$SRC_COMMON_DIR/EmberOptions.h \ + $$SRC_COMMON_DIR/JpegUtils.h \ + $$SRC_COMMON_DIR/SimpleGlob.h \ + $$SRC_COMMON_DIR/SimpleOpt.h diff --git a/Builds/QtCreator/EmberRender/EmberRender.pro b/Builds/QtCreator/EmberRender/EmberRender.pro index f10a2fa..88526ae 100644 --- a/Builds/QtCreator/EmberRender/EmberRender.pro +++ b/Builds/QtCreator/EmberRender/EmberRender.pro @@ -3,26 +3,33 @@ CONFIG += console CONFIG -= app_bundle CONFIG -= qt -include(../shared_settings.pri) +TARGET = emberrender + +include(../defaults.pri) + +PRJ_DIR = $$SRC_DIR/EmberRender + +target.path = $$BIN_INSTALL_DIR +INSTALLS += target LIBS += -L$$absolute_path($$DESTDIR) -lEmber LIBS += -L$$absolute_path($$DESTDIR) -lEmberCL -!macx:PRECOMPILED_HEADER = ../../../Source/EmberCommon/EmberCommonPch.h +!macx:PRECOMPILED_HEADER = $$SRC_COMMON_DIR/EmberCommonPch.h SOURCES += \ - ../../../Source/EmberRender/EmberRender.cpp \ - ../../../Source/EmberCommon/EmberCommonPch.cpp + $$PRJ_DIR/EmberRender.cpp \ + $$SRC_COMMON_DIR/EmberCommonPch.cpp include(deployment.pri) qtcAddDeployment() HEADERS += \ - ../../../Source/EmberRender/EmberRender.h \ - ../../../Source/EmberCommon/EmberCommon.h \ - ../../../Source/EmberCommon/EmberCommonPch.h \ - ../../../Source/EmberCommon/EmberOptions.h \ - ../../../Source/EmberCommon/JpegUtils.h \ - ../../../Source/EmberCommon/SimpleGlob.h \ - ../../../Source/EmberCommon/SimpleOpt.h + $$PRJ_DIR/EmberRender.h \ + $$SRC_COMMON_DIR/EmberCommon.h \ + $$SRC_COMMON_DIR/EmberCommonPch.h \ + $$SRC_COMMON_DIR/EmberOptions.h \ + $$SRC_COMMON_DIR/JpegUtils.h \ + $$SRC_COMMON_DIR/SimpleGlob.h \ + $$SRC_COMMON_DIR/SimpleOpt.h diff --git a/Builds/QtCreator/Fractorium/Fractorium.pro b/Builds/QtCreator/Fractorium/Fractorium.pro index 26c61d9..ca98fea 100644 --- a/Builds/QtCreator/Fractorium/Fractorium.pro +++ b/Builds/QtCreator/Fractorium/Fractorium.pro @@ -1,108 +1,113 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-12-09T21:18:06 -# -#------------------------------------------------- - -QT += core gui opengl concurrent +TEMPLATE = app +QT += core gui opengl concurrent greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = Fractorium -TEMPLATE = app +TARGET = fractorium -include(../shared_settings.pri) +include(../defaults.pri) +PRJ_DIR = $$SRC_DIR/Fractorium + +target.path = $$BIN_INSTALL_DIR +INSTALLS += target + +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 LIBS += -L$$absolute_path($$DESTDIR) -lEmber LIBS += -L$$absolute_path($$DESTDIR) -lEmberCL -INCLUDEPATH += ../../../Source/Fractorium +INCLUDEPATH += $$PRJ_DIR -!macx:PRECOMPILED_HEADER = ../../../Source/Fractorium/FractoriumPch.h +!macx:PRECOMPILED_HEADER = $$PRJ_DIR/FractoriumPch.h SOURCES += \ - ../../../Source/Fractorium/AboutDialog.cpp \ - ../../../Source/Fractorium/CurvesGraphicsView.cpp \ - ../../../Source/Fractorium/DoubleSpinBox.cpp \ - ../../../Source/Fractorium/FinalRenderDialog.cpp \ - ../../../Source/Fractorium/FinalRenderEmberController.cpp \ - ../../../Source/Fractorium/Fractorium.cpp \ - ../../../Source/Fractorium/FractoriumEmberController.cpp \ - ../../../Source/Fractorium/FractoriumInfo.cpp \ - ../../../Source/Fractorium/FractoriumLibrary.cpp \ - ../../../Source/Fractorium/FractoriumMenus.cpp \ - ../../../Source/Fractorium/FractoriumPalette.cpp \ - ../../../Source/Fractorium/FractoriumParams.cpp \ - ../../../Source/Fractorium/FractoriumPch.cpp \ - ../../../Source/Fractorium/FractoriumRender.cpp \ - ../../../Source/Fractorium/FractoriumSettings.cpp \ - ../../../Source/Fractorium/FractoriumToolbar.cpp \ - ../../../Source/Fractorium/FractoriumXaos.cpp \ - ../../../Source/Fractorium/FractoriumXforms.cpp \ - ../../../Source/Fractorium/FractoriumXformsAffine.cpp \ - ../../../Source/Fractorium/FractoriumXformsColor.cpp \ - ../../../Source/Fractorium/FractoriumXformsSelect.cpp \ - ../../../Source/Fractorium/FractoriumXformsVariations.cpp \ - ../../../Source/Fractorium/GLEmberController.cpp \ - ../../../Source/Fractorium/GLWidget.cpp \ - ../../../Source/Fractorium/Main.cpp \ - ../../../Source/Fractorium/OptionsDialog.cpp \ - ../../../Source/Fractorium/VariationsDialog.cpp \ - ../../../Source/Fractorium/SpinBox.cpp \ - ../../../Source/Fractorium/csshighlighter.cpp \ - ../../../Source/Fractorium/qcssparser.cpp \ - ../../../Source/Fractorium/qcssscanner.cpp \ - ../../../Source/Fractorium/QssDialog.cpp \ - ../../../Source/Fractorium/QssTextEdit.cpp + $$PRJ_DIR/AboutDialog.cpp \ + $$PRJ_DIR/csshighlighter.cpp \ + $$PRJ_DIR/CurvesGraphicsView.cpp \ + $$PRJ_DIR/DoubleSpinBox.cpp \ + $$PRJ_DIR/FinalRenderDialog.cpp \ + $$PRJ_DIR/FinalRenderEmberController.cpp \ + $$PRJ_DIR/Fractorium.cpp \ + $$PRJ_DIR/FractoriumEmberController.cpp \ + $$PRJ_DIR/FractoriumInfo.cpp \ + $$PRJ_DIR/FractoriumLibrary.cpp \ + $$PRJ_DIR/FractoriumMenus.cpp \ + $$PRJ_DIR/FractoriumPalette.cpp \ + $$PRJ_DIR/FractoriumParams.cpp \ + $$PRJ_DIR/FractoriumPch.cpp \ + $$PRJ_DIR/FractoriumRender.cpp \ + $$PRJ_DIR/FractoriumSettings.cpp \ + $$PRJ_DIR/FractoriumToolbar.cpp \ + $$PRJ_DIR/FractoriumXaos.cpp \ + $$PRJ_DIR/FractoriumXformsAffine.cpp \ + $$PRJ_DIR/FractoriumXformsColor.cpp \ + $$PRJ_DIR/FractoriumXforms.cpp \ + $$PRJ_DIR/FractoriumXformsSelect.cpp \ + $$PRJ_DIR/FractoriumXformsVariations.cpp \ + $$PRJ_DIR/GLEmberController.cpp \ + $$PRJ_DIR/GLWidget.cpp \ + $$PRJ_DIR/Main.cpp \ + $$PRJ_DIR/OptionsDialog.cpp \ + $$PRJ_DIR/qcssparser.cpp \ + $$PRJ_DIR/qcssscanner.cpp \ + $$PRJ_DIR/QssDialog.cpp \ + $$PRJ_DIR/QssTextEdit.cpp \ + $$PRJ_DIR/SpinBox.cpp \ + $$PRJ_DIR/VariationsDialog.cpp -HEADERS += \ - ../../../Source/Fractorium/AboutDialog.h \ - ../../../Source/Fractorium/CurvesGraphicsView.h \ - ../../../Source/Fractorium/DoubleSpinBox.h \ - ../../../Source/Fractorium/EmberFile.h \ - ../../../Source/Fractorium/EmberTreeWidgetItem.h \ - ../../../Source/Fractorium/FinalRenderDialog.h \ - ../../../Source/Fractorium/FinalRenderEmberController.h \ - ../../../Source/Fractorium/Fractorium.h \ - ../../../Source/Fractorium/FractoriumEmberController.h \ - ../../../Source/Fractorium/FractoriumPch.h \ - ../../../Source/Fractorium/FractoriumSettings.h \ - ../../../Source/Fractorium/GLEmberController.h \ - ../../../Source/Fractorium/GLWidget.h \ - ../../../Source/Fractorium/OptionsDialog.h \ - ../../../Source/Fractorium/resource.h \ - ../../../Source/Fractorium/SpinBox.h \ - ../../../Source/Fractorium/StealthComboBox.h \ - ../../../Source/Fractorium/TableWidget.h \ - ../../../Source/Fractorium/TwoButtonComboWidget.h \ - ../../../Source/Fractorium/VariationTreeWidgetItem.h \ - ../../../Source/EmberCommon/EmberCommon.h \ - ../../../Source/EmberCommon/JpegUtils.h \ - ../../../Source/EmberCommon/EmberCommonPch.h \ - ../../../Source/Fractorium/FractoriumCommon.h \ - ../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h \ - ../../../Source/Fractorium/PaletteTableWidgetItem.h \ - ../../../Source/Fractorium/VariationsDialog.h \ - ../../../Source/Fractorium/csshighlighter.h \ - ../../../Source/Fractorium/qcssparser.h \ - ../../../Source/Fractorium/qcssscanner.h \ - ../../../Source/Fractorium/qfunctions.h \ - ../../../Source/Fractorium/QssDialog.h \ - ../../../Source/Fractorium/QssTextEdit.h +HEADERS += \ + $$SRC_COMMON_DIR/EmberCommon.h \ + $$SRC_COMMON_DIR/EmberCommonPch.h \ + $$SRC_COMMON_DIR/JpegUtils.h \ + $$PRJ_DIR/AboutDialog.h \ + $$PRJ_DIR/csshighlighter.h \ + $$PRJ_DIR/CurvesGraphicsView.h \ + $$PRJ_DIR/DoubleSpinBox.h \ + $$PRJ_DIR/DoubleSpinBoxTableItemDelegate.h \ + $$PRJ_DIR/EmberFile.h \ + $$PRJ_DIR/EmberTreeWidgetItem.h \ + $$PRJ_DIR/FinalRenderDialog.h \ + $$PRJ_DIR/FinalRenderEmberController.h \ + $$PRJ_DIR/FractoriumCommon.h \ + $$PRJ_DIR/FractoriumEmberController.h \ + $$PRJ_DIR/Fractorium.h \ + $$PRJ_DIR/FractoriumPch.h \ + $$PRJ_DIR/FractoriumSettings.h \ + $$PRJ_DIR/GLEmberController.h \ + $$PRJ_DIR/GLWidget.h \ + $$PRJ_DIR/OptionsDialog.h \ + $$PRJ_DIR/PaletteTableWidgetItem.h \ + $$PRJ_DIR/qcssparser.h \ + $$PRJ_DIR/qcssscanner.h \ + $$PRJ_DIR/qfunctions.h \ + $$PRJ_DIR/QssDialog.h \ + $$PRJ_DIR/QssTextEdit.h \ + $$PRJ_DIR/resource.h \ + $$PRJ_DIR/SpinBox.h \ + $$PRJ_DIR/StealthComboBox.h \ + $$PRJ_DIR/TableWidget.h \ + $$PRJ_DIR/TwoButtonComboWidget.h \ + $$PRJ_DIR/VariationsDialog.h \ + $$PRJ_DIR/VariationTreeWidgetItem.h -FORMS += \ - ../../../Source/Fractorium/AboutDialog.ui \ - ../../../Source/Fractorium/FinalRenderDialog.ui \ - ../../../Source/Fractorium/Fractorium.ui \ - ../../../Source/Fractorium/VariationsDialog.ui \ - ../../../Source/Fractorium/OptionsDialog.ui \ - ../../../Source/Fractorium/QssDialog.ui +FORMS += \ + $$PRJ_DIR/AboutDialog.ui \ + $$PRJ_DIR/FinalRenderDialog.ui \ + $$PRJ_DIR/Fractorium.ui \ + $$PRJ_DIR/OptionsDialog.ui \ + $$PRJ_DIR/QssDialog.ui \ + $$PRJ_DIR/VariationsDialog.ui OTHER_FILES += \ - ../../../Source/Fractorium/Fractorium.aps \ - ../../../Source/Fractorium/Fractorium.rc + $$PRJ_DIR/Fractorium.aps \ + $$PRJ_DIR/Fractorium.rc RESOURCES += \ - ../../../Source/Fractorium/Fractorium.qrc + $$PRJ_DIR/Fractorium.qrc + diff --git a/Builds/QtCreator/build_all.sh b/Builds/QtCreator/build_all.sh deleted file mode 100644 index 11af667..0000000 --- a/Builds/QtCreator/build_all.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -REBUILD='' -NVIDIA='' -NATIVE='' -CONCURRENCY='-j4' -QMAKE=${QMAKE:/usr/bin/qmake} -RELEASE='CONFIG+=release CONFIG-=debug' - -while test $# -gt 0 -do - case "$1" in - --rebuild) REBUILD='1' - ;; - --nvidia) NVIDIA="CONFIG += nvidia" - ;; - --native) NATIVE="CONFIG += native" - ;; - --travis) CONCURRENCY="-j1" - ;; - --debug) RELEASE="CONFIG+=debug CONFIG-=release" - ;; - --*) echo "bad option $1"; exit 1 - ;; - *) echo "unrecognised argument $1"; exit 1 - ;; - esac - shift -done - -DIR=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd ) - -for PROJ in ${DIR}/{Ember,EmberCL,EmberGenome,EmberRender,EmberAnimate,Fractorium} -do - pushd $PROJ - if [ "x1" = "x$REBUILD" ]; then - make clean - fi - $QMAKE "$NVIDIA" "$NATIVE" $RELEASE - make $CONCURRENCY - if [ "x$?" != "x0" ]; then - echo "Build failed! Check output for errors." - exit 1 - fi - popd -done - diff --git a/Builds/QtCreator/shared_settings.pri b/Builds/QtCreator/defaults.pri similarity index 73% rename from Builds/QtCreator/shared_settings.pri rename to Builds/QtCreator/defaults.pri index e2493ed..be37d1e 100644 --- a/Builds/QtCreator/shared_settings.pri +++ b/Builds/QtCreator/defaults.pri @@ -1,15 +1,25 @@ -VERSION = 0.1.4.9 +VERSION = 0.9.9.2 + +# When this file is included: +# - $$PWD is ./Builds/QtCreator/ +# - $(PWD) is the project folder, e.g. ./Builds/QtCreator/Ember/ + +LIB_INSTALL_DIR = /usr/lib +BIN_INSTALL_DIR = /usr/bin +SHARE_INSTALL_DIR = /usr/share/fractorium CONFIG(release, debug|release) { - CONFIG += warn_off - DESTDIR = ../../../Bin/release + CONFIG += warn_off + DESTDIR = $$(PWD)/../../../Bin/release } CONFIG(debug, debug|release) { - DESTDIR = ../../../Bin/debug + DESTDIR = $$(PWD)/../../../Bin/debug } -QMAKE_POST_LINK += $$quote(cp --update ../../../Data/flam3-palettes.xml $${DESTDIR}$$escape_expand(\n\t)) +SRC_DIR = $$(PWD)/../../../Source +SRC_COMMON_DIR = $$(PWD)/../../../Source/EmberCommon +ASSETS_DIR = $$(PWD)/../../../Data macx { LIBS += -framework OpenGL @@ -19,7 +29,7 @@ macx { LIBS += -L/usr/local/lib INCLUDEPATH += /usr/local/include - INCLUDEPATH += ../../../Deps + INCLUDEPATH += $(PWD)/../Deps QMAKE_MAC_SDK = macosx10.9 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 @@ -43,10 +53,10 @@ native { QMAKE_CXXFLAGS += -march=k8 } -OBJECTS_DIR = $$DESTDIR/.obj -MOC_DIR = $$DESTDIR/.moc -RCC_DIR = $$DESTDIR/.qrc -UI_DIR = $$DESTDIR/.ui +OBJECTS_DIR = $$PWD/.obj +MOC_DIR = $$PWD/.moc +RCC_DIR = $$PWD/.qrc +UI_DIR = $$PWD/.ui LIBS += -L/usr/lib -ljpeg LIBS += -L/usr/lib -lpng @@ -61,9 +71,9 @@ INCLUDEPATH += /usr/include/GL INCLUDEPATH += /usr/include/glm INCLUDEPATH += /usr/include/tbb INCLUDEPATH += /usr/include/libxml2 -INCLUDEPATH += ../../../Source/Ember -INCLUDEPATH += ../../../Source/EmberCL -INCLUDEPATH += ../../../Source/EmberCommon +INCLUDEPATH += $$SRC_DIR/Ember +INCLUDEPATH += $$SRC_DIR/EmberCL +INCLUDEPATH += $$SRC_DIR/EmberCommon QMAKE_CXXFLAGS_RELEASE += -O2 QMAKE_CXXFLAGS_RELEASE += -DNDEBUG diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c9a8c5a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,23 @@ +fractorium (0.9.9.2b-0ubuntu1) vivid; urgency=low + + * now it's all qmake + + -- Gambhiro Bhikkhu Sat, 05 Dec 2015 20:04:20 +0000 + +fractorium (0.9.9.2a-0ubuntu1) vivid; urgency=low + + * also install dark theme, build only amd64 for now + + -- Gambhiro Bhikkhu Thu, 03 Dec 2015 10:40:53 +0000 + +fractorium (0.9.9.2-0ubuntu2) vivid; urgency=low + + * libc6-dev for i386 build + + -- Gambhiro Bhikkhu Thu, 03 Dec 2015 10:06:40 +0000 + +fractorium (0.9.9.2-0ubuntu1) vivid; urgency=low + + * Initial release + + -- Gambhiro Bhikkhu Tue, 01 Dec 2015 18:23:34 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..1b6741f --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: fractorium +Section: graphics +Priority: optional +Maintainer: Gambhiro Bhikkhu +Build-Depends: debhelper (>= 9), autotools-dev, g++ (>= 4.9), execstack, libgl1-mesa-dev, libgl-dev, libdbus-1-dev, libtbb-dev, libglm-dev, opencl-headers, libpng12-dev, libxml2-dev, libjpeg-dev, qtbase5-dev, qt5-default, qt5-qmake, libqt5opengl5-dev, nvidia-opencl-dev +Standards-Version: 3.9.5 +Homepage: http://mfeemster.deviantart.com/ +Vcs-Git: https://github.com/mfeemster/fractorium +Vcs-Browser: https://github.com/mfeemster/fractorium + +Package: fractorium +Architecture: amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A Qt-based fractal flame editor + A Qt-based fractal flame editor which uses a C++ re-write of the flam3 + algorithm named Ember and a GPU capable version named EmberCL which implements + a portion of the cuburn algorithm in OpenCL. + . + The interface is very similar to Apophysis, with most of the popular variations + implemented. \ No newline at end of file diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..b16d273 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,41 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: fractorium +Source: https://github.com/mfeemster/fractorium + +Files: * +Copyright: 2015 Matt Feemster +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +Files: debian/* +Copyright: 2015 Gambhiro Bhikkhu +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README.md diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ce15cce --- /dev/null +++ b/debian/rules @@ -0,0 +1,32 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +# main packaging script based on dh7 syntax +%: + dh $@ + +# debmake generated override targets +# This is example for Cmake (See http://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- \ +# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + + + + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/main.pro b/main.pro new file mode 100644 index 0000000..fae22cb --- /dev/null +++ b/main.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +CONFIG += ordered + +SUBDIRS += Builds/QtCreator/Ember Builds/QtCreator/EmberCL Builds/QtCreator/EmberAnimate Builds/QtCreator/EmberGenome Builds/QtCreator/EmberRender Builds/QtCreator/Fractorium + diff --git a/package-linux.sh b/package-linux.sh new file mode 100755 index 0000000..2324221 --- /dev/null +++ b/package-linux.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# version for the debian package +VERSION=0.9.9.2b +PROJECT=fractorium +PROJECT_ROOT=$PWD +PPA_DIR="$HOME/PPA/$PROJECT-$VERSION" +TAR_NAME="$PROJECT-$VERSION.tar.gz" + +if [ ! -d '.git' -o ! -f 'main.pro' ]; then + echo "Run `basename $0` from the project root." + exit 2 +fi + +tarversion=$(tar --version | head -1 | sed -e 's/tar (GNU tar) \+\([0-9\.]\+\)$/\1/; s/[^0-9]//g; s/^\(.{3}\).*$/\1/;') + +if [[ "$tarversion" -lt "128" ]]; then + echo "Tar >= 1.28 is required. Download the .deb from https://launchpad.net/ubuntu/+source/tar/ and install manually." + exit 2 +fi + +if [ ! -d "$PPA_DIR" ]; then + mkdir -p "$PPA_DIR" +fi + +# tar 1.28 required for --exclude-vcs-ignores + +# FIXME: somehow it didn't ignore the 'Bin' folder. + +tar --exclude='package-linux.sh' \ + --exclude='Bin' \ + --exclude-vcs \ + --exclude-vcs-ignores \ + --exclude-backups \ + -czf "$PPA_DIR/$TAR_NAME" . + +[ $? -ne 0 ] && echo "Tar command failed." && exit 2 + +# TODO: find the option to specify single binary, so the question can be skipped. + +cd "$PPA_DIR" &&\ + bzr dh-make $PROJECT $VERSION $TAR_NAME &&\ + cd fractorium/debian &&\ + rm *.ex *.EX README.Debian README.source &&\ + cd .. + +[ $? -ne 0 ] && echo "bzr dh-make command failed." && exit 2 + +bzr add . &&\ + bzr commit -m "Debian package $VERSION" + +[ $? -ne 0 ] && echo "bzr command failed." && exit 2 + +# Build a signed source package for Launchpad, it will build its own binary on +# the servers. + +bzr builddeb -- -S + +[ $? -ne 0 ] && echo "bzr builddeb for source package failed." && exit 2 + +# Optionally, build an unsigned binary package for local use. + +# bzr builddeb -- -b -us -uc +# +# [ $? -ne 0 ] && echo "bzr builddeb for source package failed." && exit 2 + From fd6e14d651ec01ec9e74963aaebfc225db1d9e55 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Wed, 9 Dec 2015 16:05:09 +0000 Subject: [PATCH 03/14] remove autotools from deps --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 1b6741f..9218849 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: fractorium Section: graphics Priority: optional Maintainer: Gambhiro Bhikkhu -Build-Depends: debhelper (>= 9), autotools-dev, g++ (>= 4.9), execstack, libgl1-mesa-dev, libgl-dev, libdbus-1-dev, libtbb-dev, libglm-dev, opencl-headers, libpng12-dev, libxml2-dev, libjpeg-dev, qtbase5-dev, qt5-default, qt5-qmake, libqt5opengl5-dev, nvidia-opencl-dev +Build-Depends: debhelper (>= 9), g++ (>= 4.9), libdbus-1-dev, libgl1-mesa-dev, libgl-dev, libglm-dev, libjpeg-dev, libpng12-dev, libtbb-dev, libxml2-dev, qt5-default, qt5-qmake, qtbase5-dev, libqt5opengl5-dev, opencl-headers, nvidia-opencl-dev Standards-Version: 3.9.5 Homepage: http://mfeemster.deviantart.com/ Vcs-Git: https://github.com/mfeemster/fractorium From 66aa8fa6a1149a322f54f906d49536bbbd18f3b4 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Wed, 9 Dec 2015 16:14:33 +0000 Subject: [PATCH 04/14] 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; } From c2d227b403137c3db16526a2b07a68663c3ee793 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Wed, 9 Dec 2015 18:08:21 +0000 Subject: [PATCH 05/14] look for the palettes in various places --- .../Fractorium/FractoriumEmberController.cpp | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp index 2f3a796..866f53c 100644 --- a/Source/Fractorium/FractoriumEmberController.cpp +++ b/Source/Fractorium/FractoriumEmberController.cpp @@ -78,14 +78,20 @@ FractoriumEmberController::FractoriumEmberController(Fractorium* fractorium) //Initial combo change event to fill the palette table will be called automatically later. - // TODO: Use QStandardPaths::DataLocation(), on linux one of the paths it - // returns should be "/usr/share/fractorium". It might have to be lowercased - // to make sure. - // - // http://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum + // Look for a palette in: + // - the folder where the binary is, QCoreApplication::applicationDirPath() + // - shared data folder, QStandardPaths::DataLocation() + // - /usr/local/share/fractorium + // - /usr/share/fractorium - if (!InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data())) - throw "No palettes found, exiting."; + // TODO: use QStandardPaths::DataLocation too. + + if ( ! (InitPaletteList(QCoreApplication::applicationDirPath().toLocal8Bit().data()) || + InitPaletteList(QString("/usr/local/share/fractorium").toLocal8Bit().data()) || + InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data())) ) + { + throw "No palettes found, exiting."; + } BackgroundChanged(QColor(0, 0, 0));//Default to black. ClearUndo(); From 0aaa7bb4906af755929f6124d86adc74e44225a3 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Wed, 9 Dec 2015 18:15:14 +0000 Subject: [PATCH 06/14] warn and exit if PPA folder already exists --- package-linux.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package-linux.sh b/package-linux.sh index 2324221..0c7cd5c 100755 --- a/package-linux.sh +++ b/package-linux.sh @@ -21,6 +21,11 @@ fi if [ ! -d "$PPA_DIR" ]; then mkdir -p "$PPA_DIR" +else + echo -n "PPA work folder already exists: $PPA_DIR +Move this folder aside or remove it. +" + exit 2 fi # tar 1.28 required for --exclude-vcs-ignores From 88724376da81f2f6a358b10e7107d2813219153a Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Wed, 9 Dec 2015 21:40:59 +0000 Subject: [PATCH 07/14] options for linux packaging helper --- package-linux.sh | 63 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/package-linux.sh b/package-linux.sh index 0c7cd5c..75aebb2 100755 --- a/package-linux.sh +++ b/package-linux.sh @@ -1,5 +1,22 @@ #!/bin/bash +USAGE="`basename $0` +Run this script from the project root. + +Without options, the default is to build a signed source package for uploading +to a Launchpad PPA. + +Options: + +-h --help + +-b --binary +-nb --nobinary +-s --source +-ns --nosource +--signed +--unsigned" + # version for the debian package VERSION=0.9.9.2b PROJECT=fractorium @@ -12,6 +29,25 @@ if [ ! -d '.git' -o ! -f 'main.pro' ]; then exit 2 fi +# Set defaults. +OPT_BUILD_BINARY=0 +OPT_BUILD_SOURCE=1 +OPT_SIGNED=1 + +while [ $# -gt 0 ]; do + case "$1" in + -b|--binary) OPT_BUILD_BINARY=1;; + -nb|--nobinary) OPT_BUILD_BINARY=0;; + -s|--source) OPT_BUILD_SOURCE=1;; + -ns|--nosource) OPT_BUILD_SOURCE=0;; + --signed) OPT_SIGNED=1;; + --unsigned) OPT_SIGNED=0;; + -h|--help) echo "$USAGE" + exit 0;; + esac + shift +done + tarversion=$(tar --version | head -1 | sed -e 's/tar (GNU tar) \+\([0-9\.]\+\)$/\1/; s/[^0-9]//g; s/^\(.{3}\).*$/\1/;') if [[ "$tarversion" -lt "128" ]]; then @@ -56,16 +92,31 @@ bzr add . &&\ [ $? -ne 0 ] && echo "bzr command failed." && exit 2 -# Build a signed source package for Launchpad, it will build its own binary on +# Build a source package. + +# Launchpad only needs a signed source package. It will build its own binary on # the servers. -bzr builddeb -- -S +if [ $OPT_BUILD_SOURCE -eq 1 ]; then + if [ $OPT_SIGNED -eq 1 ]; then + bzr builddeb -- -S + else + bzr builddeb -- -S -us -uc + fi +fi [ $? -ne 0 ] && echo "bzr builddeb for source package failed." && exit 2 -# Optionally, build an unsigned binary package for local use. +# Build an binary package. + +if [ $OPT_BUILD_BINARY -eq 1 ]; then + if [ $OPT_SIGNED -eq 1 ]; then + bzr builddeb -- -b + else + bzr builddeb -- -b -us -uc + fi +fi + +[ $? -ne 0 ] && echo "bzr builddeb for source package failed." && exit 2 -# bzr builddeb -- -b -us -uc -# -# [ $? -ne 0 ] && echo "bzr builddeb for source package failed." && exit 2 From 06d4c95975ad4c13d7b2e342238190a61982d176 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Thu, 10 Dec 2015 18:02:24 +0000 Subject: [PATCH 08/14] look harder for a palette --- Source/Fractorium/FractoriumEmberController.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp index 866f53c..7c903f1 100644 --- a/Source/Fractorium/FractoriumEmberController.cpp +++ b/Source/Fractorium/FractoriumEmberController.cpp @@ -78,18 +78,19 @@ FractoriumEmberController::FractoriumEmberController(Fractorium* fractorium) //Initial combo change event to fill the palette table will be called automatically later. - // Look for a palette in: - // - the folder where the binary is, QCoreApplication::applicationDirPath() - // - shared data folder, QStandardPaths::DataLocation() - // - /usr/local/share/fractorium - // - /usr/share/fractorium + // Look hard for a palette. - // TODO: use QStandardPaths::DataLocation too. + // TODO + // QStandardPaths::AppConfigLocation -- errors out, not a member. + // QStandardPaths::DataLocation -- how to parse this? It should include "/usr/share/fractorium" on Linux. - if ( ! (InitPaletteList(QCoreApplication::applicationDirPath().toLocal8Bit().data()) || + if ( ! (InitPaletteList(QDir::currentPath().toLocal8Bit().data()) || + InitPaletteList(QDir::homePath().toLocal8Bit().data()) || + InitPaletteList(QCoreApplication::applicationDirPath().toLocal8Bit().data()) || InitPaletteList(QString("/usr/local/share/fractorium").toLocal8Bit().data()) || InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data())) ) { + // TODO better error dialog throw "No palettes found, exiting."; } From 08428d155cf92a7404cc5d2d88d40caba7136040 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Thu, 10 Dec 2015 18:03:04 +0000 Subject: [PATCH 09/14] unix and macx scoping --- Builds/QtCreator/defaults.pri | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Builds/QtCreator/defaults.pri b/Builds/QtCreator/defaults.pri index 70bc0d9..c2b89cd 100644 --- a/Builds/QtCreator/defaults.pri +++ b/Builds/QtCreator/defaults.pri @@ -4,9 +4,13 @@ VERSION = 0.9.9.2 # - $$(PWD) is ./Builds/QtCreator/ # - $(PWD) is the project folder, e.g. ./Builds/QtCreator/Ember/ -LIB_INSTALL_DIR = /usr/lib -BIN_INSTALL_DIR = /usr/bin -SHARE_INSTALL_DIR = /usr/share/fractorium +# TODO: win32 install dirs? + +unix|macx { + LIB_INSTALL_DIR = /usr/lib + BIN_INSTALL_DIR = /usr/bin + SHARE_INSTALL_DIR = /usr/share/fractorium +} CONFIG(release, debug|release) { CONFIG += warn_off From c11b2b4fc242129d0ca43bda3c272c341b4ea326 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Thu, 10 Dec 2015 18:05:51 +0000 Subject: [PATCH 10/14] palette and theme install --- Builds/QtCreator/Fractorium/Fractorium.pro | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Builds/QtCreator/Fractorium/Fractorium.pro b/Builds/QtCreator/Fractorium/Fractorium.pro index 3d31594..f6a98c1 100644 --- a/Builds/QtCreator/Fractorium/Fractorium.pro +++ b/Builds/QtCreator/Fractorium/Fractorium.pro @@ -16,9 +16,15 @@ PRJ_DIR = $$SRC_DIR/Fractorium target.path = $$BIN_INSTALL_DIR INSTALLS += target -assets.path = $$SHARE_INSTALL_DIR -assets.files = $$ASSETS_DIR/flam3-palettes.xml $$ASSETS_DIR/dark.qss -INSTALLS += assets +# FIXME: flam3-palettes.xml does not install when installing from .deb, but `make install` works. + +palettes.path = $$SHARE_INSTALL_DIR +palettes.files = $$ASSETS_DIR/flam3-palettes.xml +INSTALLS += palettes + +themes.path = $$SHARE_INSTALL_DIR +themes.files = $$ASSETS_DIR/dark.qss +INSTALLS += themes macx:ICON = $$ASSETS_DIR/Fractorium.icns From fe6a949e036d948efc6551d9f61788148252d926 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Thu, 10 Dec 2015 18:16:46 +0000 Subject: [PATCH 11/14] better options --- package-linux.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/package-linux.sh b/package-linux.sh index 75aebb2..29e1f3d 100755 --- a/package-linux.sh +++ b/package-linux.sh @@ -10,10 +10,9 @@ Options: -h --help --b --binary --nb --nobinary --s --source --ns --nosource +--binary-only +--source-only +--source-and-binary --signed --unsigned" @@ -36,12 +35,19 @@ OPT_SIGNED=1 while [ $# -gt 0 ]; do case "$1" in - -b|--binary) OPT_BUILD_BINARY=1;; - -nb|--nobinary) OPT_BUILD_BINARY=0;; - -s|--source) OPT_BUILD_SOURCE=1;; - -ns|--nosource) OPT_BUILD_SOURCE=0;; - --signed) OPT_SIGNED=1;; - --unsigned) OPT_SIGNED=0;; + --binary-only) OPT_BUILD_SOURCE=0 + OPT_BUILD_BINARY=1 + ;; + --source-only) OPT_BUILD_SOURCE=1 + OPT_BUILD_BINARY=0 + ;; + --source-and-binary) OPT_BUILD_SOURCE=1 + OPT_BUILD_BINARY=1 + ;; + --signed) OPT_SIGNED=1 + ;; + --unsigned) OPT_SIGNED=0 + ;; -h|--help) echo "$USAGE" exit 0;; esac From 5ab1d45bb2f9fa217111e1d62a0f1bc6353bc840 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Thu, 10 Dec 2015 18:17:02 +0000 Subject: [PATCH 12/14] readme instructions for building --- README.md | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a34251..d4cfe33 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,139 @@ -fractorium +Fractorium ========== -A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL. +A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm +named Ember and a GPU capable version named EmberCL which implements a portion +of the cuburn algorithm in OpenCL. + +# Download + +Windows: TODO + +Linux: TODO + +Mac OS/X (10.9+): TODO + +# Building from git + +## Windows + +TODO + +## Linux + +Install `git` and clone the repository: + +``` +sudo apt-get install git +git clone https://github.com/mfeemster/fractorium +``` + +Install the dependencies: + +``` +sudo apt-get install g++ libdbus-1-dev libgl1-mesa-dev libgl-dev libglm-dev libjpeg-dev libpng12-dev libtbb-dev libxml2-dev qt5-default qt5-qmake qtbase5-dev libqt5opengl5-dev opencl-headers nvidia-opencl-dev +``` + +Compile the binary: + +``` +cd fractorium +qmake +make +``` + +Run the binary from the release folder: + +``` +cd Bin/release +./fractorium +``` + +`sudo make install` will install the files directly. `sudo make uninstall` is +also available. + +You can also compile a `.deb` package to install locally. + +If you want the easiest way, use the `checkinstall` tool: + +``` +sudo apt-get install checkinstall +cd fractorium +sudo checkinstall make install +``` + +It is not difficult to compile a `.deb` package in the regular way though. A few +more tools will be necessary: + +``` +sudo apt-get install bzr bzr-builddeb dh-make debhelper +``` + +A helper script is available, use `package-linux.sh` in the project root. It +will create `~/PPA/fractorium-VERSION` as a work folder, by default it builds a +signed source package. + +For local use you probably want an unsigned binary package: + +``` +cd fractorium +./package-linux.sh --binary-only --unsigned +``` + +## Mac OS/X 10.9+ + +Install Xcode from the App Store. Install [homebrew](http://brew.sh/). + +Install `git` and clone the repository: + +``` +brew install git +git clone https://github.com/mfeemster/fractorium +``` + +Install the dependencies: + +``` +brew install qt5 tbb glm dbus jpeg libpng glib libxml2 +``` + +TODO: Confirm if `glib` and `libxml2` are actually needed. + +Add the Qt `bin` folder to `PATH` to make `qmake` available. In +`~/.bash_profile` or `~/.bashrc`: + +``` +PATH=/usr/local/opt/qt5/bin:$PATH +export PATH +``` + +Compile the binary: + +``` +cd fractorium +qmake CONFIG-=app_bundle +make +``` + +Run the binary from the release folder: + +``` +cd Bin/release +./fractorium +``` + +# OpenCL tips + +Nvidia, Ati, Intel. + +## Windows + +TODO + +## Linux + +TODO + +## Mac OS/X + +TODO From 599b0653e3b0c061d2fbb045a131f6af497c8e5a Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Thu, 10 Dec 2015 18:21:20 +0000 Subject: [PATCH 13/14] remove checkinstall suggestion --- README.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d4cfe33..c584a36 100644 --- a/README.md +++ b/README.md @@ -52,18 +52,8 @@ cd Bin/release `sudo make install` will install the files directly. `sudo make uninstall` is also available. -You can also compile a `.deb` package to install locally. - -If you want the easiest way, use the `checkinstall` tool: - -``` -sudo apt-get install checkinstall -cd fractorium -sudo checkinstall make install -``` - -It is not difficult to compile a `.deb` package in the regular way though. A few -more tools will be necessary: +You can also compile a `.deb` package to install locally. A few more tools will +be necessary: ``` sudo apt-get install bzr bzr-builddeb dh-make debhelper From b3cf5892c22fb9248a7508c2ae621c0a140e98d7 Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Fri, 11 Dec 2015 11:55:36 +0000 Subject: [PATCH 14/14] resurrect previous build scripts for reference --- archive/build_all.sh | 47 ++++++++++++++++++++++++++++++++++++ archive/build_osx_package.sh | 30 +++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100755 archive/build_all.sh create mode 100755 archive/build_osx_package.sh diff --git a/archive/build_all.sh b/archive/build_all.sh new file mode 100755 index 0000000..a6b701b --- /dev/null +++ b/archive/build_all.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +REBUILD='' +NVIDIA='' +NATIVE='' +CONCURRENCY='-j4' +QMAKE=${QMAKE:-/usr/bin/qmake} +RELEASE='CONFIG+=release CONFIG-=debug' + +while test $# -gt 0 +do + case "$1" in + --rebuild) REBUILD='1' + ;; + --nvidia) NVIDIA="CONFIG += nvidia" + ;; + --native) NATIVE="CONFIG += native" + ;; + --travis) CONCURRENCY="-j1" + ;; + --debug) RELEASE="CONFIG+=debug CONFIG-=release" + ;; + --*) echo "bad option $1"; exit 1 + ;; + *) echo "unrecognised argument $1"; exit 1 + ;; + esac + shift +done + +DIR=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd ) + +for PROJ in ${DIR}/{Ember,EmberCL,EmberGenome,EmberRender,EmberAnimate,Fractorium} +do + pushd $PROJ + if [ "x1" = "x$REBUILD" ]; then + make clean + fi + $QMAKE "$NVIDIA" "$NATIVE" $RELEASE + make $CONCURRENCY + if [ "x$?" != "x0" ]; then + echo "Build failed! Check output for errors." + exit 1 + fi + popd +done + diff --git a/archive/build_osx_package.sh b/archive/build_osx_package.sh new file mode 100755 index 0000000..751b4e2 --- /dev/null +++ b/archive/build_osx_package.sh @@ -0,0 +1,30 @@ +#!/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 +