nexustar / scrcpy-flatpak

package scrcpy with flatpak
8 stars 3 forks source link

Build tools from source if able #5

Open FilBot3 opened 2 years ago

FilBot3 commented 2 years ago

Description

Seeing https://github.com/Genymobile/scrcpy/issues/486 has brought up an interesting request I did not understand at first. Building from source against the org.freedesktop.Sdk ensures that the Flatpak will work on any architecture, where as using binaries may not. Some Flatpaks do do this already or did in the past, but it seems the Flatpak organization is making this a hard requirement.

Scrcpy Build

This should be fairly easy to build. Just would need to find the sources for libusb and get that into the build. I can't tell if this:

is the desired repository or not.

Android Platform Tools

The specific versions can be sourced like you're doing already, just update the version number.

FilBot3 commented 2 years ago

Found information on how to build libusb.

Yep! Solved adding libusb!

{
    "name": "libusb",
    "config-opts": [ "--disable-static", "--disable-udev" ],
    "cleanup": [
        "/lib/*.la",
        "/lib/pkgconfig",
        "/include"
    ],
    "sources": [
        {
            "type": "archive",
            "url": "https://github.com/libusb/libusb/archive/v1.0.22.tar.gz",
            "sha256": "3500f7b182750cd9ccf9be8b1df998f83df56a39ab264976bdb3307773e16f48"
        }
    ],
    "post-install": [
        "install -Dm644 COPYING /app/share/licenses/libusb/COPYING"
    ]
}

Not sure if the config-opts are actually needed, I found this snipped on another flatpak project.

Thank you @TingPing, you are as always very helpful +1