Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request : Flatpak option #58

Closed
P4prik4 opened this issue Mar 31, 2020 · 11 comments
Closed

Feature Request : Flatpak option #58

P4prik4 opened this issue Mar 31, 2020 · 11 comments

Comments

@P4prik4
Copy link

P4prik4 commented Mar 31, 2020

having difficulty with appimage atm.
using chromeos with crouton.
I tried blender's flatpak but it runs slow (cheap processor)
this would probably be my best bet for lightweight app to study 3d modelling.
being able to find this over at flathub.org would be awesome.
thanks

@huxingyi
Copy link
Owner

Hi @P4prik4 Thanks for the suggestion, flatpak looks interesting, I will do some research on it in the future. BTW, what's the issue with AppImage please?

@Calinou
Copy link
Contributor

Calinou commented Apr 1, 2020

BTW, what's the issue with AppImage please?

Some people prefer Flatpak for various reasons:

  • Flatpaks can be installed from a central repository such as Flathub using the included flatpak CLI.
  • Built-in support for delta updates to decrease the bandwidth required (easier to get working compared to AppImage).
  • Flatpaks are sandboxed, which results in better security.
  • Flatpaks are built on common "runtimes" rather than a moving target (AppImages are typically built on an old Ubuntu LTS version). This can be used to reduce individual Flatpak file sizes since common libraries are inclued in the runtime.

@huxingyi
Copy link
Owner

huxingyi commented Apr 1, 2020

