app-id: io.github.crealityofficial.CrealityPrint runtime: org.gnome.Platform runtime-version: "48" sdk: org.gnome.Sdk command: entrypoint separate-locales: true rename-icon: CrealityPrint finish-args: - --share=ipc - --socket=x11 - --socket=wayland - --share=network - --device=all - --filesystem=home - --filesystem=xdg-run/gvfs - --filesystem=/run/media - --filesystem=/media - --filesystem=/run/spnav.sock:ro - --filesystem=xdg-config/gtk-3.0 - --filesystem=xdg-config/gtk-4.0 - --filesystem=xdg-config/fontconfig:ro # Allow OrcaSlicer to talk to other instances - --talk-name=io.github.crealityofficial.CrealityPrint.InstanceCheck.* - --system-talk-name=org.freedesktop.UDisks2 - --env=SPNAV_SOCKET=/run/spnav.sock sdk-extensions: - org.freedesktop.Sdk.Extension.llvm18 build-options: append-path: /usr/lib/sdk/llvm18/bin prepend-ld-library-path: /usr/lib/sdk/llvm18/lib env: CFLAGS: "-O3 -DNDEBUG" CXXFLAGS: "-O3 -DNDEBUG" modules: # JPEG codec for the liveview - name: gst-plugins-good buildsystem: meson config-opts: - -Dauto_features=disabled - -Djpeg=enabled - -Ddoc=disabled - -Dexamples=disabled - -Dtests=disabled sources: - type: archive url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.22.8.tar.xz sha256: e305b9f07f52743ca481da0a4e0c76c35efd60adaf1b0694eb3bb021e2137e39 - name: glu config-opts: - --disable-static sources: - type: archive url: https://ftp.osuosl.org/pub/blfs/conglomeration/glu/glu-9.0.2.tar.xz sha256: 6e7280ff585c6a1d9dfcdf2fca489251634b3377bfc33c29e4002466a38d02d4 cleanup: - /include - /lib/*.a - /lib/*.la - /lib/pkgconfig - name: kde-extra-cmake-modules buildsystem: cmake-ninja sources: - type: git url: https://github.com/KDE/extra-cmake-modules tag: v5.249.0 cleanup: - / - name: libspnav sources: - type: archive url: https://github.com/FreeSpacenav/libspnav/releases/download/v1.2/libspnav-1.2.tar.gz sha256: 093747e7e03b232e08ff77f1ad7f48552c06ac5236316a5012db4269951c39db - name: libdeflate buildsystem: cmake-ninja sources: - type: archive url: https://github.com/ebiggers/libdeflate/releases/download/v1.19/libdeflate-1.19.tar.gz sha256: d9bb9bdd8cc5a8c1f7f6226fa0053dd72861e15f366e7ff7d0d191eac16d66f3 - name: liblerc buildsystem: cmake-ninja sources: - type: archive url: https://github.com/Esri/lerc/archive/refs/tags/v4.0.0.tar.gz sha256: 91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0 - name: libbz2 buildsystem: simple sources: - type: archive url: https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz sha256: ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 build-commands: - | make && make install PREFIX=/app - name: usrsctp buildsystem: cmake-ninja sources: - type: archive url: https://github.com/sctplab/usrsctp/archive/refs/tags/0.9.4.0.tar.gz sha256: e7b8f908d71dc69c9a2bf55d609e8fdbb2fa7cc647f8b23a837d36a05c59cd77 config-opts: - -Dsctp_werror=0 - name: libx264 buildsystem: simple sources: - type: git url: https://code.videolan.org/videolan/x264.git build-commands: - | ./configure --enable-static --prefix=/app make && make install - name: creality_wxwidgets buildsystem: simple build-commands: - | export CFLAGS="" export CXXFLAGS="" mkdir builddir && cd builddir cmake ../ -GNinja \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DwxBUILD_PRECOMP=ON \ -DwxBUILD_TOOLKIT=gtk3 \ -DwxBUILD_DEBUG_LEVEL=0 \ -DwxBUILD_SAMPLES=OFF \ -DwxBUILD_SHARED=ON \ -DwxUSE_MEDIACTRL=ON \ -DwxUSE_DETECT_SM=OFF \ -DwxUSE_UNICODE=ON \ -DwxUSE_PRIVATE_FONTS=ON \ -DwxUSE_OPENGL=ON \ -DwxUSE_WEBREQUEST=ON \ -DwxUSE_WEBVIEW=ON \ -DwxUSE_WEBVIEW_EDGE=OFF \ -DwxUSE_WEBVIEW_IE=OFF \ -DwxUSE_REGEX=builtin \ -DwxUSE_LIBSDL=OFF \ -DwxUSE_XTEST=OFF \ -DwxUSE_STC=OFF \ -DwxUSE_AUI=ON \ -DwxUSE_LIBPNG=sys \ -DwxUSE_ZLIB=sys \ -DwxUSE_LIBJPEG=sys \ -DwxUSE_LIBTIFF=OFF \ -DwxUSE_EXPAT=sys \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:STRING=/app \ -DCMAKE_PREFIX_PATH=/app \ -DCMAKE_BUILD_TYPE=Release cmake --build . --target install -j$FLATPAK_BUILDER_N_JOBS sources: - type: archive url: https://github.com/CrealityOfficial/Orca-deps-wxWidgets/archive/refs/tags/v1.0.0.tar.gz sha256: 74089054448d887c1b551ac98f4b46fa8960a5168df48aa77700c7a58071148c path: ../ - type: patch path: patches/0001-Enable-using-a-dark-theme-when-Gnome-dark-style-is-s.patch cleanup: - "*.la" - "*.a" - "*.cmake" - /include - /app/bin/* - name: creality_deps buildsystem: simple build-commands: # start build - | export CFLAGS="" export CXXFLAGS="" rm -rf deps/build && mkdir deps/build && cd deps/build cmake .. \ -GNinja \ -DENABLE_BREAKPAD=OFF \ -DDEP_WX_GTK3=ON \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DDEP_DOWNLOAD_DIR=/run/build/creality_deps/external-packages \ -DCMAKE_PREFIX_PATH=/app \ -DDESTDIR=/app \ -DCMAKE_INSTALL_LIBDIR=/app/lib \ -DFLATPAK=ON \ -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_BUILD_TYPE=Release ninja -v #cd dexxxps/build rm -r /run/build/creality_deps/external-packages cleanup: - /app/include - "*.a" - "*.la" - /app/lib/cmake sources: # - # Section bellow fetches all OrcaSlicer dependencies before the build process and stores them in external-packages/*/* . # -DDEP_DOWNLOAD_DIR is set in the build process which has to match with dest. # # NOTE: The url, dest folder name and sha256 must match from OrcaSlicer's cmake scripts and folder names in OrcaSlicer/deps/ # - # OrcaSlicer Source Archive - type: dir path: ../ # Blosc - type: file url: https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip dest: external-packages/Blosc sha256: dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3 # Cereal - type: file url: https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip dest: external-packages/Cereal sha256: 71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657 # CGAL - type: file url: https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip dest: external-packages/CGAL sha256: d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0 # GMP - type: file url: https://github.com/SoftFever/OrcaSlicer_deps/releases/download/gmp-6.2.1/gmp-6.2.1.tar.bz2 dest: external-packages/GMP sha256: eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c # curl - type: file url: https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.zip dest: external-packages/CURL sha256: a63ae025bb0a14f119e73250f2c923f4bf89aa93b8d4fafa4a9f5353a96a765a # MPFR - type: file url: https://www.mpfr.org/mpfr-4.2.1/mpfr-4.2.1.tar.bz2 dest: external-packages/MPFR sha256: b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0 # NLopt - type: file url: https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz dest: external-packages/NLopt sha256: c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae # OCCT - type: file url: https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip dest: external-packages/OCCT sha256: 28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc # OpenCSG - type: file url: https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip dest: external-packages/OpenCSG sha256: 51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5 # OpenCV - type: file url: https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz dest: external-packages/OpenCV sha256: 1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277 # OpenEXR - type: file url: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip dest: external-packages/OpenEXR sha256: 0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de # OpenSSL - type: file url: https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz dest: external-packages/OpenSSL sha256: 2130e8c2fb3b79d1086186f78e59e8bc8d1a6aedf17ab3907f4cb9ae20918c41 # OpenVDB - type: file url: https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip dest: external-packages/OpenVDB sha256: f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81 # Qhull - type: file url: https://github.com/qhull/qhull/archive/v8.0.1.zip dest: external-packages/Qhull sha256: 5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b # TBB - type: file url: https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip dest: external-packages/TBB sha256: 83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47 # Boost - type: file url: https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz dest: external-packages/Boost sha256: 4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95 # GLFW - type: file url: https://github.com/glfw/glfw/archive/refs/tags/3.3.7.zip dest: external-packages/GLFW sha256: e02d956935e5b9fb4abf90e2c2e07c9a0526d7eacae8ee5353484c69a2a76cd0 # libnoise - type: file url: https://github.com/SoftFever/Orca-deps-libnoise/archive/refs/tags/1.0.zip dest: external-packages/libnoise sha256: 96ffd6cc47898dd8147aab53d7d1b1911b507d9dbaecd5613ca2649468afd8b6 # assimp - type: file url: https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.zip dest: external-packages/Assimp sha256: 795c29716f4ac123b403e53b677e9f32a8605c4a7b2d9904bfaae3f4053b506d # ffmpeg - type: file url: https://ffmpeg.org/releases/ffmpeg-4.2.tar.bz2 dest: external-packages/FFmpeg sha256: 306bde5f411e9ee04352d1d3de41bd3de986e42e2af2a4c44052dce1ada26fb8 # metartc - type: file url: https://github.com/CrealityOfficial/metartc/archive/refs/tags/v1.0.0.tar.gz dest: external-packages/metartc sha256: 696780282b3a9324e87d451ee2c8889e3ebc93c45d06db46571208477bc93d9a # OSS - type: file url: https://github.com/aliyun/aliyun-oss-cpp-sdk/archive/refs/tags/1.9.2.zip dest: external-packages/OSS sha256: 7d94b9754a8dc5b64dcd7e9f729d37514f2c87f95a6154ab3bb2cf1103dc05c9 # BREAKPAD - type: file url: https://github.com/google/breakpad/archive/refs/tags/v2023.06.01.zip dest: external-packages/BREAKPAD sha256: 6031c0039e016242801673463562d01a70ae016bf842c1244581e29359e25552 # MQTT-C - type: file url: https://github.com/eclipse-paho/paho.mqtt.c/archive/refs/tags/v1.3.15.tar.gz dest: external-packages/MQTTC sha256: 60ce2cfdc146fcb81c621cb8b45874d2eb1d4693105d048f60e31b8f3468be90 # MQTT-CPP - type: file url: https://github.com/eclipse-paho/paho.mqtt.cpp/archive/refs/tags/v1.4.0.zip dest: external-packages/MQTT sha256: c165960f64322de21697eb06efdca3d74cce90f45ff5ff0efdd968708e13ba0c - name: CrealityPrint buildsystem: simple build-commands: - | export CFLAGS="" export CXXFLAGS="" mkdir -p build cmake . -B build \ -GNinja \ -DENABLE_BREAKPAD=OFF \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DSLIC3R_PCH=ON \ -DSLIC3R_FHS=ON \ -DSLIC3R_GTK=3 \ -DSLIC3R_STATIC=ON \ -DSLIC3R_BUILD_TESTS=OFF \ -DSLIC3R_DESKTOP_INTEGRATION=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DFLATPAK=ON \ -DCREALITYPRINT_VERSION=6.0.0 \ -DPROJECT_VERSION_EXTRA=Beta \ -DBBL_RELEASE_TO_PUBLIC=1 \ -DCMAKE_PREFIX_PATH=/app \ -DCMAKE_INSTALL_PREFIX=/app cmake --build build --target CrealityPrint ./run_gettext.sh cmake --build build --target install/strip cleanup: - /include post-install: - | # Desktop Integration files install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/CrealityPrint.svg install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml mv /app/share/applications/CrealityPrint.desktop /app/share/applications/${FLATPAK_ID}.desktop desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop install -Dm755 entrypoint /app/bin install -Dm755 umount /app/bin sources: # - # Section bellow fetches all OrcaSlicer dependencies before the build process and stores them in external-packages/*/* . # -DDEP_DOWNLOAD_DIR is set in the build process which has to match with dest. # # NOTE: The url, dest folder name and sha256 must match from OrcaSlicer's cmake scripts and folder names in OrcaSlicer/deps/ # - # OrcaSlicer Source Archive - type: dir path: ../ # AppData metainfo for Gnome Software & Co. - type: file path: io.github.crealityofficial.CrealityPrint.metainfo.xml # start-up script - type: file path: entrypoint # umount wrapper used to redirect umount calls to udisk2 - type: file path: umount