Extract "scrcpy-server.jar" string
The filename is used at several places.
This commit is contained in:
parent
eb34098add
commit
4eb6b26c93
1 changed files with 5 additions and 4 deletions
|
@ -11,14 +11,15 @@
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
|
|
||||||
#define SOCKET_NAME "scrcpy"
|
#define SOCKET_NAME "scrcpy"
|
||||||
|
#define SERVER_FILENAME "scrcpy-server.jar"
|
||||||
|
|
||||||
#ifdef PORTABLE
|
#ifdef PORTABLE
|
||||||
# define DEFAULT_SERVER_PATH "scrcpy-server.jar"
|
# define DEFAULT_SERVER_PATH SERVER_FILENAME
|
||||||
#else
|
#else
|
||||||
# define DEFAULT_SERVER_PATH PREFIX "/share/scrcpy/scrcpy-server.jar"
|
# define DEFAULT_SERVER_PATH PREFIX "/share/scrcpy/" SERVER_FILENAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEVICE_SERVER_PATH "/data/local/tmp/scrcpy-server.jar"
|
#define DEVICE_SERVER_PATH "/data/local/tmp/" SERVER_FILENAME
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
get_server_path(void) {
|
get_server_path(void) {
|
||||||
|
@ -86,7 +87,7 @@ execute_server(struct server *server, const struct server_params *params) {
|
||||||
sprintf(bit_rate_string, "%"PRIu32, params->bit_rate);
|
sprintf(bit_rate_string, "%"PRIu32, params->bit_rate);
|
||||||
const char *const cmd[] = {
|
const char *const cmd[] = {
|
||||||
"shell",
|
"shell",
|
||||||
"CLASSPATH=/data/local/tmp/scrcpy-server.jar",
|
"CLASSPATH=/data/local/tmp/" SERVER_FILENAME,
|
||||||
"app_process",
|
"app_process",
|
||||||
"/", // unused
|
"/", // unused
|
||||||
"com.genymobile.scrcpy.Server",
|
"com.genymobile.scrcpy.Server",
|
||||||
|
|
Loading…
Reference in a new issue