From fd55053f382432988880a844ae9787d57651262b Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 6 Apr 2024 18:15:18 -0400 Subject: [PATCH] Package Bambu Studio ..although it does not seem to work well with Sommelier under Sway. We either need to figure this out or there needs to be a way to disable Sommelier only for specific containers. --- apps/bambu-studio/Containerfile | 24 ++++++++++++++++++++++++ apps/bambu-studio/control | 1 + dobu-run.sh | 5 +++++ 3 files changed, 30 insertions(+) create mode 100644 apps/bambu-studio/Containerfile create mode 100644 apps/bambu-studio/control diff --git a/apps/bambu-studio/Containerfile b/apps/bambu-studio/Containerfile new file mode 100644 index 0000000..44b561a --- /dev/null +++ b/apps/bambu-studio/Containerfile @@ -0,0 +1,24 @@ +FROM dobu/deps-base-ubuntu-jammy:latest + +ARG UPSTREAM_VERSION + +RUN apt-get update && apt-get -y install libgtk-3-0 libgstreamer1.0-0 \ + gstreamer1.0-plugins-base libwebkit2gtk-4.0-37 curl locales + +RUN echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen + +RUN sh -c "curl -o /tmp/BambuStudio.AppImage -L \ + https://github.com/bambulab/BambuStudio/releases/download/${UPSTREAM_VERSION}/Bambu_Studio_linux_ubuntu_\"$(echo ${UPSTREAM_VERSION} | sed 's/^v//')\".AppImage" + +RUN chmod +x /tmp/BambuStudio.AppImage && /tmp/BambuStudio.AppImage --appimage-extract \ + && mv ./squashfs-root / && rm -rf /tmp/BambuStudio.AppImage \ + && mkdir -p /usr/share/icons/hicolor/192x192/apps \ + && cp -r /squashfs-root/usr/share/icons/hicolor/192x192/apps/BambuStudio.png /usr/share/icons/hicolor/192x192/apps + +USER user + +ENV GDK_BACKEND=wayland + +LABEL net.typeblog.dobu.desktop_file_path=/squashfs-root/BambuStudio.desktop + +ENTRYPOINT [ "/squashfs-root/AppRun" ] diff --git a/apps/bambu-studio/control b/apps/bambu-studio/control new file mode 100644 index 0000000..63b9ac3 --- /dev/null +++ b/apps/bambu-studio/control @@ -0,0 +1 @@ +INVALIDATE_CACHE_UPSTREAM_GITHUB="bambulab/BambuStudio" diff --git a/dobu-run.sh b/dobu-run.sh index 09745a9..89a9bd8 100755 --- a/dobu-run.sh +++ b/dobu-run.sh @@ -53,6 +53,11 @@ if [ ! -d "$home_path" ]; then fi fi +# Some containers want these default XDG directories to exist; make sure they do +mkdir -p "$home_path/.config" +mkdir -p "$home_path/.cache" +mkdir -p "$home_path/.local/share" + extra_args="" # Check if we should allow /dev/input access