Resource compilation can be done with several tools, for example the default BCC compiler is brcc32.exe, but this can also be done with brc32 .exe (an obsolete option) or with Microsoft's rc.exe. It would be possible to modify hbmk2 so that the user can define which tool to use to generate the . res file. The current option -resflag=, which allows adding additional parameters, can be extended with an option -resflag+= which completely replaces any previous parameter, as is done with -cflag+=
i do this:
...
//KDSOFT
IF Upper( GetEnv( "BCC_BIN_RESOURCE" ) ) == "RC.EXE"
cBin_Res := "rc.exe"
cOpt_Res := "{FR} -fo {OS} {IR}"
ELSE
cBin_Res := "brcc32.exe"
cOpt_Res := "{FR} {IR} -fo{OS}"
ENDIF
...
//KDSOFT
IF empty( GetEnv( "
HB_USER_RESFLAGS " ) )
hReplace := { ;
"{FR}" => GetEnv( "HB_USER_RESFLAGS" ) + " " + ArrayToList( hbmk[ _HBMK_aOPTRES ] ), ;
"{DI}" => FNameEscape( hbmk[ _HBMK_cHB_INSTALL_INC ], nOpt_Esc, nOpt_FNF ) }
ELSE
hReplace := { ;
"{FR}" => GetEnv( "HB_USER_RESFLAGS" ) + " ", ;
"{DI}" => FNameEscape( hbmk[ _HBMK_cHB_INSTALL_INC ], nOpt_Esc, nOpt_FNF ) }
ENDIF