Commit Graph

3 Commits (master)

Author SHA1 Message Date
CapsLock cf7bf3148c Use "/usr/bin/env bash" for build-wrapper.sh
PR #426 <https://github.com/Genymobile/scrcpy/pull/426>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont 4c49b27e9f Always invoke gradle except as root
The custom target used to invoke Gradle from Meson should always
be built, otherwise, the server would not be rebuilt on source changes.

However, when enabling "build_always", gradle is invoked as root on
"sudo ninja install" after "ninja", so it downloads the whole Gradle
world into /root/.gradle.

To avoid the problem, just do not call gradle if the effective user id
is 0.
6 years ago
Romain Vimont ff94462d8a Refactor build system
The client was built with Meson, the server with Gradle, and were run by
a Makefile.

Add a Meson script for the server (which delegates to Gradle), and a
parent script to build and install both the client and the server to the
system, typically with:

    meson --buildtype release build
    cd build
    ninja
    sudo ninja install

In addition, use a separate Makefile to build a "portable" version of
the application (where the client expects the server to be in the
current directory). Typically:

    make release-portable
    cd dist/scrcpy
    ./scrcpy

This is especially useful for Windows builds, which are not "installed".
6 years ago