Skip to content

Add Windows Exe Icon #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CFLAGS:=${CFLAGS} $(shell sdl2-config --cflags) -DSYSTEM_VOLUME_MIXER_AVAILABLE=

ifeq (${OS},Windows_NT)
WINDRES:=windres
# RES:=sm.res
RES:=smw.res
SDLFLAGS:=-Wl,-Bstatic $(shell sdl2-config --static-libs)
else
SDLFLAGS:=$(shell sdl2-config --libs) -lm
Expand All @@ -24,9 +24,9 @@ $(TARGET_EXEC): $(OBJS) $(RES)
%.o : %.c
$(CC) -c $(CFLAGS) $< -o $@

#$(RES): src/platform/win32/smw.rc
# @echo "Generating Windows resources"
# @$(WINDRES) $< -O coff -o $@
$(RES): src/platform/win32/smw.rc
@echo "Generating Windows resources"
@$(WINDRES) $< -O coff -o $@

smw_assets.dat:
@echo "Extracting game resources"
Expand Down
Binary file added src/platform/win32/smw.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions src/platform/win32/smw.rc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

1 TEXTINCLUDE
BEGIN
"platform\\win32\\resource.h\0"
"src\\platform\\win32\\resource.h\0"
END

2 TEXTINCLUDE
Expand All @@ -52,7 +52,7 @@ END

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "platform\\win32\\triforce.ico"
IDI_ICON1 ICON "src\\platform\\win32\\smw.ico"

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
Expand Down