From 98223ab6ef5082413615e68fb077ba9fcafae540 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Fri, 11 Dec 2020 11:43:39 +0000 Subject: [PATCH 1/6] snap add desktop plug and update command --- snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index b990f5365..63249d975 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -16,8 +16,8 @@ confinement: strict apps: meshlab: - command: desktop-launch $SNAP/AppRun - plugs: [home, x11, mir, opengl, removable-media] + command: bin/desktop-launch $SNAP/AppRun + plugs: [home, desktop, wayland, x11, opengl, removable-media] desktop: usr/share/applications/meshlab.desktop From c81f78ba928cf0d649f02c28d7a38956d8bccd8d Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Fri, 11 Dec 2020 13:20:10 +0000 Subject: [PATCH 2/6] fix stage-packages --- snapcraft.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 63249d975..51f53925f 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -69,15 +69,18 @@ parts: - libqhull-dev - patchelf - rsync + - libqt5opengl5-dev stage-packages: - lib3ds-1-3 - libgomp1 - libopenctm1 - libqhull7 - - libglew-dev - - libqt5opengl5-dev - - qtdeclarative5-dev - libqt5gui5 + - qtwayland5 + - libglu1-mesa + - libopengl0 + - libqt5opengl5 + - libqt5xml5 override-build: | sh scripts/Linux/1_build.sh sh scripts/Linux/resources/make_bundle.sh From 55e2dee96d460fcb3872ebca95bca0a5c3b31b5a Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sat, 12 Dec 2020 02:41:16 +0000 Subject: [PATCH 3/6] ignore GLX display errors --- src/common/GLExtensionsManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/GLExtensionsManager.cpp b/src/common/GLExtensionsManager.cpp index e9aa7134e..985260d56 100644 --- a/src/common/GLExtensionsManager.cpp +++ b/src/common/GLExtensionsManager.cpp @@ -61,7 +61,7 @@ void GLExtensionsManager::initializeGLextensions() if (!glewInitialized) { glewExperimental = GL_TRUE; GLenum err = glewInit(); - if (err != GLEW_OK) { + if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) { throw MLException(QString("GLEW initialization failed: %1\n") .arg((const char *)glewGetErrorString(err))); } From 60f6d484d3a24b8ab101f50b36e2b253493b869a Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Mon, 14 Dec 2020 14:28:49 +0000 Subject: [PATCH 4/6] snap: use kde-neon extension --- snapcraft.yaml | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 51f53925f..53e7ff4e1 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -16,41 +16,14 @@ confinement: strict apps: meshlab: - command: bin/desktop-launch $SNAP/AppRun - plugs: [home, desktop, wayland, x11, opengl, removable-media] + command: AppRun + extensions: [kde-neon] + plugs: [home, opengl, removable-media] desktop: usr/share/applications/meshlab.desktop parts: - desktop-qt5: - build-packages: - - build-essential - - qtbase5-dev - - dpkg-dev - make-parameters: - - FLAVOR=qt5 - plugin: make - source: https://github.com/ubuntu/snapcraft-desktop-helpers.git - source-subdir: qt - stage-packages: - - libxkbcommon0 - - ttf-ubuntu-font-family - - dmz-cursor-theme - - light-themes - - adwaita-icon-theme - - gnome-themes-standard - - shared-mime-info - - libqt5gui5 - - libqt5qml5 - - libgdk-pixbuf2.0-0 - - libqt5svg5 - - try: - - appmenu-qt5 - - locales-all - - xdg-user-dirs - - fcitx-frontend-qt5 meshlab: - after: [desktop-qt5] plugin: qmake qt-version: qt5 source: https://github.com/cnr-isti-vclab/meshlab.git From b42172833a11655ce7c9fc6f0f217af0a5db5bd9 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Tue, 15 Dec 2020 15:18:26 +0100 Subject: [PATCH 5/6] fix qmake build --- src/find_system_libs.pri | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/find_system_libs.pri b/src/find_system_libs.pri index 63967742f..c50b7a668 100644 --- a/src/find_system_libs.pri +++ b/src/find_system_libs.pri @@ -41,11 +41,6 @@ linux { exists(/usr/include/eigen3){ CONFIG += system_eigen3 } - - #glew - exists(/usr/include/GL/glew.h){ - CONFIG += system_glew - } } } From c2aa20003497649f8ade5ca694f0c8fbe8e495c8 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Tue, 15 Dec 2020 17:46:47 +0100 Subject: [PATCH 6/6] update noversion snap script --- .../Linux/resources/snap/snap_noversion.yaml | 42 ++++--------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/scripts/Linux/resources/snap/snap_noversion.yaml b/scripts/Linux/resources/snap/snap_noversion.yaml index 3c8b0d5d2..014fd9b3b 100644 --- a/scripts/Linux/resources/snap/snap_noversion.yaml +++ b/scripts/Linux/resources/snap/snap_noversion.yaml @@ -16,41 +16,14 @@ confinement: strict apps: meshlab: - command: desktop-launch $SNAP/AppRun - plugs: [home, x11, mir, opengl, removable-media] + command: AppRun + extensions: [kde-neon] + plugs: [home, opengl, removable-media] desktop: usr/share/applications/meshlab.desktop parts: - desktop-qt5: - build-packages: - - build-essential - - qtbase5-dev - - dpkg-dev - make-parameters: - - FLAVOR=qt5 - plugin: make - source: https://github.com/ubuntu/snapcraft-desktop-helpers.git - source-subdir: qt - stage-packages: - - libxkbcommon0 - - ttf-ubuntu-font-family - - dmz-cursor-theme - - light-themes - - adwaita-icon-theme - - gnome-themes-standard - - shared-mime-info - - libqt5gui5 - - libqt5qml5 - - libgdk-pixbuf2.0-0 - - libqt5svg5 - - try: - - appmenu-qt5 - - locales-all - - xdg-user-dirs - - fcitx-frontend-qt5 meshlab: - after: [desktop-qt5] plugin: qmake qt-version: qt5 source: https://github.com/cnr-isti-vclab/meshlab.git @@ -69,15 +42,18 @@ parts: - libqhull-dev - patchelf - rsync + - libqt5opengl5-dev stage-packages: - lib3ds-1-3 - libgomp1 - libopenctm1 - libqhull7 - - libglew-dev - - libqt5opengl5-dev - - qtdeclarative5-dev - libqt5gui5 + - qtwayland5 + - libglu1-mesa + - libopengl0 + - libqt5opengl5 + - libqt5xml5 override-build: | sh scripts/Linux/1_build.sh sh scripts/Linux/resources/make_bundle.sh