@Calinou Thanks, looks like Flatpak is very promising, I am happy to ship Dust3D to Flatpak while keep AppImage in the release (Because it's very handy to use). Although I don't get a hand on this at the moment, if some one could help that would be very appreciated.

@jeteokeeffe
Copy link
Contributor

jeteokeeffe commented Apr 7, 2020

I'd like to help. I'm close to getting this working but I've run into an error trying to build the flatpak. Can someone explain the error.

Running (flatpak-builder --install-deps-from=flathub --install --force-clean flatpak-dir org.dust3d.dust3d.json)

g++ -c -pipe -std=c++11 -O3 -Wall -Wextra -D_REENTRANT -fPIC -DNDEBUG -DQT_MESSAGELOGCONTEXT -DPROJECT_DEFINED_APP_COMPANY="\"Dust3D\"" -DPROJECT_DEFINED_APP_NAME="\"Dust3D\"" -DPROJECT_DEFINED_APP_VER="\"1.0.0.33\"" -DPROJECT_DEFINED_APP_HUMAN_VER="\"1.0.0-rc.3\"" -DPROJECT_DEFINED_APP_HOMEPAGE_URL="\"https://dust3d.org/\"" -DPROJECT_DEFINED_APP_REPOSITORY_URL="\"https://github.com/huxingyi/dust3d\"" -DPROJECT_DEFINED_APP_ISSUES_URL="\"https://github.com/huxingyi/dust3d/issues\"" -DPROJECT_DEFINED_APP_REFERENCE_GUIDE_URL="\"https://docs.dust3d.org\"" -DPROJECT_DEFINED_APP_UPDATES_CHECKER_URL="\"https://dust3d.org/dust3d-updateinfo.xml\"" -DPROJECT_DEFINED_APP_PLATFORM="\"Linux\"" -DCONFIG_VERSION="\"2019-07-09\"" -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ithirdparty/QtAwesome/QtAwesome -Isrc -Ithirdparty/FastMassSpring/ClothApp -Ithirdparty/instant-meshes -Ithirdparty/instant-meshes/instant-meshes-dust3d/src -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/include -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/dset -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/pss -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/pcg32 -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/rply -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/half -Ithirdparty/bullet3/src -Ithirdparty/quickjs/quickjs-2019-07-09-dust3d -Ithirdparty/crc64 -Ithirdparty/miniz -Ithirdparty/fbx/src -Ithirdparty/simpleuv -Ithirdparty/simpleuv/thirdparty/libigl/include -Ithirdparty/simpleuv/thirdparty/eigen -Ithirdparty/simpleuv/thirdparty/squeezer -Ithirdparty/QtWaitingSpinner -Ithirdparty/json -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -isystem /usr/include/QtOpenGL -isystem /usr/include/QtWidgets -isystem /usr/include/QtGui -isystem /usr/include/QtNetwork -isystem /usr/include/QtCore -Imoc -I/usr/lib/mkspecs/linux-g++ -o obj/moc_clothsimulator.o moc/moc_clothsimulator.cpp
g++ -c -pipe -std=c++11 -O3 -Wall -Wextra -D_REENTRANT -fPIC -DNDEBUG -DQT_MESSAGELOGCONTEXT -DPROJECT_DEFINED_APP_COMPANY="\"Dust3D\"" -DPROJECT_DEFINED_APP_NAME="\"Dust3D\"" -DPROJECT_DEFINED_APP_VER="\"1.0.0.33\"" -DPROJECT_DEFINED_APP_HUMAN_VER="\"1.0.0-rc.3\"" -DPROJECT_DEFINED_APP_HOMEPAGE_URL="\"https://dust3d.org/\"" -DPROJECT_DEFINED_APP_REPOSITORY_URL="\"https://github.com/huxingyi/dust3d\"" -DPROJECT_DEFINED_APP_ISSUES_URL="\"https://github.com/huxingyi/dust3d/issues\"" -DPROJECT_DEFINED_APP_REFERENCE_GUIDE_URL="\"https://docs.dust3d.org\"" -DPROJECT_DEFINED_APP_UPDATES_CHECKER_URL="\"https://dust3d.org/dust3d-updateinfo.xml\"" -DPROJECT_DEFINED_APP_PLATFORM="\"Linux\"" -DCONFIG_VERSION="\"2019-07-09\"" -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ithirdparty/QtAwesome/QtAwesome -Isrc -Ithirdparty/FastMassSpring/ClothApp -Ithirdparty/instant-meshes -Ithirdparty/instant-meshes/instant-meshes-dust3d/src -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/include -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/dset -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/pss -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/pcg32 -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/rply -Ithirdparty/instant-meshes/instant-meshes-dust3d/ext/half -Ithirdparty/bullet3/src -Ithirdparty/quickjs/quickjs-2019-07-09-dust3d -Ithirdparty/crc64 -Ithirdparty/miniz -Ithirdparty/fbx/src -Ithirdparty/simpleuv -Ithirdparty/simpleuv/thirdparty/libigl/include -Ithirdparty/simpleuv/thirdparty/eigen -Ithirdparty/simpleuv/thirdparty/squeezer -Ithirdparty/QtWaitingSpinner -Ithirdparty/json -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -isystem /usr/include/QtOpenGL -isystem /usr/include/QtWidgets -isystem /usr/include/QtGui -isystem /usr/include/QtNetwork -isystem /usr/include/QtCore -Imoc -I/usr/lib/mkspecs/linux-g++ -o obj/moc_waitingspinnerwidget.o moc/moc_waitingspinnerwidget.cpp
g++ -Wl,-O1 -o dust3d obj/QtAwesome.o obj/QtAwesomeAnim.o obj/modelshaderprogram.o obj/modelmeshbinder.o obj/modelwidget.o obj/document.o obj/documentwindow.o obj/skeletongraphicswidget.o obj/parttreewidget.o obj/partwidget.o obj/aboutwidget.o obj/meshgenerator.o obj/util.o obj/turnaroundloader.o obj/snapshot.o obj/snapshotxml.o obj/ds3file.o obj/glbfile.o obj/theme.o obj/meshloader.o obj/texturegenerator.o obj/outcome.o obj/meshresultpostprocessor.o obj/logbrowser.o obj/logbrowserdialog.o obj/floatnumberwidget.o obj/exportpreviewwidget.o obj/ccdikresolver.o obj/skeletonikmover.o obj/spinnableawesomebutton.o obj/infolabel.o obj/graphicscontainerwidget.o obj/rigwidget.o obj/markiconcreator.o obj/bonemark.o obj/skeletonside.o obj/meshsplitter.o obj/rigger.o obj/rigtype.o obj/riggenerator.o obj/skinnedmeshcreator.o obj/jointnodetree.o obj/poser.o obj/posemeshcreator.o obj/posepreviewmanager.o obj/poseeditwidget.o obj/poselistwidget.o obj/posemanagewidget.o obj/posepreviewsgenerator.o obj/posewidget.o obj/preferenceswidget.o obj/motioneditwidget.o obj/motionmanagewidget.o obj/motionlistwidget.o obj/motionwidget.o obj/motionsgenerator.o obj/animationclipplayer.o obj/texturetype.o obj/imageforever.o obj/materialeditwidget.o obj/materiallistwidget.o obj/materialmanagewidget.o obj/materialpreviewsgenerator.o obj/materialwidget.o obj/material.o obj/fbxfile.o obj/motiontimelinewidget.o obj/interpolationtype.o obj/motionclipwidget.o obj/tabwidget.o obj/flowlayout.o obj/shortcuts.o obj/trianglesourcenoderesolve.o obj/uvunwrap.o obj/triangletangentresolve.o obj/animalposer.o obj/poserconstruct.o obj/skeletondocument.o obj/posedocument.o obj/combinemode.o obj/polycount.o obj/cutdocument.o obj/cutface.o obj/parttarget.o obj/partbase.o obj/cutfacewidget.o obj/cutfacelistwidget.o obj/preferences.o obj/scripteditwidget.o obj/scriptvariableswidget.o obj/scriptwidget.o obj/scriptrunner.o obj/variablesxml.o obj/updateschecker.o obj/updatescheckwidget.o obj/intnumberwidget.o obj/imagepreviewwidget.o obj/mousepicker.o obj/paintmode.o obj/ragdoll.o obj/proceduralanimation.o obj/boundingboxmesh.o obj/gridmeshbuilder.o obj/regionfiller.o obj/cyclefinder.o obj/shortestpath.o obj/meshwrapper.o obj/meshstitcher.o obj/strokemeshbuilder.o obj/meshcombiner.o obj/positionkey.o obj/strokemodifier.o obj/boxmesh.o obj/meshrecombiner.o obj/triangulatefaces.o obj/booleanmesh.o obj/imageskeletonextractor.o obj/contourtopartconverter.o obj/remesher.o obj/clothsimulator.o obj/componentlayer.o obj/isotropicremesh.o obj/clothforce.o obj/projectfacestonodes.o obj/simulateclothmeshes.o obj/ddsfile.o obj/main.o obj/MassSpringSolver.o obj/instant-meshes-api.o obj/btAlignedAllocator.o obj/btRigidBody.o obj/btCollisionObject.o obj/btVector3.o obj/btSerializer.o obj/btQuickprof.o obj/btCollisionShape.o obj/btCapsuleShape.o obj/btConvexShape.o obj/btConvexInternalShape.o obj/btGeneric6DofConstraint.o obj/btConeTwistConstraint.o obj/btTypedConstraint.o obj/btDefaultCollisionConfiguration.o obj/btDbvtBroadphase.o obj/btSequentialImpulseConstraintSolver.o obj/btDiscreteDynamicsWorld.o obj/btCollisionWorld.o obj/btConvexCast.o obj/btGjkConvexCast.o obj/btEmptyCollisionAlgorithm.o obj/btManifoldResult.o obj/btGjkPairDetector.o obj/btTriangleCallback.o obj/btCollisionAlgorithm.o obj/btPersistentManifold.o obj/btCollisionDispatcher.o obj/btDispatcher.o obj/btBvhTriangleMeshShape.o obj/btSubSimplexConvexCast.o obj/btVoronoiSimplexSolver.o obj/btSimulationIslandManager.o obj/btUnionFind.o obj/btOptimizedBvh.o obj/btTriangleMeshShape.o obj/btConvexConvexAlgorithm.o obj/btConcaveShape.o obj/btQuantizedBvh.o obj/btConvexPolyhedron.o obj/btRaycastCallback.o obj/btBoxBoxCollisionAlgorithm.o obj/btContinuousConvexCollision.o obj/btPolyhedralContactClipping.o obj/btCompoundCollisionAlgorithm.o obj/btOverlappingPairCache.o obj/btBoxBoxDetector.o obj/btPolyhedralConvexShape.o obj/btActivatingCollisionAlgorithm.o obj/btConvexPlaneCollisionAlgorithm.o obj/btSphereSphereCollisionAlgorithm.o obj/btConvexConcaveCollisionAlgorithm.o obj/btSphereTriangleCollisionAlgorithm.o obj/btCompoundCompoundCollisionAlgorithm.o obj/btDbvt.o obj/btGeometryUtil.o obj/btSdfCollisionShape.o obj/btConvexHullComputer.o obj/SphereTriangleDetector.o obj/btHashedSimplePairCache.o obj/btPoint2PointConstraint.o obj/btFixedConstraint.o obj/btGeneric6DofSpring2Constraint.o obj/btMiniSDF.o obj/btSphereShape.o obj/btGjkEpaPenetrationDepthSolver.o obj/btMinkowskiPenetrationDepthSolver.o obj/btGjkEpa2.o obj/btBoxShape.o obj/quickjs.o obj/cutils.o obj/libunicode.o obj/libregexp.o obj/crc64.o obj/miniz.o obj/fbxdocument.o obj/fbxnode.o obj/fbxproperty.o obj/fbxutil.o obj/uvunwrapper.o obj/parametrize.o obj/chartpacker.o obj/triangulate.o obj/meshdatatype.o obj/maxrects.o obj/waitingspinnerwidget.o obj/qrc_resources.o obj/qrc_QtAwesome.o obj/moc_QtAwesome.o obj/moc_QtAwesomeAnim.o obj/moc_modelwidget.o obj/moc_document.o obj/moc_documentwindow.o obj/moc_skeletongraphicswidget.o obj/moc_parttreewidget.o obj/moc_partwidget.o obj/moc_aboutwidget.o obj/moc_meshgenerator.o obj/moc_turnaroundloader.o obj/moc_ds3file.o obj/moc_glbfile.o obj/moc_texturegenerator.o obj/moc_meshresultpostprocessor.o obj/moc_logbrowser.o obj/moc_logbrowserdialog.o obj/moc_floatnumberwidget.o obj/moc_exportpreviewwidget.o obj/moc_skeletonikmover.o obj/moc_graphicscontainerwidget.o obj/moc_rigwidget.o obj/moc_riggenerator.o obj/moc_poser.o obj/moc_posemeshcreator.o obj/moc_posepreviewmanager.o obj/moc_poseeditwidget.o obj/moc_poselistwidget.o obj/moc_posemanagewidget.o obj/moc_posepreviewsgenerator.o obj/moc_posewidget.o obj/moc_preferenceswidget.o obj/moc_motioneditwidget.o obj/moc_motionmanagewidget.o obj/moc_motionlistwidget.o obj/moc_motionwidget.o obj/moc_motionsgenerator.o obj/moc_animationclipplayer.o obj/moc_materialeditwidget.o obj/moc_materiallistwidget.o obj/moc_materialmanagewidget.o obj/moc_materialpreviewsgenerator.o obj/moc_materialwidget.o obj/moc_fbxfile.o obj/moc_motiontimelinewidget.o obj/moc_motionclipwidget.o obj/moc_tabwidget.o obj/moc_animalposer.o obj/moc_skeletondocument.o obj/moc_posedocument.o obj/moc_cutdocument.o obj/moc_cutfacewidget.o obj/moc_cutfacelistwidget.o obj/moc_preferences.o obj/moc_scripteditwidget.o obj/moc_scriptvariableswidget.o obj/moc_scriptwidget.o obj/moc_scriptrunner.o obj/moc_updateschecker.o obj/moc_updatescheckwidget.o obj/moc_intnumberwidget.o obj/moc_imagepreviewwidget.o obj/moc_mousepicker.o obj/moc_ragdoll.o obj/moc_imageskeletonextractor.o obj/moc_contourtopartconverter.o obj/moc_remesher.o obj/moc_clothsimulator.o obj/moc_waitingspinnerwidget.o   -Lthirdparty/instant-meshes/build -linstant-meshes -Lthirdparty/instant-meshes/build/ext_build/tbb -ltbb_static -ldl -L/usr/local/lib -lgmp -lmpfr -lCGAL /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread   
/usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -linstant-meshes
/usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -ltbb_static
/usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lmpfr
/usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lCGAL
collect2: error: ld returned 1 exit status
make: *** [Makefile:1301: dust3d] Error 1
Error: module dust3d: Child process exited with code 2

Flatpak Manifest

{
    "app-id": "org.dust3d.dust3d",
    "runtime": "org.kde.Platform",
    "runtime-version": "5.14",
    "sdk": "org.kde.Sdk",
    "branch": "stable",
    "command": "dust3d",
    "finish-args": [
        "--share=ipc",
        "--socket=x11",
        "--socket=wayland"
    ],
    "modules": [
        {
            "name": "boost",
            "buildsystem": "simple",
            "build-commands": [
                "./bootstrap.sh --prefix=/app",
                "./b2 -j $FLATPAK_BUILDER_N_JOBS",
                "./b2 install"
            ],
            "cleanup": [ "/lib/libboost_*.a" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.bz2",
                    "sha256": "beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0"
                }
            ]
        },
        {
            "name": "mpfr",
            "buildsystem": "autotools",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://www.mpfr.org/mpfr-current/mpfr-4.0.2.tar.gz",
                    "sha256": "ae26cace63a498f07047a784cd3b0e4d010b44d2b193bab82af693de57a19a78"
                }
            ]
        },
        {
            "name": "gcal",
            "buildsystem": "cmake",
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/CGAL/cgal/archive/releases/CGAL-4.14.3.tar.gz",
                    "sha256": "05badca4025ec85012942533f5f1af6314ae10ce2f7effcc094b6844c4a54985"
                }
            ]
        },
        {
            "name": "dust3d",
            "buildsystem": "qmake",
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/huxingyi/dust3d.git",
                    "tag": "1.0.0-rc.3"
                }
            ]
        }
    ]
}

