summarylogtreecommitdiffstats
path: root/shaders_dir.patch
diff options
context:
space:
mode:
authorbartus2017-01-09 23:38:04 +0100
committerbartus2017-01-09 23:38:04 +0100
commita8db407c5eef8965b9c843e6df0c960d6055a250 (patch)
treeb2f002b5b2f77a7cd116f3f88eea0c7c3849cbbd /shaders_dir.patch
parent9e3e6c1858f99760315189f0940742b710dbeef4 (diff)
downloadaur-a8db407c5eef8965b9c843e6df0c960d6055a250.tar.gz
install meshlab to /usr instead of /opt
Diffstat (limited to 'shaders_dir.patch')
-rw-r--r--shaders_dir.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/shaders_dir.patch b/shaders_dir.patch
new file mode 100644
index 000000000000..432b15078c57
--- /dev/null
+++ b/shaders_dir.patch
@@ -0,0 +1,89 @@
+diff --git a/src/meshlabplugins/render_gdp/meshrender.cpp b/src/meshlabplugins/render_gdp/meshrender.cpp
+index 5841ce66..3e0cbe5e 100644
+--- a/src/meshlabplugins/render_gdp/meshrender.cpp
++++ meshlab/src/meshlabplugins/render_gdp/meshrender.cpp
+@@ -29,6 +29,9 @@
+ #include <QTextStream>
+ #include "../../meshlab/glarea.h"
+
++#include <common/pluginmanager.h>
++
++
+ using namespace std;
+ using namespace vcg;
+
+@@ -38,7 +41,7 @@ void MeshShaderRenderPlugin::initActionList() {
+ qaNone->setCheckable(false);
+ actionList << qaNone;*/
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins")
+ shadersDir.cdUp();
+diff --git a/src/meshlabplugins/render_gdp/shaderDialog.cpp b/src/meshlabplugins/render_gdp/shaderDialog.cpp
+index 13157579..1f14b7bf 100644
+--- a/src/meshlabplugins/render_gdp/shaderDialog.cpp
++++ meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp
+@@ -32,6 +32,8 @@
+ #include <QCheckBox>
+ #include <QPushButton>
+
++#include <common/pluginmanager.h>
++
+ #define DECFACTOR 100000.0f
+
+ using namespace vcg;
+@@ -317,7 +319,7 @@ void ShaderDialog::changeTexturePath(int i) {
+ void ShaderDialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/src/plugins_experimental/render_splatpyramid/dialog.cpp b/src/plugins_experimental/render_splatpyramid/dialog.cpp
+index 589ba482..f0225c40 100644
+--- a/src/plugins_experimental/render_splatpyramid/dialog.cpp
++++ meshlab/src/plugins_experimental/render_splatpyramid/dialog.cpp
+@@ -3,6 +3,8 @@
+ #include <QFileDialog>
+ #include <QMessageBox>
+
++#include <common/pluginmanager.h>
++
+
+ #define DECFACTOR 100000.0f
+
+@@ -123,7 +125,7 @@ void Dialog::changeTexturePath(int i) {
+ void Dialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc b/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc
+index a4915d10..d6325aa4 100644
+--- a/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc
++++ meshlab/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc
+@@ -18,6 +18,8 @@
+ #include <QTextStream>
+ #include <wrap/gl/trimesh.h>
+
++#include <common/pluginmanager.h>
++
+ //#include <QGLFramebufferObject>
+
+ //#include "GL/glut.h"
+@@ -85,7 +87,7 @@ void PyramidPointRendererPlugin::Init(QAction *, MeshDocument &md, RenderMode &,
+ objects[i].setRendererType( render_mode );
+
+ /// Sets the path to the meshlab's shaders directory
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = PluginManager::getBaseDirPath();
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins" )
+ shadersDir.cdUp();