Commit Graph

21 Commits (master)

Author SHA1 Message Date
Romain Vimont ca9e1a0514 Add compilation flag for USB features
This allows to disable HID/OTG features on Linux to build without
libusb.
2 years ago
Romain Vimont cc27771dd1 Add compilation flag for V4L2 feature
This allows to disable V4L2 support on Linux to build without
libavdevice.
2 years ago
Romain Vimont 0685c491cd Improve crossbuild configuration
Use meson native features to detect crossbuild, and remove the
user-provided option crossbuild_windows.
2 years ago
Romain Vimont 9826c5c4a4 Remove HiDPI compilation flag
Always enable HiDPI support, there is no reason to expose a compilation
flag.
3 years ago
Romain Vimont a46733906a Replace noconsole binary by a wrapper script
This simplifies the build system.

Refs <https://github.com/Genymobile/scrcpy/issues/1975#issuecomment-745314161>
3 years ago
Romain Vimont 902b99174d Fix server debugger for Android >= 9
Add a compilation flag to select the debugger method to use:
 - old: Android < 9
 - new: Android >= 9

See <https://github.com/Genymobile/scrcpy/issues/1187#issuecomment-599075661>
4 years ago
Romain Vimont 683f7ca848 Document how to attach a debugger to the server 5 years ago
Romain Vimont 3da95b52bd Rename scrcpy-server.jar to scrcpy-server
The server name ending with .jar has several drawbacks:
 - meson requires the jar executable to attempt to modify it:
     <https://github.com/Genymobile/scrcpy/issues/404#issuecomment-456065923>
     <https://github.com/mesonbuild/meson/issues/4844>
 - meson warns during "ninja install"
     <https://github.com/Genymobile/scrcpy/issues/458>
 - some users try to execute it on the computer as a java executable

Removing the extension solves all these problems.
5 years ago
Romain Vimont 02692ffa42 Rename "build_" to "compile_"
Recent versions of meson complain about an option having name starting
with "build_":

> DEPRECATION: Option uses prefix "build_", which is reserved for Meson.
> This will become an error in the future.

Use "compile_" instead.
5 years ago
Romain Vimont 8ca36406b9 Remove compilation flag "skip_frames"
It is unused since ebccb9f6cc.
5 years ago
Romain Vimont 53310a925a Disable portable build by default
The default value of a boolean meson option is true. We want
non-portable build by default.
5 years ago
Romain Vimont 2755bfc255 Improve portable builds
In portable builds, scrcpy-server.jar was supposed to be present in the
current directory, so in practice it worked only if scrcpy was launched
from its own directory.

Instead, find the absolute path of the executable and build a suitable
path to use scrcpy-server.jar from the same directory.
5 years ago
Romain Vimont eb34098add Simplify portable build configuration
To create a portable build (with scrcpy-server.jar accessible from the
scrcpy directory), replace OVERRIDE_SERVER_PATH by a simple compilation
flag: PORTABLE.

This paves the way to use more complex rules to determine the path of
scrcpy-server.jar in portable builds.
5 years ago
Romain Vimont f705a73149 Use a meson option to crossbuild for Windows
Meson decided to crossbuild for Windows as soon as
meson.is_cross_build() returned true. This made non-Windows crossbuilds
fail.

Instead, add an explicit option "crossbuild_windows".

Fixes <https://github.com/Genymobile/scrcpy/issues/165>.
6 years ago
Romain Vimont aedc2c2da9 Also build "noconsole" binary for Windows
On Windows, an application is either console or gui, it cannot be both.

Scrcpy should be both: it outputs important information to console, but
we still want to be able to ignore the console and launch it without a
visible cmd.exe window.

Therefore, build two binaries:
 - scrcpy.exe
 - scrcpy-noconsole.exe
6 years ago
Romain Vimont fffeedffda Expose High DPI support configuration flag
The High DPI support is enabled by default, so that the renderer use the
full definition of High DPI screens.

However, there are still mouse coordinates problems on some MacOS having
High DPI support (but not all), so expose a way to disable it.
6 years ago
Romain Vimont 089378926b Rename SCRCPY_SERVER_JAR to SCRCPY_SERVER_PATH
The server is currently a JAR, but it may ba an APK or a DEX, so the
variable name should not contain the type.

Rename the environment variable, the Meson options and the C
definitions.
6 years ago
Romain Vimont fb0e467585 Add description for meson options
The descriptions are displayed in the result of:

    mesonconf builddir
6 years ago
Romain Vimont 42882702d7 Expose skip_frames as a build option
It can be initially configured by:

    meson builddir -Dskip_frames=false

Or on an existing builddir by:

    mesonconf builddir -Dskip_frames=false
6 years ago
Romain Vimont 07983d914f Accept prebuilt server
Expose a 'prebuilt_server' option to pass the path of the prebuilt
binary, so that the build does not require Android SDK.

Usage:

    meson builddir -Dprebuilt_server=/tmp/my_prebuilt_server.jar
6 years ago
Romain Vimont c2127d0819 Replace meson subprojects by subdir
Since Meson 0.44, subproject_dir may not be '.' anymore. This implies we
must move app/ and server/ to a subprojects/ directory, which requires
to also change some gradle files.

Instead, just use subdir(), with options to disable building of the app
or the server.
6 years ago