diff --git a/Makefile b/Makefile index 17977fc..daf1321 100644 --- a/Makefile +++ b/Makefile @@ -55,12 +55,16 @@ ifeq ($(TARGET),) endif endif +COMMIT_COUNT := $(shell git rev-list --count master) +ifneq ($(COMMIT_COUNT),) + CFLAGS_G += -DFLIPS_COMMIT_COUNT=$(COMMIT_COUNT) +endif + ifeq ($(TARGET),windows) ifneq (,$(filter $(CXX),cl cl.exe)) override CFLAGS_windows := $(CFLAGS_windows_base) LFLAGS += $(LFLAGS_windows_msvc) endif - endif ifeq ($(TARGET),gtk) diff --git a/README.md b/README.md index 8b19e8e..a037484 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Features: - Can remembers which ROMs you've used, and use them again if it thinks it's correct (BPS only, GUI only) - Can launch other programs after patching the ROMs; together with the above, this allows you to double click a BPS to launch an emulator (GUI only) -Floating IPS is in maintenance mode. Bug reports and pull requests will be read, but feature requests are unlikely to be implemented. Releases are automated for every commit, meaning the release schedule is highly erratic. You can find them [at the release page](https://github.com/Alcaro/Flips/releases). +Floating IPS is in maintenance mode. Bug reports and pull requests will be read, but feature requests are unlikely to be implemented. Releases are automated for every commit, meaning the release schedule is highly erratic, and half of the releases are identical (because the commit only updated readme or comments). You can find them [at the release page](https://github.com/Alcaro/Flips/releases). Alternatively, Linux users can also download binaries from [Flathub](https://flathub.org/apps/com.github.Alcaro.Flips). Third-party forks, or separate tools, covering usecases this version doesn't (this only acknowledges their existence, and is not an endorsement; I haven't used most of them): diff --git a/flips.h b/flips.h index b1e0bea..2017af0 100644 --- a/flips.h +++ b/flips.h @@ -34,7 +34,13 @@ //#define EXTERN_C //#endif +#ifdef FLIPS_COMMIT_COUNT +#define STR_(x) #x +#define STR(x) STR_(x) +#define flipsversion "Floating IPS v" STR(FLIPS_COMMIT_COUNT) +#else #define flipsversion "Floating IPS" +#endif #if defined(FLIPS_WINDOWS)