From 89da51f8837c942a3a49bbef22e9d0ec3a0818f3 Mon Sep 17 00:00:00 2001 From: zturtleman Date: Wed, 17 Mar 2021 18:29:24 +0000 Subject: [PATCH] Add ability to change window dedicated server executable icon --- engine/Makefile | 7 ++++++- engine/code/sys/win_resource.rc | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/engine/Makefile b/engine/Makefile index 9eecd038..450dc5a9 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -1330,6 +1330,11 @@ $(echo_cmd) "WINDRES $<" $(Q)$(WINDRES) -i $< -o $@ endef +define DO_DED_WINDRES +$(echo_cmd) "DED_WINDRES $<" +$(Q)$(WINDRES) -DDEDICATED -i $< -o $@ +endef + ############################################################################# # MAIN TARGETS @@ -2829,7 +2834,7 @@ $(B)/ded/%.o: $(SYSDIR)/%.m $(DO_DED_CC) $(B)/ded/win_resource.o: $(SYSDIR)/win_resource.rc $(SYSDIR)/win_manifest.xml - $(DO_WINDRES) + $(DO_DED_WINDRES) $(B)/ded/%.o: $(NDIR)/%.c $(DO_DED_CC) diff --git a/engine/code/sys/win_resource.rc b/engine/code/sys/win_resource.rc index 3c5c3064..e1680382 100644 --- a/engine/code/sys/win_resource.rc +++ b/engine/code/sys/win_resource.rc @@ -53,11 +53,19 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. +#ifdef DEDICATED #ifndef __MINGW32__ IDI_ICON1 ICON DISCARDABLE "../q3r_icon.ico" #else IDI_ICON1 ICON DISCARDABLE "misc/q3r_icon.ico" #endif +#else +#ifndef __MINGW32__ +IDI_ICON1 ICON DISCARDABLE "../quake3.ico" +#else +IDI_ICON1 ICON DISCARDABLE "misc/quake3.ico" +#endif +#endif /////////////////////////////////////////////////////////////////////////////