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

[enhancement req] Snap Package #1015

Open
Zap123 opened this issue Dec 22, 2017 · 5 comments
Open

[enhancement req] Snap Package #1015

Zap123 opened this issue Dec 22, 2017 · 5 comments

Comments

@Zap123
Copy link

Zap123 commented Dec 22, 2017

Hello DuckieTV team, have you considered providing a snap(https://snapcraft.io/) package for DuckieTV this way it could gain exposure in the Software Center, it would make it easier to install and available to more distros?

https://pusher.com/sessions/meetup/london-node-user-group/automatically-build-and-publish-node-and-electron-applications-for-linux

https://github.com/electron-userland/electron-builder

P.S: I'm just a user, I'm not involved with Canonical, it's just that I have to check everytime to see if a new version of DuckieTV is out and download the deb again and again

@Devil505
Copy link

A snap or flatpak could be usefull for non-deb distros too.

@Zap123
Copy link
Author

Zap123 commented Aug 28, 2018

DuckieTV has no auto-update mechanism, I prefer a snap version over the deb for this reason.

@ghost
Copy link

ghost commented Nov 30, 2018

Snaps are pretty bad atm. Like alpha quality software or worse, they are slow, buggy and theming doesn't work a lot of the time (even the default theme, you use a dialog or filepicker and the whole thing is all deformed). Flatpak seems to be the best choice.

There's https://github.com/flatpak/flatpak-docs/blob/master/docs/electron.rst but I couldn't find an example for nwjs.

You can also improvise https://github.com/flathub/com.spotify.Client/blob/master/com.spotify.Client.json#L117

@ghost
Copy link

ghost commented Dec 2, 2018

Needs https://github.com/flathub/shared-modules

{
    "app-id": "tv.duckie.DuckieTV",
    "runtime": "org.freedesktop.Platform",
    "runtime-version": "18.08",
    "sdk": "org.freedesktop.Sdk",
    "command": "DuckieTV",
    "finish-args": [
        "--device=dri",
        "--share=network",
        "--share=ipc",
        "--socket=x11",
        "--socket=wayland",
        "--socket=pulseaudio",
        "--filesystem=xdg-config/DuckieTV-Standalone"
    ],
    "modules": [
        "shared-modules/glu/glu-9.0.0.json",
        "shared-modules/udev/udev-175.json",
        {
            "name": "DuckieTV",
            "buildsystem": "simple",
            "build-commands": [
                "tar xvf DuckieTV*.tar.gz",
                "rm DuckieTV-201811280130-linux-x64.tar.gz",
                "mv DuckieTV/* /app/bin",
                "chmod 0755 /app/bin/DuckieTV"
            ],
            "sources": [
                {
                    "type": "file",
                    "url": "https://github.com/DuckieTV/Nightlies/releases/download/nightly-201811280130/DuckieTV-201811280130-linux-x64.tar.gz",
                    "sha256": "2c2ae3724f11ae99eecd568e0495f5942be5cff6bf567272857a784a7afc88b9"
                }
            ]
        }
    ]
}

If the sandbox gives any trouble

"sed -i 's/\"chromium-args\": \"\"/\"chromium-args\": \"--no-sandbox --disable-setuid-sandbox\"/g' /app/bin/package.json"

I'm not a dev but I think it would work just fine. I have no idea how to configure the shortcuts and icons but I did what I could to help

@Zap123
Copy link
Author

Zap123 commented Feb 28, 2019

I've ended up writing the snapcraft.yaml file by myself, seems to work well, but I'll have to try various torrent clients to see if those works and see if it's generally stable.

name: duckietv
version: 1.1.7
grade: stable
summary: 'DuckieTV track your favorite tv-shows with semi-automagic torrent integration'
description: "DuckieTV is an application that takes care of TV-Show addicts by providing a personalized TV-Show calendar.\n"
confinement: strict
base: core18
parts:
    duckietv2:
        plugin: dump
        source: 'https://github.com/SchizoDuckie/DuckieTV.git'
        after:
            - desktop-gnome-platform
        stage-packages:
            - libatomic1
            - libasound2
            - libavahi-client3
            - libavahi-common3
            - libcom-err2
            - libcups2
            - libdatrie1
            - libdbus-1-3
            - libepoxy0
            - libexpat1
            - libffi6
            - libgcrypt20
            - libgmp10
            - libgnutls30
            - libgpg-error0
            - libgraphite2-3
            - libgssapi-krb5-2
            - libgtk-3-0
            - libharfbuzz0b
            - libhogweed4
            - libidn2-0
            - libk5crypto3
            - libkeyutils1
            - libkrb5-3
            - libkrb5support0
            - liblz4-1
            - liblzma5
            - libmount1
            - libnettle6
            - libnspr4
            - libnss3
            - libp11-kit0
            - libpcre3
            - libpixman-1-0
            - libpng16-16
            - libtasn1-6
            - libthai0
            - libunistring2
            - libwayland-client0
            - libwayland-cursor0
            - libwayland-egl1
            - libx11-6
            - libx11-xcb1
            - libxau6
            - libxcb1
            - libxcb-render0
            - libxcb-shm0
            - libxcomposite1
            - libxcursor1
            - libxdamage1
            - libxdmcp6
            - libxext6
            - libxfixes3
            - libxi6
            - libxinerama1
            - libxkbcommon0
            - libxrender1
            - libxss1
            - libxtst6
            - zlib1g
    nwjs:
        plugin: dump
        source: 'https://dl.nwjs.io/v0.43.6/nwjs-v0.43.6-linux-x64.tar.gz'
    desktop-gnome-platform:
        source: 'https://github.com/ubuntu/snapcraft-desktop-helpers.git'
        source-subdir: gtk
        plugin: make
        make-parameters:
            - FLAVOR=gtk3
        build-packages:
            - build-essential
            - libgtk-3-dev
        override-build: "snapcraftctl build\nmkdir -pv $SNAPCRAFT_PART_INSTALL/gnome-platform\n"
apps:
    duckietv:
        command: desktop-launch $SNAP/nw --no-sandbox
        #desktop: usr/share/applications/duckietv.desktop
        environment: 
          TMPDIR: $XDG_RUNTIME_DIR
          XDG_CURRENT_DESKTOP: Unity
          DISABLE_WAYLAND: 1
        plugs:
            - desktop
            - desktop-legacy
            - opengl
            - mount-observe
            - x11
            - wayland
            - network
            - network-bind
            - gsettings
            - browser-support
            - password-manager-service
plugs:
    gnome-3-28-1804:
        interface: content
        target: gnome-platform
        default-provider: 'gnome-3-28-1804:gnome-3-28-1804'
    gtk-3-themes:
        interface: content
        target: $SNAP/data-dir/themes
        default-provider: gtk-common-themes
    icon-themes:
        interface: content
        target: $SNAP/data-dir/icons
        default-provider: gtk-common-themes

screenshot from 2019-02-28 19-12-17

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

2 participants