Add Icon to windows build (#96)

This commit is contained in:
mjcox244 2022-05-20 00:33:17 +01:00 committed by GitHub
parent a1ac136258
commit f63bffc64c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View File

@ -64,6 +64,8 @@ DOCKERBUILD ?= 0
DEBUG_INFO_LEVEL ?= 2 DEBUG_INFO_LEVEL ?= 2
# Enable profiling # Enable profiling
PROFILE ?= 0 PROFILE ?= 0
# Enable Game ICON
ICON ?= 1
# Various workarounds for weird toolchains # Various workarounds for weird toolchains
@ -891,6 +893,19 @@ else
# endif # endif
endif endif
#icon
ifeq ($(WINDOWS_BUILD),1)
ifeq ($(ICON),1)
Command := mkdir $(BUILD_DIR)/res
Resp := $(shell $(call Command))
Command := windres -o "$(BUILD_DIR)/res/icon.o" -i res/icon.rc
Resp := $(shell $(call Command))
LDFLAGS += $(BUILD_DIR)/res/icon.o
endif
endif
# Coop specific libraries # Coop specific libraries
# Lua # Lua
@ -1093,6 +1108,8 @@ endef
# Main Targets # # Main Targets #
#==============================================================================# #==============================================================================#
ifeq ($(EXTERNAL_DATA),1) ifeq ($(EXTERNAL_DATA),1)
BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/$(BASEPACK) BASEPACK_PATH := $(BUILD_DIR)/$(BASEDIR)/$(BASEPACK)
@ -1545,4 +1562,4 @@ MAKEFLAGS += --no-builtin-rules
-include $(DEP_FILES) -include $(DEP_FILES)
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true

BIN
res/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

1
res/icon.rc Normal file
View File

@ -0,0 +1 @@
id ICON res/icon.ico