request for hbmk2 in harbour

67 views
Skip to first unread message

carloskds

unread,
Sep 12, 2025, 8:37:08 PM (8 days ago) Sep 12
to Harbour Users
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+=

carloskds

unread,
Sep 12, 2025, 8:41:20 PM (8 days ago) Sep 12
to Harbour Users
i do this:

         //KDSOFT cBin_Res := "brcc32.exe"
         //KDSOFT cOpt_Res := "{FR} {IR} -fo{OS}"
         cBin_Res := "rc.exe"
         cOpt_Res := "{FR} -fo {OS} {IR}"  

...
         //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
 
but the best thing is that hbmk2 already includes these changes, making it possible to change cBin_Res from the same .hbp with a macro, as well as making the includes that are added as default parameters optional.
Reply all
Reply to author
Forward
0 new messages