I want to create two different versions of my application with different icons based on DEFINE. I managed to include various resource files based on the definition, but I can not get rid of the MAINICON in the default .res file of my project.
I added a Version1.rc resource file with the following line:
MAINICON icon "resource\icons\Version1.ico"
But if I try to compile MyProject using the IDE, I always get the following error:
E2161 Duplicate resource: Type 14 (ICON GROUP), ID MAINICON; file Resource C: \ MyProject \ Version1.RES saved; Resource file C: \ MyProject \ MyProject.RES is dropped.
I tried to edit MyProject.res using the resource editor and deleted MAINICON, but delphi automatically seems to recreate the file, including the icon.
source share