Add an application icon for Windows

The Windows icon is embedded into the executable. It's the same as under
Unix platforms, just converted into .ico.
This commit is contained in:
Yamagi Burmeister 2012-06-11 11:13:10 +02:00
parent 2c0148bab5
commit 1f6d0282ee
4 changed files with 21 additions and 4 deletions

View file

@ -185,11 +185,27 @@ endif
# ----------
# Phony targets
.PHONY : all client game icon refresher server
# ----------
# Builds everything
all: client server refresher game
# ----------
# Special target to compile
# the icon on Windows
ifeq ($(OSTYPE), Windows)
icon:
@echo "===> WR build/icon/icon.res"
${Q}stuff/misc/mkdir -p build/icon
${Q}windres stuff\icon\icon.rc -O COFF -o build\icon\icon.res
endif
# ----------
# Cleanup
ifeq ($(OSTYPE), Windows)
clean:
@ -641,9 +657,9 @@ GAME_DEPS= $(GAME_OBJS:.o=.d)
# release/quake2
ifeq ($(OSTYPE), Windows)
release/quake2.exe : $(CLIENT_OBJS)
release/quake2.exe : $(CLIENT_OBJS) icon
@echo "===> LD $@"
${Q}$(CC) $(CLIENT_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
${Q}$(CC) build/icon/icon.res $(CLIENT_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
else
release/quake2 : $(CLIENT_OBJS)
@echo "===> LD $@"
@ -652,9 +668,9 @@ endif
# release/q2ded
ifeq ($(OSTYPE), Windows)
release/q2ded.exe : $(SERVER_OBJS)
release/q2ded.exe : $(SERVER_OBJS) icon
@echo "===> LD $@.exe"
${Q}$(CC) $(SERVER_OBJS) $(LDFLAGS) -o $@
${Q}$(CC) build/icon/icon.res $(SERVER_OBJS) $(LDFLAGS) -o $@
else
release/q2ded : $(SERVER_OBJS)
@echo "===> LD $@"

BIN
stuff/icon/Quake2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

1
stuff/icon/icon.rc Normal file
View file

@ -0,0 +1 @@
id ICON "stuff/icon/Quake2.ico"