request for hbmk2

97 views
Skip to first unread message

carloskds

unread,
Sep 16, 2025, 2:16:00 PMSep 16
to Harbour Developers
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

Aleksander Czajczynski

unread,
Oct 16, 2025, 4:30:45 PM (2 days ago) Oct 16
to harbou...@googlegroups.com
Hello!

I suppose, finest solution to this scenario would be to allow hbmk2 plugin to override default resource compiler. Could be useful for LLVM/Clang/GNU/Win mixed environments if someone has a favourite out of windres, llvm-rc, rc for example

Best regards, Aleksander
Reply all
Reply to author
Forward
0 new messages