diff --git a/app/src/capture.c b/app/src/capture.c index 509d3c6c..5b263a61 100644 --- a/app/src/capture.c +++ b/app/src/capture.c @@ -113,7 +113,7 @@ static bool in_frame_to_png( LOGV("Scaling image: %llu", get_timestamp() - start); av_dict_set(&rgbFrame->metadata, - "Software", "scrcpy/" SCRCPY_VERSION, 0); + "Software", "scrcpy/" MOBOT_VERSION, 0); AVCodec *outCodec = avcodec_find_encoder(AV_CODEC_ID_PNG); if (!outCodec) { diff --git a/app/src/main.c b/app/src/main.c index 50505dd8..5be58015 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -15,7 +15,7 @@ static void print_version(void) { - fprintf(stderr, "scrcpy %s (with Mobot extensions)\n\n", SCRCPY_VERSION); + fprintf(stderr, "scrcpy %s\nMobot version %s\n\n", SCRCPY_VERSION, MOBOT_VERSION); fprintf(stderr, "dependencies:\n"); fprintf(stderr, " - SDL %d.%d.%d\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, diff --git a/mobot.mk b/mobot.mk index 17e9e1bf..a13082e5 100644 --- a/mobot.mk +++ b/mobot.mk @@ -26,6 +26,9 @@ ifeq ($(OS),Darwin) -Wl,-liconv endif +GIT_DESCRIBE := $(shell git describe) +ARCH := $(shell gcc -dumpmachine) + build-ffmpeg: git clone https://github.com/team-mobot/FFmpeg.git build-ffmpeg @@ -49,6 +52,7 @@ $(AVLIBS): build-ffmpeg make install-libs install-headers build-app: $(AVLIBS) + CFLAGS="-DMOBOT_VERSION='\"$(GIT_DESCRIBE)/$(ARCH)\"'" \ LDFLAGS="-Wl,-lm -Wl,-lpthread $(MAC_LDFLAGS)" \ meson build-app --buildtype release --strip -Db_lto=true \ -Dlocal_libav=$(AVDIR) \