Define MOBOT_VERSION = git describe / gcc -dumpmachine

This commit is contained in:
Frank Leon Rose 2021-04-13 14:13:19 -04:00
parent 403c4e75ba
commit 29297758cf
3 changed files with 6 additions and 2 deletions

View file

@ -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) {

View file

@ -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,

View file

@ -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) \