{
 "app_id": "com.bambulab.BambuStudio",
 "source_url": "https://raw.githubusercontent.com/flathub/com.bambulab.BambuStudio/master/com.bambulab.BambuStudio.yml",
 "runtime": "org.gnome.Platform",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=x11",
  "--device=all",
  "--filesystem=home",
  "--filesystem=/media",
  "--filesystem=/run/media",
  "--filesystem=xdg-run/gvfs",
  "--system-talk-name=org.freedesktop.UDisks2"
 ],
 "module_count": 9,
 "fetched_at": "2026-09-18T11:42:53.552676+00:00",
 "manifest": {
  "app-id": "com.bambulab.BambuStudio",
  "runtime": "org.gnome.Platform",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "command": "entrypoint",
  "rename-icon": "BambuStudio",
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--share=network",
   "--device=all",
   "--filesystem=home",
   "--filesystem=xdg-run/gvfs",
   "--filesystem=/run/media",
   "--filesystem=/media",
   "--system-talk-name=org.freedesktop.UDisks2",
   "--env=SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
  ],
  "modules": [
   {
    "name": "mesa",
    "buildsystem": "meson",
    "config-opts": [
     "-Dosmesa=classic",
     "-Ddri-drivers=[]",
     "-Dgallium-drivers=[]",
     "-Dvulkan-drivers=[]",
     "-Dplatforms=[]"
    ],
    "build-options": {
     "arch": {
      "aarch64": {
       "config-opts": [
        "-Dlibunwind=disabled"
       ]
      }
     }
    },
    "cleanup": [
     "/share/drirc.d",
     "/include",
     "*.a"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://archive.mesa3d.org/older-versions/20.x/mesa-20.2.6.tar.xz",
      "sha256": "f12ca3c6c622f11cd79ad66b4220f04514fa96f795062fe92a37339ab19885db",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1970,
       "versions": {
        "<": "20.3.0"
       },
       "stable-only": true,
       "url-template": "https://archive.mesa3d.org/older-versions/20.x/mesa-$version.tar.xz"
      }
     }
    ]
   },
   {
    "name": "glu",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz",
      "sha256": "bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 383990,
       "stable-only": true,
       "url-template": "https://archive.mesa3d.org/glu/glu-$version.tar.xz"
      }
     }
    ],
    "cleanup": [
     "/include",
     "/lib/pkgconfig"
    ]
   },
   {
    "name": "boost",
    "buildsystem": "simple",
    "build-commands": [
     "./bootstrap.sh --prefix=/app --with-libraries=iostreams,filesystem,thread,log,locale,regex,date_time",
     "./b2 headers",
     "./b2 -j$FLATPAK_BUILDER_N_JOBS install variant=release cxxstd=17 --layout=system"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz",
      "sha256": "4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95"
     }
    ],
    "cleanup": [
     "/include",
     "/lib/cmake"
    ]
   },
   {
    "name": "cgal",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip",
      "sha256": "d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0"
     },
     {
      "type": "patch",
      "path": "patches/cgal-clang19.patch"
     }
    ],
    "cleanup": [
     "/include",
     "/lib/cmake"
    ]
   },
   {
    "name": "glfw",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DBUILD_SHARED_LIBS:BOOL=ON",
     "-DGLFW_BUILD_WAYLAND=OFF",
     "-DGLFW_BUILD_X11=ON",
     "-DGLFW_BUILD_DOCS=OFF",
     "-DGLFW_BUILD_TESTS=OFF",
     "-DGLFW_BUILD_EXAMPLES=OFF"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/glfw/glfw.git",
      "tag": "3.5.1",
      "commit": "d9d6f0f1f967807ffade6598ea9a631ebaf37a56",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1180,
       "stable-only": true,
       "tag-template": "$version"
      }
     }
    ],
    "cleanup": [
     "/include",
     "/lib/cmake",
     "/lib/pkgconfig"
    ]
   },
   {
    "name": "wxwidgets",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DwxBUILD_PRECOMP=ON",
     "-DwxBUILD_TOOLKIT=gtk3",
     "-DwxBUILD_DEBUG_LEVEL=0",
     "-DwxBUILD_SAMPLES=OFF",
     "-DwxBUILD_SHARED=OFF",
     "-DwxUSE_MEDIACTRL=ON",
     "-DwxUSE_DETECT_SM=OFF",
     "-DwxUSE_UNICODE=ON",
     "-DwxUSE_PRIVATE_FONTS=1",
     "-DwxUSE_OPENGL=ON",
     "-DwxUSE_WEBREQUEST=ON",
     "-DwxUSE_WEBVIEW=ON",
     "-DwxUSE_REGEX=sys",
     "-DwxUSE_LIBSDL=OFF",
     "-DwxUSE_XTEST=OFF",
     "-DwxUSE_STC=OFF",
     "-DwxUSE_AUI=ON",
     "-DwxUSE_LIBPNG=sys",
     "-DwxUSE_ZLIB=sys",
     "-DwxUSE_LIBJPEG=sys",
     "-DwxUSE_LIBTIFF=sys",
     "-DwxUSE_NANOSVG=OFF",
     "-DwxUSE_EXPAT=sys",
     "-DwxUSE_GLCANVAS_EGL=OFF"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.9/wxWidgets-3.2.9.tar.bz2",
      "sha256": "fb90f9538bffd6a02edbf80037a0c14c2baf9f509feac8f76ab2a5e4321f112b",
      "x-checker-data": {
       "is-important": true,
       "type": "git",
       "tag-pattern": "^v([\\d\\.]+)$",
       "versions": {
        "<": "3.3"
       }
      }
     }
    ],
    "cleanup": [
     "/include",
     "/lib/cmake"
    ]
   },
   {
    "name": "blosc",
    "buildsystem": "cmake-ninja",
    "build-options": {
     "env": {
      "CMAKE_POLICY_VERSION_MINIMUM": "3.5"
     }
    },
    "config-opts": [
     "-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
     "-DBUILD_SHARED=BOOL:OFF",
     "-DBUILD_STATIC=BOOL:ON",
     "-DBUILD_TESTS=OFF",
     "-DBUILD_BENCHMARKS=OFF",
     "-DPREFER_EXTERNAL_ZLIB=ON"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip",
      "sha256": "dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3"
     },
     {
      "type": "patch",
      "path": "patches/blosc-bool-fix.patch"
     }
    ],
    "cleanup": [
     "/include",
     "/lib/cmake"
    ]
   },
   {
    "name": "libharu",
    "buildsystem": "cmake-ninja",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/libharu/libharu.git",
      "tag": "v2.4.5",
      "commit": "8fe5a738541a04642885fb7a75b2b5b9c5b416fa"
     },
     {
      "type": "patch",
      "path": "patches/0001-Install-hpdf.h-to-usr-include-hpdf-hpdf.h.patch"
     }
    ]
   },
   {
    "name": "BambuStudio",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "CMAKE_POLICY_VERSION_MINIMUM": "3.5"
     }
    },
    "build-commands": [
     "mkdir -p deps/build && cd deps/build\ncmake ../ \\\n  -DDEP_WX_GTK3=1 \\\n  -DDEP_DOWNLOAD_DIR=/run/build/BambuStudio/external-packages \\\n  -DDEP_BUILD_PNG=OFF \\\n  -DDEP_BUILD_JPEG=OFF \\\n  -DDEP_BUILD_TIFF=OFF \\\n  -DDEP_BUILD_BOOST=OFF \\\n  -DDEP_BUILD_OPENSSL=OFF \\\n  -DDEP_BUILD_GLFW=OFF \\\n  -DDEP_BUILD_FREETYPE=OFF \\\n  -DDEP_BUILD_WXWIDGETS=OFF \\\n  -DDEP_BUILD_BLOSC=OFF \\\n  -DDEP_BUILD_GMP=OFF \\\n  -DDEP_BUILD_MPFR=OFF \\\n  -DDEP_BUILD_CGAL=OFF\ncmake --build . --target dep_TBB dep_Cereal dep_NLopt dep_libnoise dep_OpenVDB dep_Qhull dep_OpenCSG dep_OpenCV dep_Assimp dep_OCCT\n",
     "mkdir -p build && cd build\nmkdir -p ../../node-cache/ && pushd ../../node-cache/ && tar xJf ../BambuStudio/external-packages/node*.tar.xz && cp -a ../BambuStudio/external-packages/pnpm node-*/bin/ && chmod +x node-*/bin/pnpm && popd\nCXXFLAGS=-std=gnu++20 cmake ../ \\\n  -GNinja \\\n  -DCMAKE_INSTALL_PREFIX=/app \\\n  -DCMAKE_INSTALL_LIBDIR=/app/lib \\\n  -DCMAKE_PREFIX_PATH=/run/build/BambuStudio/deps/build/destdir/usr/local \\\n  -DFLATPAK=ON \\\n  -DSLIC3R_PCH=OFF \\\n  -DSLIC3R_FHS=ON \\\n  -DSLIC3R_GTK=3 \\\n  -DSLIC3R_STATIC=ON \\\n  -DSLIC3R_BUILD_TESTS=OFF \\\n  -DSLIC3R_DESKTOP_INTEGRATION=OFF \\\n  -DCMAKE_BUILD_TYPE=Release \\\n  -DBBL_RELEASE_TO_PUBLIC=1 \\\n  -DBBL_INTERNAL_TESTING=0\nCXXFLAGS=-std=gnu++20 cmake --build . --target install -j $(expr $FLATPAK_BUILDER_N_JOBS / 2)\n"
    ],
    "cleanup": [
     "/include"
    ],
    "post-install": [
     "install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/BambuStudio.svg\ninstall -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml\nmv /app/share/applications/BambuStudio.desktop /app/share/applications/${FLATPAK_ID}.desktop\ndesktop-file-edit --set-key=Exec --set-value=\"entrypoint %U\" /app/share/applications/${FLATPAK_ID}.desktop\ninstall -Dm755 entrypoint /app/bin\ninstall -Dm755 umount /app/bin\n"
    ],
    "sources": [
     {
      "type": "file",
      "url": "https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip",
      "dest": "external-packages/Cereal",
      "sha256": "71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657"
     },
     {
      "type": "file",
      "url": "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz",
      "dest": "external-packages/NLopt",
      "sha256": "c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae"
     },
     {
      "type": "file",
      "url": "https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip",
      "dest": "external-packages/OCCT",
      "sha256": "28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc"
     },
     {
      "type": "file",
      "url": "https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz",
      "dest": "external-packages/OpenCV",
      "sha256": "1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277"
     },
     {
      "type": "file",
      "url": "https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.tar.gz",
      "dest": "external-packages/Assimp",
      "sha256": "66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb"
     },
     {
      "type": "file",
      "url": "https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip",
      "dest": "external-packages/OpenCSG",
      "sha256": "51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5"
     },
     {
      "type": "file",
      "url": "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip",
      "dest": "external-packages/OpenEXR",
      "sha256": "0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de"
     },
     {
      "type": "file",
      "url": "https://github.com/bambulab/libnoise/archive/refs/tags/v1.0.0.zip",
      "dest": "external-packages/libnoise",
      "sha256": "7aae3433e4c841a1b15ddf40dc995b3d32efb154b92b6796888002e275bff859"
     },
     {
      "type": "file",
      "url": "https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip",
      "dest": "external-packages/OpenVDB",
      "sha256": "f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81"
     },
     {
      "type": "file",
      "url": "https://github.com/qhull/qhull/archive/v8.0.1.zip",
      "dest": "external-packages/Qhull",
      "sha256": "5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b"
     },
     {
      "type": "file",
      "url": "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip",
      "dest": "external-packages/TBB",
      "sha256": "83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47"
     },
     {
      "type": "file",
      "url": "https://nodejs.org/dist/v22.22.2/node-v22.22.2-linux-x64.tar.xz",
      "dest": "external-packages",
      "sha256": "88fd1ce767091fd8d4a99fdb2356e98c819f93f3b1f8663853a2dee9b438068a",
      "only-arches": [
       "x86_64"
      ]
     },
     {
      "type": "file",
      "url": "https://nodejs.org/dist/v22.22.2/node-v22.22.2-linux-arm64.tar.xz",
      "dest": "external-packages",
      "sha256": "e9e1930fd321a470e29bb68f30318bf58e3ecb4acb4f1533fb19c58328a091fe",
      "only-arches": [
       "aarch64"
      ]
     },
     {
      "type": "file",
      "url": "https://github.com/pnpm/pnpm/releases/download/v10.12.1/pnpm-linux-x64",
      "dest": "external-packages/",
      "sha256": "eb2dc1f109bca046ce734d062c8dd8f34db2b58a115992f9b086456efd7b2305",
      "dest-filename": "pnpm",
      "only-arches": [
       "x86_64"
      ]
     },
     {
      "type": "file",
      "url": "https://github.com/pnpm/pnpm/releases/download/v10.12.1/pnpm-linux-arm64",
      "dest": "external-packages/",
      "sha256": "c2f9e9d42d81f9f40a0f895513d014a08d5ecb0abc9e15c426ecfde6f492706b",
      "dest-filename": "pnpm",
      "only-arches": [
       "aarch64"
      ]
     },
     {
      "type": "git",
      "url": "https://github.com/bambulab/BambuStudio.git",
      "tag": "v02.08.02.61",
      "commit": "926a7192574bcb9b3a732e1ec59a46d79cb45466"
     },
     {
      "type": "patch",
      "path": "patches/0001-FIX-Match-D-Bus-names-to-the-verified-Flatpak.patch"
     },
     {
      "type": "patch",
      "path": "patches/0001-FIX-Fix-boost-format-declaration.patch"
     },
     {
      "type": "patch",
      "path": "patches/2.8.2-fixes.patch"
     },
     "generated-sources.json",
     {
      "type": "patch",
      "path": "patches/0001-FIX-Fix-Open-in-Bambu-Studio-not-working-on-aarch64-.patch"
     },
     {
      "type": "patch",
      "path": "patches/offline-npm.patch"
     },
     {
      "type": "patch",
      "path": "patches/system-cgal.patch"
     },
     {
      "type": "file",
      "dest": "deps/TBB",
      "path": "patches/TBB/GNU.cmake"
     },
     {
      "type": "patch",
      "path": "patches/0001-Apply-TBB-LTO-patch.patch"
     },
     {
      "type": "patch",
      "path": "patches/no-boost-system.patch"
     },
     {
      "type": "file",
      "path": "com.bambulab.BambuStudio.metainfo.xml"
     },
     {
      "type": "file",
      "path": "entrypoint"
     },
     {
      "type": "file",
      "path": "umount"
     }
    ]
   }
  ]
 }
}