Don't hardcode the version number in the about dialog
Update the Makefile to use git describe to get the version number and define that as a macro that about.c can use.
This commit is contained in:
@@ -4,10 +4,12 @@
|
|||||||
# Credit to Tom Tromey and Paul D. Smith:
|
# Credit to Tom Tromey and Paul D. Smith:
|
||||||
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
|
||||||
|
|
||||||
|
VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
|
||||||
DEPDIR := .deps
|
DEPDIR := .deps
|
||||||
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
|
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
|
||||||
|
|
||||||
CFLAGS := -Wall -Werror -ggdb -fno-omit-frame-pointer -O2 -D_FORTIFY_SOURCE=2
|
CFLAGS := -Wall -Werror -ggdb -fno-omit-frame-pointer -O2 -D_FORTIFY_SOURCE=2
|
||||||
|
CFLAGS += -DVERSION=\"$(VERSION)\"
|
||||||
|
|
||||||
PKG_CONFIG=pkg-config
|
PKG_CONFIG=pkg-config
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ void activate_about(
|
|||||||
gtk_show_about_dialog(
|
gtk_show_about_dialog(
|
||||||
w,
|
w,
|
||||||
"program-name", "ALSA Scarlett Gen 2/3 Control Panel",
|
"program-name", "ALSA Scarlett Gen 2/3 Control Panel",
|
||||||
"version", "Version 0.1",
|
"version", "Version " VERSION,
|
||||||
"comments", "GTK4 interface to the ALSA Scarlett Gen 2/3 Mixer controls",
|
"comments", "GTK4 interface to the ALSA Scarlett Gen 2/3 Mixer controls",
|
||||||
"website", "https://github.com/geoffreybennett/alsa-scarlett-gui",
|
"website", "https://github.com/geoffreybennett/alsa-scarlett-gui",
|
||||||
"copyright", "Copyright 2022 Geoffrey D. Bennett",
|
"copyright", "Copyright 2022 Geoffrey D. Bennett",
|
||||||
@@ -29,4 +29,3 @@ void activate_about(
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user