1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00

Separate _ICON usage from icon.rc

The Makefile was incorrectly tying together _ICON and icon.rc, making it
impossible to use one without the other. To fix this we introduce a new
DEP_ICON_RC flag, which indicates we need to use the icon.rc file (in
addition to regular icon support). DEP_ICON now only indicates we need
to support _ICON, and does not attempt to build the resource
information.
This commit is contained in:
Matthew Kilgore 2022-05-01 03:40:53 -04:00
parent 0fa4fc15ea
commit 2a4b637412
2 changed files with 9 additions and 4 deletions

View file

@ -177,15 +177,20 @@ else
QBLIB_NAME := $(addsuffix 0,$(QBLIB_NAME))
endif
ifneq ($(filter y,$(DEP_ICON)),)
ifneq ($(filter y,$(DEP_ICON_RC) $(DEP_ICON)),)
CXXFLAGS += -DDEPENDENCY_ICON
EXE_OBJS += $(ICON_OBJ)
QBLIB_NAME := $(addsuffix 1,$(QBLIB_NAME))
else
CXXFLAGS += -DDEPENDENCY_NO_ICON
QBLIB_NAME := $(addsuffix 0,$(QBLIB_NAME))
endif
ifneq ($(filter y,$(DEP_ICON_RC)),)
ifeq ($(OS),win)
EXE_OBJS += $(ICON_OBJ)
endif
endif
ifneq ($(filter y,$(DEP_SCREENIMAGE)),)
CXXFLAGS += -DDEPENDENCY_SCREENIMAGE
QBLIB_NAME := $(addsuffix 1,$(QBLIB_NAME))
@ -277,7 +282,7 @@ ifeq ($(OS),win)
CXXLIBS += -lwinmm -lksguid -ldxguid -lole32
endif
ifneq ($(filter y,$(DEP_ICON) $(DEP_SCREENIMAGE) $(DEP_PRINTER)),)
ifneq ($(filter y,$(DEP_ICON) $(DEP_ICON_RC) $(DEP_SCREENIMAGE) $(DEP_PRINTER)),)
CXXLIBS += -lgdi32
endif
endif

View file

@ -12510,7 +12510,7 @@ IF DEPENDENCY(DEPENDENCY_ZLIB) THEN makedeps$ = makedeps$ + " DEP_ZL
IF inline_DATA = 0 AND DataOffset THEN makedeps$ = makedeps$ + " DEP_DATA=y"
IF Console THEN makedeps$ = makedeps$ + " DEP_CONSOLE=y"
IF ExeIconSet OR VersionInfoSet THEN makedeps$ = makedeps$ + " DEP_ICON=y"
IF ExeIconSet OR VersionInfoSet THEN makedeps$ = makedeps$ + " DEP_ICON_RC=y"
makeline$ = make$ + makedeps$ + " EXE=" + QuotedFilename$(path.exe$ + file$ + extension$)