diff --git a/Cocoa/Info.plist b/Cocoa/Info.plist index 97e197d..385b373 100644 --- a/Cocoa/Info.plist +++ b/Cocoa/Info.plist @@ -130,7 +130,7 @@ LSMinimumSystemVersion 10.9 NSHumanReadableCopyright - Copyright © 2015-2022 Lior Halphon + Copyright © 2015-@COPYRIGHT_YEAR Lior Halphon NSMainNibFile MainMenu NSPrincipalClass diff --git a/Cocoa/License.html b/Cocoa/License.html index c6db03e..16c26a9 100644 --- a/Cocoa/License.html +++ b/Cocoa/License.html @@ -30,7 +30,7 @@

SameBoy

MIT License

-

Copyright © 2015-2022 Lior Halphon

+

Copyright © 2015-@COPYRIGHT_YEAR Lior Halphon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index 334e21d..672fb71 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ MAKECMDGOALS := $(DEFAULT) endif include version.mk +COPYRIGHT_YEAR := $(shell grep -oE "20[2-9][0-9]" LICENSE) export VERSION CONF ?= debug @@ -126,7 +127,7 @@ endif CFLAGS += $(WARNINGS) -CFLAGS += -std=gnu11 -D_GNU_SOURCE -DGB_VERSION='"$(VERSION)"' -I. -D_USE_MATH_DEFINES +CFLAGS += -std=gnu11 -D_GNU_SOURCE -DGB_VERSION='"$(VERSION)"' -DGB_COPYRIGHT_YEAR='"$(COPYRIGHT_YEAR)"' -I. -D_USE_MATH_DEFINES ifneq (,$(UPDATE_SUPPORT)) CFLAGS += -DUPDATE_SUPPORT endif @@ -330,8 +331,8 @@ $(BIN)/SameBoy.app: $(BIN)/SameBoy.app/Contents/MacOS/SameBoy \ Shaders $(MKDIR) -p $(BIN)/SameBoy.app/Contents/Resources cp Cocoa/*.icns Cocoa/*.png Misc/registers.sym $(BIN)/SameBoy.app/Contents/Resources/ - sed s/@VERSION/$(VERSION)/ < Cocoa/Info.plist > $(BIN)/SameBoy.app/Contents/Info.plist - cp Cocoa/License.html $(BIN)/SameBoy.app/Contents/Resources/Credits.html + sed "s/@VERSION/$(VERSION)/;s/@COPYRIGHT_YEAR/$(COPYRIGHT_YEAR)/" < Cocoa/Info.plist > $(BIN)/SameBoy.app/Contents/Info.plist + sed "s/@COPYRIGHT_YEAR/$(COPYRIGHT_YEAR)/" < Cocoa/License.html > $(BIN)/SameBoy.app/Contents/Resources/Credits.html $(MKDIR) -p $(BIN)/SameBoy.app/Contents/Resources/Shaders cp Shaders/*.fsh Shaders/*.metal $(BIN)/SameBoy.app/Contents/Resources/Shaders $(MKDIR) -p $(BIN)/SameBoy.app/Contents/Library/QuickLook/ @@ -358,7 +359,7 @@ $(BIN)/SameBoy.qlgenerator: $(BIN)/SameBoy.qlgenerator/Contents/MacOS/SameBoyQL $(BIN)/SameBoy.qlgenerator/Contents/Resources/cgb_boot_fast.bin $(MKDIR) -p $(BIN)/SameBoy.qlgenerator/Contents/Resources cp QuickLook/*.png $(BIN)/SameBoy.qlgenerator/Contents/Resources/ - sed s/@VERSION/$(VERSION)/ < QuickLook/Info.plist > $(BIN)/SameBoy.qlgenerator/Contents/Info.plist + sed "s/@VERSION/$(VERSION)/;s/@COPYRIGHT_YEAR/$(COPYRIGHT_YEAR)/" < QuickLook/Info.plist > $(BIN)/SameBoy.qlgenerator/Contents/Info.plist ifeq ($(CONF), release) $(CODESIGN) $@ endif @@ -401,11 +402,11 @@ $(BIN)/SDL/sameboy_debugger.exe: $(CORE_OBJECTS) $(SDL_OBJECTS) $(OBJ)/Windows/r ifneq ($(USE_WINDRES),) $(OBJ)/%.o: %.rc -@$(MKDIR) -p $(dir $@) - windres --preprocessor cpp -DVERSION=\"$(VERSION)\" $^ $@ + windres --preprocessor cpp -DVERSION=\"$(VERSION)\" -DCOPYRIGHT_YEAR=\"$(COPYRIGHT_YEAR)\" $^ $@ else $(OBJ)/%.res: %.rc -@$(MKDIR) -p $(dir $@) - rc /fo $@ /dVERSION=\"$(VERSION)\" $^ + rc /fo $@ /dVERSION=\"$(VERSION)\" /dCOPYRIGHT_YEAR=\"$(COPYRIGHT_YEAR)\" $^ %.o: %.res cvtres /OUT:"$@" $^ diff --git a/QuickLook/Info.plist b/QuickLook/Info.plist index dffbee8..5fc5943 100644 --- a/QuickLook/Info.plist +++ b/QuickLook/Info.plist @@ -48,7 +48,7 @@ CFPlugInUnloadFunction NSHumanReadableCopyright - Copyright © 2015-2022 Lior Halphon + Copyright © 2015-@COPYRIGHT_YEAR Lior Halphon QLNeedsToBeRunInMainThread QLPreviewHeight diff --git a/SDL/gui.c b/SDL/gui.c index 25aea2e..9151913 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -95,7 +95,7 @@ static const char *help[] = { "\n" "SameBoy\n" "Version " GB_VERSION "\n\n" -"Copyright " COPYRIGHT_STRING " 2015-2022\n" +"Copyright " COPYRIGHT_STRING " 2015-" GB_COPYRIGHT_YEAR "\n" "Lior Halphon\n\n" "Licensed under the MIT\n" "license, see LICENSE for\n" diff --git a/Windows/resources.rc b/Windows/resources.rc index 73c1213..7fd16ed 100644 Binary files a/Windows/resources.rc and b/Windows/resources.rc differ