Rename the server scrcpy-server.jar

The server is built as an APK to simplify the build, but in fact this is
a simple jar (it is not even signed).

In order to avoid confusion, rename it to .jar, so that users do not try
to "adb install" it.

Also rename it from "scrcpy" to "scrcpy-server" to distinguish from the
client-side.
This commit is contained in:
Romain Vimont 2018-02-02 09:31:44 +01:00
parent 2172c53b7b
commit 1faf6cfd9d
2 changed files with 7 additions and 7 deletions

View file

@ -27,8 +27,8 @@ build-server:
dist: build-server build-app dist: build-server build-app
mkdir -p "$(DIST)/$(TARGET_DIR)" mkdir -p "$(DIST)/$(TARGET_DIR)"
# no need to sign the APK, we dont "install" it # no need to sign the APK, we dont "install" it, this is in fact a simple jar
cp server/build/outputs/apk/release/server-release-unsigned.apk "$(DIST)/$(TARGET_DIR)/scrcpy.apk" cp server/build/outputs/apk/release/server-release-unsigned.apk "$(DIST)/$(TARGET_DIR)/scrcpy-server.jar"
cp $(APP_BUILD_DIR)/scrcpy "$(DIST)/$(TARGET_DIR)/" cp $(APP_BUILD_DIR)/scrcpy "$(DIST)/$(TARGET_DIR)/"
dist-zip: dist dist-zip: dist

View file

@ -7,11 +7,11 @@
#define SOCKET_NAME "scrcpy" #define SOCKET_NAME "scrcpy"
process_t push_server(const char *serial) { process_t push_server(const char *serial) {
const char *apk_path = getenv("SCRCPY_APK"); const char *server_path = getenv("SCRCPY_SERVER_JAR");
if (!apk_path) { if (!server_path) {
apk_path = "scrcpy.apk"; server_path = "scrcpy-server.jar";
} }
return adb_push(serial, apk_path, "/data/local/tmp/scrcpy.apk"); return adb_push(serial, server_path, "/data/local/tmp/scrcpy-server.jar");
} }
process_t enable_tunnel(const char *serial, Uint16 local_port) { process_t enable_tunnel(const char *serial, Uint16 local_port) {
@ -29,7 +29,7 @@ process_t start_server(const char *serial, Uint16 max_size, Uint32 bit_rate) {
sprintf(bit_rate_string, "%"PRIu32, bit_rate); sprintf(bit_rate_string, "%"PRIu32, bit_rate);
const char *const cmd[] = { const char *const cmd[] = {
"shell", "shell",
"CLASSPATH=/data/local/tmp/scrcpy.apk", "CLASSPATH=/data/local/tmp/scrcpy-server.jar",
"app_process", "app_process",
"/", // unused "/", // unused
"com.genymobile.scrcpy.ScrCpyServer", "com.genymobile.scrcpy.ScrCpyServer",