Display and control your Android device
Rename SCRCPY_SERVER_JAR to SCRCPY_SERVER_PATH
Romain Vimont089378926b09
diff --git a/Makefile b/Makefileindex ffc6653c..bb67ca32 100644--- a/Makefile+++ b/Makefile@@ -34,7 +34,7 @@ build-portable:[ -d "$(PORTABLE_BUILD_DIR)" ] || ( mkdir "$(PORTABLE_BUILD_DIR)" && \meson "$(PORTABLE_BUILD_DIR)" \--buildtype release --strip -Db_lto=true \- -Doverride_server_jar=scrcpy-server.jar )+ -Doverride_server_path=scrcpy-server.jar )ninja -C "$(PORTABLE_BUILD_DIR)"release-portable: clean dist-portable-zip sumsdiff --git a/app/meson.build b/app/meson.buildindex e574a835..c817b7f1 100644--- a/app/meson.build+++ b/app/meson.build@@ -48,19 +48,19 @@ conf.set_quoted('SCRCPY_VERSION', '0.1')conf.set_quoted('PREFIX', get_option('prefix'))# the path of the server, which will be appended to the prefix-# ignored if OVERRIDE_SERVER_JAR if defined+# ignored if OVERRIDE_SERVER_PATH if defined# must be consistent with the install_dir in server/meson.build-conf.set_quoted('PREFIXED_SERVER_JAR', '/share/scrcpy/scrcpy-server.jar')+conf.set_quoted('PREFIXED_SERVER_PATH', '/share/scrcpy/scrcpy-server.jar')# the path of the server to be used "as is"# this is useful for building a "portable" version (with the server in the same# directory as the client)-override_server_jar = get_option('override_server_jar')-if override_server_jar != ''- conf.set_quoted('OVERRIDE_SERVER_JAR', override_server_jar)+override_server_path = get_option('override_server_path')+if override_server_path != ''+ conf.set_quoted('OVERRIDE_SERVER_PATH', override_server_path)else# undefine it- conf.set('OVERRIDE_SERVER_JAR', false)+ conf.set('OVERRIDE_SERVER_PATH', false)endif# the default client TCP port for the "adb reverse" tunneldiff --git a/app/src/server.c b/app/src/server.cindex a4cba260..18388a93 100644--- a/app/src/server.c+++ b/app/src/server.c@@ -11,16 +11,16 @@#define SOCKET_NAME "scrcpy"-#ifdef OVERRIDE_SERVER_JAR-# define DEFAULT_SERVER_JAR OVERRIDE_SERVER_JAR+#ifdef OVERRIDE_SERVER_PATH+# define DEFAULT_SERVER_PATH OVERRIDE_SERVER_PATH#else-# define DEFAULT_SERVER_JAR PREFIX PREFIXED_SERVER_JAR+# define DEFAULT_SERVER_PATH PREFIX PREFIXED_SERVER_PATH#endifstatic const char *get_server_path(void) {- const char *server_path = getenv("SCRCPY_SERVER_JAR");+ const char *server_path = getenv("SCRCPY_SERVER_PATH");if (!server_path) {- server_path = DEFAULT_SERVER_JAR;+ server_path = DEFAULT_SERVER_PATH;}return server_path;}diff --git a/meson_options.txt b/meson_options.txtindex 7900a82b..ce3fdb49 100644--- a/meson_options.txt+++ b/meson_options.txt@@ -1,5 +1,5 @@option('build_app', type: 'boolean', value: true, description: 'Build the client')option('build_server', type: 'boolean', value: true, description: 'Build the server')option('prebuilt_server', type: 'string', description: 'Path of the prebuilt server')-option('override_server_jar', type: 'string', description: 'Hardcoded path to find the server at runtime')+option('override_server_path', type: 'string', description: 'Hardcoded path to find the server at runtime')option('skip_frames', type: 'boolean', value: true, description: 'Always display the most recent frame')diff --git a/run b/runindex b7a97d25..7abeca05 100755--- a/run+++ b/run@@ -20,4 +20,4 @@ thenexit 1fi-SCRCPY_SERVER_JAR="$BUILDDIR/server/scrcpy-server.jar" "$BUILDDIR/app/scrcpy" "$@"+SCRCPY_SERVER_PATH="$BUILDDIR/server/scrcpy-server.jar" "$BUILDDIR/app/scrcpy" "$@"diff --git a/scripts/run-scrcpy.sh b/scripts/run-scrcpy.shindex 62ff9b95..fa6d7c8f 100755--- a/scripts/run-scrcpy.sh+++ b/scripts/run-scrcpy.sh@@ -1,2 +1,2 @@#!/bin/bash-SCRCPY_SERVER_JAR="$MESON_BUILD_ROOT/server/scrcpy-server.jar" "$MESON_BUILD_ROOT/app/scrcpy"+SCRCPY_SERVER_PATH="$MESON_BUILD_ROOT/server/scrcpy-server.jar" "$MESON_BUILD_ROOT/app/scrcpy"