Reputation: 1493
In the project properties dialog, on the 'Application' tab, the dropdown for choosing the configuration is disabled; how can I set the icon to be dependent on the build configuration?
Upvotes: 2
Views: 1100
Reputation: 11966
I was able to do this in my game.rc file:
// Microsoft Visual C++ generated resource script.
//
...
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
#if defined(RELEASECHANNEL_DEV)
IDI_ICON1 ICON "game_dev.ico"
#else
IDI_ICON1 ICON "game.ico"
#endif
I believe this file is initially generated for the project, but doesn't seem to be modified again. We use premake to create our VS project and use resincludedirs( { "../resources" } )
to include the directory containing game.rc and game.ico.
Upvotes: 0
Reputation: 5858
Personally, I would change the configuration but remember to change the Icon manually in the Project Properties before compiling for each configuration.
Upvotes: 0
Reputation: 5858
This might shed some light - but I think it's only for VS2010:
application-icon--how-to-select-different-icon-based-on-compiler-directives-32338
Upvotes: 1