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.
This commit is contained in:
Romain Vimont
2018-02-16 15:19:35 +01:00
parent 60f3185185
commit 089378926b
6 changed files with 15 additions and 15 deletions

View File

@@ -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
#endif
static 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;
}