Hi Ricci,
of course, you are right! As I write, the problem can be demos program.
I give you my kwnoledge.
There are two types of resource compiler: windres and rcc.
The first must used with HMG3 and the second with HMG4. With HMG4 (it use HbQt) we must add a .qrc file to the end of .hbp (in this way harbour can create a little source with function to register images); this can be a problem because HMG have its image and the end user can have other, but the problem from now can be for HMG3.
Now I write about HMG3 only.
Hbmk2 (harbour/mingw) can handle windres object file, in this way:
HBMK2 -o<FileName> <HrbFlags> <GccFlags> <OtherOpt> -lhmg -lvfw32 -lmsvfw32 <Source> <ResCompiled>
in <ResCompiled> we can assign the resources file name compiled with WindRes.
Normally, we assign at <ResCompiled> "hmg.o" value;
but if I have other resource how can I do?
Well, in my case I can have: a standard set of icons and image and a customized set.
For this reason, I must create a new compiled resource file. This it's a little piece of my batch command.
Note: L3WRES if == 0 I dont' want standard set and L3WRESFILE is the standard.rc file, but I can have or not a localized set (cusimage.rc). Normally, HMGRESFILE is set to hmg.o
Code: Select all
IF %L3WRES%==0 IF NOT EXIST cusimage.rc GOTO compila
ECHO #define HMGRPATH %HMGPATH%\RESOURCES > %RESHEADER%
IF %L3WRES%==1 ECHO #define L3WRPATH %L3WRESPATH% >> %RESHEADER%
IF %L3WRES%==1 IF EXIST cusimage.rc COPY /b %HMGPATH%\resources\hmg.rc+cusimage.rc+%L3WRESFILE%+%HMGPATH%\resources\filler %TMPRES% >NUL
IF %L3WRES%==1 IF NOT EXIST cusimage.rc COPY /b %HMGPATH%\resources\hmg.rc+%L3WRESFILE%+%HMGPATH%\resources\filler %TMPRES% >NUL
IF %L3WRES%==0 IF EXIST cusimage.rc COPY /b %HMGPATH%\resources\hmg.rc+cusimage.rc+%HMGPATH%\resources\filler %TMPRES% >NUL
windres -i %TMPRES% -o _temp.o > %WRESLOG% 2>&1
IF ERRORLEVEL 1 GOTO error03
SET HMGRESFILE=_temp.o
:compila
SET PRGFLAG=-prgflag=-q -es2 %WLEV%
HBMK2 -o<FileName> <HrbFlags> <GccFlags> <OtherOpt> -lhmg -lvfw32 -lmsvfw32 -lhmg -lvfw32 -lmsvfw32 %1 %HMGRESFILE% > %HRBLOG% 2>&1
IF ERRORLEVEL 1 GOTO error04
And work fine, with some changes I can compile HMG4 programs.
My question was - perhaps English not good - if HMG insert the resource file hmg.o inside some .hbc or .hbp file, Can I have duplicated? Can I have errors?
Of course, current buildapp.bat it's no good, but I think it's not a good strategy insert hmg.o in any .hbc or .hbp file. If this will be done, -perhaps- I must crack MiniGui installation files.
On the other hand, I think HMG must remove MINGW directory and include a complete version of Harbour (without cleanup): it contain (harbour\comp\...) the MinGw compiler (works fine with HMG3 and HMG4). With my batch file I can use Harbour MinGw or official MinGw installation, but I don't use Hmg Harbour/MinGw.
That's all folk.
Cheers