@huxingyi
Copy link
Owner

huxingyi commented Apr 7, 2020

Hi @jeteokeeffe thanks, the instant-meshes need to be built separately:

  - cd thirdparty/instant-meshes
  - mkdir build
  - cd build
  - cmake ../
  - make -j 4
  - cd ../../../

The tbb_static is a dependency of instant-meshes, have you checked .travis.yml?That's the build script to build AppImage.
I can see you already configured some modules, such as cgal (although there is a typo in the name), I am not sure where these modules will be installed, and you may need let the dust3d.pro known the header and lib paths. Maybe need to do some change to dust3d.pro

@jeteokeeffe
Copy link
Contributor

#60

I'm not 100% sure what permissions the application needs but if you have issues, let me know and I'm sure I can correct them.

You'll need to follow these steps to get your app on flathub (only the owner of the repo can do that).
https://github.com/flathub/flathub/wiki/App-Submission#how-to-submit-an-app

@huxingyi
Copy link
Owner

@jeteokeeffe Wow, that's great, thanks! Will read the link and your PR later.

@huxingyi
Copy link
Owner

huxingyi commented May 7, 2020

Hi @jeteokeeffe Do you know how to use a hash such as 31957c0 instead of a tag as the build target please? Your last fix is not in tag 1.0.0-rc.6, I am not sure how to include your changes into Flatpak Manifest file. Thanks.

@jeteokeeffe
Copy link
Contributor

I do, I believe it's already set in my fork. The reason for the delay is flatpak build is complaining about the icon. It's either not in the right place or not the proper size.When I get a chance, I'm going to spend some time on that.

@huxingyi
Copy link
Owner

huxingyi commented May 7, 2020

Thanks, no rush.

@huxingyi
Copy link
Owner

huxingyi commented Jun 8, 2020

Thanks everyone, especially @jeteokeeffe
Dust3D is on flathub now, https://flathub.org/apps/details/org.dust3d.dust3d

@huxingyi huxingyi closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants