HMG 3.0.36 (Test)

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

Roberto Lopez wrote:Continue...
Ok.

From the IDE part I could eliminate the .hbc thing.

This way the user could 'construct' a command line suiting his own needs and save it for a particular project, in the case that any customization be required.

So, we should have ONLY ONE configuration file, loaded automatically by hbmk2 and user's customizations to their projects, sent directly to hbmk2, making all the build process transparent for us.

So, we take care for standard configuration and the users for the customizations, invoking for that, hbmk2 directly.

What do you think?

The End.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.36 (Test)

Post by Rathinagiri »

Yes, that would be great Roberto. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

rathinagiri wrote:Yes, that would be great Roberto. :)
Ok. :)

Some considerations...

My main motivation for this proposition is that future changes on hbmk2 or Harbour distribution do not affect HMG (or do it minimally). This is the reason because I'm changing my mind about build batch file and IDE´s way to calling and handling communication with hbmk2.

I've started experimentation.

I've noted that current hmg.hbc file has two extra lines.

In fact, if you remove lines #3 and #4 it still working fine.

Moving this file to /harbour/bin and renaming it to hbmk.hbc, generates a linker error: "cannot find -lnbmk".

Any ideas?
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

Roberto Lopez wrote: Moving this file to /harbour/bin and renaming it to hbmk.hbc, generates a linker error: "cannot find -lnbmk".

Any ideas?
If no solution appears, we could left hmg.hbc file in hmg root and call it from hbmk2 invoke line from batch.

The effect should be the same...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

Roberto Lopez wrote: If no solution appears, we could left hmg.hbc file in hmg root and call it from hbmk2 invoke line from batch.
The effect should be the same...
Well... I've read the hbmk2 help file, made some 'try and error' test and...

This is my proposition for .37 build system:

1. We should change the hmg.hbc file located at HMG root folder with thw following:

Code: Select all

incpaths=/.
incpaths=include
libpaths=lib
libs=hbmzip.hbc
libs=hbwin.hbc                               
libs=hbct.hbc
libs=${hb_name}${__HB_DYN__}
{win}sources=${hb_curdir}_temp.o
libs=msvfw32.a
libs=vfw32.a
2. We should change thecurrent 'build.bat' with the following:

Code: Select all

@echo off

rem ******************************************************************************
rem SET HMGPATH
rem -----------
rem
rem Using %~dp0 the HMGPATH is automatically set to current (hmg) folder making it
rem portable (zero config)
rem
rem ******************************************************************************

SET HMGPATH=%~dp0

rem ******************************************************************************
rem SET BINARIES PATHS
rem ******************************************************************************

SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\mingw\bin;%PATH%

rem *******************************************************************************
rem SET PROJECT OUTPUT FILE NAME
rem ----------------------------
rem
rem the first parameter is -o%~n1.exe. I've added to it create the 
rem application with the project basename (<projectname.hbp> is the first parameter.
rem
rem *******************************************************************************

rem *******************************************************************************
rem SET DEFAULT CONFIGURATION FILE
rem ------------------------------
rem
rem The second parameter is the hmg.hbc parameter to set config required by hbmk2
rem
rem *******************************************************************************

rem *******************************************************************************
rem SET GUI APPLICATION AS DEFAULT
rem ------------------------------
rem 
rem The third parameter is -gtgui to build a GUI app. by default
rem
rem *******************************************************************************

rem ******************************************************************************
rem COMPILE RESOURCES
rem ******************************************************************************

echo #define HMGRPATH %HmgPath%\RESOURCES > _hmg_resconfig.h
COPY /b %HMGPATH%\resources\hmg.rc+%~n1.rc+%HMGPATH%\resources\filler _temp.rc >NUL
windres -i _temp.rc -o _temp.o

rem ******************************************************************************
rem CALL HBMK2
rem ******************************************************************************

HBMK2 -o%~n1.exe %HMGPATH%\hmg.hbc -gtgui %1 %2 %3 %4 %5 %6 %7 %8  

del _hmg_resconfig.h
del _temp.*

3. We can delete all hbmk.hbm files.

4. As a first test, I will change IDE to call build.bat with ONLY TWO parameters:

Code: Select all

build.bat <project.hbp> <project.hbc>
5. The configuration tab in project browser will be changed to allow direct edit from the user (exactly the same as resources TAB).

6. Then will test it.

What do you think?
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.36 (Test)

Post by Rathinagiri »

Fantastic Roberto!

Now you have cleaned up the mess. :)

The only thing is previously some libraries are linked by default like mysql, sqlite etc., Will that now be added in project.hbc or hmg.hbc?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.36 (Test)

Post by Rathinagiri »

Roberto,

Can you please update IDE and upload?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

rathinagiri wrote:Fantastic Roberto!

Now you have cleaned up the mess. :)
Not at all :)
rathinagiri wrote: The only thing is previously some libraries are linked by default like mysql, sqlite etc., Will that now be added in project.hbc or hmg.hbc?
IMHO they should in hmg.hbc to make the things simpler.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

rathinagiri wrote:Roberto,

Can you please update IDE and upload?
I have a serious problem pending yet with IDE.

In previous hbmk2 versions, I've captured the error messages using the 'redir' utility (redirecting the standard error to the standard output) but with the current one, it does not work anymore.

The usual way hbmk2 ..... >errorl.log does not work either.

So, there is no error handling in IDE anymore.

Is very strange the fact that a very advanced tool as hbmk2 does not have an option to redirect the error messages to a log file.

The source code of hbmk2 is available and it could be easy to modify to generate an errorlog file, but it should be re-done every time that Harbour is updated.

So, if you send to you IDE right now, it will not have error handling at all...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.36 (Test)

Post by Roberto Lopez »

Roberto Lopez wrote:So, if you send to you IDE right now, it will not have error handling at all...
I've solved already.

I'll do some tests and send you...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply