HMG 3.0.0 (Forum Test VII)

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

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 3905
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 15 times
Been thanked: 140 times

Re: HMG 3.0.0 (Forum Test VII)

Post by Roberto Lopez » Thu Oct 22, 2009 12:08 pm

esgici wrote:Hi Maestro
Roberto Lopez wrote: - Modified: HMG installation is portable now, so it could be installed
in a different folder than c:\hmg and work without need to reconfigure.
This is correct when <working dir> is under <hmg_root_dir> :(

Sorry; but this isn't an unexpected test. All my <work_dirs> are in drive D: :(

Best Regards

--

Esgici
I've installed at d:\experiment\hmg and it still working...

What exactly had you done?

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
esgici
Posts: 4439
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 323 times
Been thanked: 99 times
Contact:

Post by esgici » Thu Oct 22, 2009 12:32 pm

Roberto Lopez wrote: Theoretically, now it is possible to install hmg at any place and make it work out of the box. If not, please, report.
I'm working a directory out of HMG box. Say HMG is installed on c:\hmg and I'm working in d:\hmg\test\bmicalc.

In that situation compiling is unsuccessful both with IDE and build.bat

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D

User avatar
Roberto Lopez
HMG Founder
Posts: 3905
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 15 times
Been thanked: 140 times

Post by Roberto Lopez » Thu Oct 22, 2009 1:59 pm

esgici wrote:
Roberto Lopez wrote: Theoretically, now it is possible to install hmg at any place and make it work out of the box. If not, please, report.
I'm working a directory out of HMG box. Say HMG is installed on c:\hmg and I'm working in d:\hmg\test\bmicalc.

In that situation compiling is unsuccessful both with IDE and build.bat

Best Regards

--

Esgici
You are right.

I'll retire Test VII until rethink the problem.

Thanks a lot.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3905
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 15 times
Been thanked: 140 times

Post by Roberto Lopez » Thu Oct 22, 2009 2:49 pm

esgici wrote:
Roberto Lopez wrote: Theoretically, now it is possible to install hmg at any place and make it work out of the box. If not, please, report.
I'm working a directory out of HMG box. Say HMG is installed on c:\hmg and I'm working in d:\hmg\test\bmicalc.

In that situation compiling is unsuccessful both with IDE and build.bat

Best Regards

--

Esgici
Please, remove batch folder and copy this new this build.bat in the HMG root folder:

Code: Select all

@echo off

cls

rem ***************************************************************************
rem HMG 3.0 Build batch 
rem Roberto Lopez (2009.10.22)
rem ***************************************************************************

rem ***************************************************************************
rem Set variables
rem ***************************************************************************

Set HmgPath=%~dp0

Set Path=%HmgPath%\util;%HmgPath%\mingw\bin;%HmgPath%\harbour\bin;

Set Resources=%HmgPath%\resources\minigui.o

set GT=-gtgui
set DEBUG=""
set BUILDTYPE=""
set REBUILDALL=""
set RUN=.T.
set MT=

rem ***************************************************************************
rem
rem Syntax:
rem
rem	Build [/i|/r|/d|/cs|/ci/cr] <PrgFile> | <filelist.hbp> [config.hbc]
rem	
rem	[/i] : incremental build
rem	[/r] : incremental build (rebuild all)
rem
rem	[/cs] : Console/mixed mode (std build)
rem	[/ci] : Console/mixed mode (incremental build)
rem	[/cr] : Console/mixed mode (incremental rebuild all)
rem
rem	[/d] : Debug mode (gui and console)
rem	
rem
rem	<filelist.hbm> : A text file with .hbp extension containing a source list
rem	<configfile.hbc>: A text file with configuration parameters as additional
rem	libs, include paths and lib paths.
rem 
rem		<configfile.hbc> Syntax:
rem 
rem		incpaths = incpath1 incpath2 ... incpathn
rem                   
rem		libpaths = libpath1 libpath2 ... libpathn
rem 
rem		libs = lib1 lib2 ... libn
rem
rem	- library names must not include 'lib' prefix nor '.a' extension.
rem
rem	- build.bat will create an 'error.log' file in the app folder when build
rem	process ends with an error condition.
rem
rem
rem ***************************************************************************

cls

echo building...

if exist hbmk.log del hbmk.log
if exist windres.log del windres.log
if exist error.log del error.log
if exist _hmg_resconfig.h del _hmg_resconfig.h

rem ---------------------------------------------------------------------------
rem Parameters Processing
rem ---------------------------------------------------------------------------

rem ***************************************************************************
rem NO PARAMETERS OR HELP REQUESTED
rem ***************************************************************************

if "%1"=="" goto syntax
if "%1"=="/?" goto syntax
if "%1"=="-?" goto syntax
if "%1"=="/h" goto syntax
if "%1"=="/H" goto syntax
if "%1"=="-h" goto syntax
if "%1"=="-H" goto syntax
if "%1"=="-help" goto syntax
if "%1"=="-HELP" goto syntax

rem ***************************************************************************
rem No run after build
rem ***************************************************************************

if "%1"=="/n" goto norun
if "%1"=="/N" goto norun

:continue0

rem ***************************************************************************
rem Multi Thread
rem ***************************************************************************

if "%1"=="/mt" goto multithread
if "%1"=="/MT" goto multithread

:continue1

rem ***************************************************************************
rem Console Incremental Rebuild
rem ***************************************************************************

if "%1"=="/cr" goto consoleincrebuild
if "%1"=="/CR" goto consoleincrebuild

rem ***************************************************************************
rem Console Incremental
rem ***************************************************************************

if "%1"=="/ci" goto consoleincremental
if "%1"=="/CI" goto consoleincremental

rem ***************************************************************************
rem GUI Incremental Rebuild
rem ***************************************************************************

if "%1"=="/r" goto increbuild
if "%1"=="/R" goto increbuild

rem ***************************************************************************
rem Console Standard Build
rem ***************************************************************************

if "%1"=="/cs" goto console
if "%1"=="/CS" goto console

rem ***************************************************************************
rem If debug mode specified, use GTWIN and pass -b parameter
rem ***************************************************************************

if "%1"=="/d" goto debug
if "%1"=="/D" goto debug

rem ***************************************************************************
rem If /i parameter rceived set BUILDTYPE to incremental
rem ***************************************************************************

if "%1"=="/i" goto incremental
if "%1"=="/I" goto incremental

rem ***************************************************************************
rem If /i parameter rceived set BUILDTYPE to incremental
rem ***************************************************************************

if "%1"=="/i" goto incremental
if "%1"=="/I" goto incremental

:continue

if exist %~n1.exe del %~n1.exe

if exist %~n1.exe goto error

rem ***************************************************************************
rem If a resource with the same base name as the first parameter exist compile it
rem ***************************************************************************

if exist %~n1.rc  echo #define HMGRPATH %HmgPath%\RESOURCES > _hmg_resconfig.h

if exist %~n1.rc copy /b %HmgPath%\resources\minigui.rc+%~n1.rc+%HmgPath%\resources\filler _temp.rc >NUL
if exist %~n1.rc redir -e windres.log windres -i _temp.rc -o _temp.o 
if exist %~n1.rc Set Resources=_temp.o

rem ***************************************************************************
rem invoke HBMK2
rem ***************************************************************************

redir -eo  hbmk2 -o%~n1.exe %GT% %DEBUG% %MT% -head=real %BUILDTYPE% %REBUILDALL% -incpath=%HmgPath%\include -incpath=%CD% -L%HmgPath%\lib -lminigui -lhbmysql -lmysql -lcrypt -ledit -leditex -lgraph -lini -lreport -lhbwin -lhbziparc -lhbmzip -lmsvfw32 -lvfw32 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbvpdf -lhbmemio -lhbsqlit3 -lsqlite3 -lhbfimage.a -lhbpgsql -lpq -lhbtip -lhbct -lhbmisc -lhbnetio -prgflag=/q %1 %2 %3 %4 %5 %6 %7 %8 %9 %Resources%  >hbmk.log

goto end

rem ***************************************************************************
rem Procedure increbuild
rem ***************************************************************************

:increbuild

set BUILDTYPE=-inc
set REBUILDALL=-rebuild

shift

goto continue

rem ***************************************************************************
rem Procedure Console
rem ***************************************************************************

:console

set GT=-gtwin

shift

goto continue

rem ***************************************************************************
rem Procedure Debug
rem ***************************************************************************

:debug

set GT=-gtwin
set DEBUG=-b

echo Options NoRunAtStartup > Init.cld

shift

goto continue

rem ***************************************************************************
rem Procedure Incremental
rem ***************************************************************************

:Incremental

set BUILDTYPE=-inc

shift
goto continue

rem ***************************************************************************
rem Procedure IncConsole
rem ***************************************************************************

:consoleincremental

set BUILDTYPE=-inc
set GT=-gtwin

shift

goto continue

rem ***************************************************************************
rem Procedure IncConsole
rem ***************************************************************************

:consoleincrebuild

set BUILDTYPE=-inc
set GT=-gtwin
set REBUILDALL=-rebuild

shift

goto continue

rem ***************************************************************************
rem Procedure NoRun
rem ***************************************************************************

:norun

set RUN=.F.

shift

goto continue0

rem ***************************************************************************
rem Procedure Multithread
rem ***************************************************************************

:multithread

set MT=-mt

shift

goto continue1

rem ***************************************************************************
rem Procedure Error
rem ***************************************************************************

:error

echo Can't delete previous %~n1.exe version (still running?) > error.log

goto showlog

rem ***************************************************************************
rem Procedure Syntax
rem ***************************************************************************

:syntax

cls
echo :: Syntax:
echo ::
echo :: "Build [/i|/r|/d|/cs|/ci/cr] <PrgFile> | <filelist.hbp> [config.hbc]"
echo ::
echo :: [/i] : incremental build
echo :: [/r] : incremental build (rebuild all)
echo :: [/cs] : Console/mixed mode (std build)
echo :: [/ci] : Console/mixed mode (incremental build)
echo :: [/cr] : Console/mixed mode (incremental rebuild all)
echo :: [/d] : Debug mode (gui and console)
echo :: filelist.hbm : A text file with .hbp extension containing a source list
echo :: configfile.hbc: A text file with configuration parameters as additional
echo :: libs, include paths and lib paths.
echo ::
echo :: configfile.hbc Syntax:
echo ::
echo :: incpaths = incpath1 incpath2 ... incpathn
echo :: libpaths = libpath1 libpath2 ... libpathn
echo :: libs = lib1 lib2 ... libn
echo ::
echo :: library names must not include 'lib' prefix nor '.a' extension.
echo :: build.bat will create an 'error.log' file in the app folder when build
echo :: process ends with an error condition.
echo ::
pause
goto stop

:end

rem ***************************************************************************
rem Cleanup
rem ***************************************************************************

rem If build error, create 'error.log' ----------------------------------------

if errorlevel 1 if exist windres.log copy /b windres.log+hbmk.log error.log >nul

if errorlevel 1 if not exist windres.log copy /b hbmk.log error.log >nul

rem If no error run the exe ---------------------------------------------------

if "%RUN%"==".T." if not errorlevel 1 if exist %~n1.exe %~n1.exe

rem Delete temporary files ----------------------------------------------------

if exist windres.log del windres.log
if exist hbmk.log del hbmk.log
if exist _hmg_resconfig.h del _hmg_resconfig.h

if exist _temp.rc del _temp.rc

if exist _temp.o  del _temp.o

rem if exist delete debugger file ---------------------------------------------

if exist init.cld del init.cld

:showlog

if exist error.log type error.log

:stop
Then change the samples build.bat with the following:

Code: Select all

call ..\..\build.bat %*
Then to build a project from outside HMG folder, call the build.bat located at HMG root.

Please, test and tell me what happened.

TIA.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
esgici
Posts: 4439
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 323 times
Been thanked: 99 times
Contact:

Post by esgici » Thu Oct 22, 2009 3:26 pm

Roberto Lopez wrote: <...>
Please, test and tell me what happened.
<...>
Hi Maestro

Yes; that's all :D

Compiling with (new) build.bat is OK.

Waiting for IDE ...

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D

User avatar
Roberto Lopez
HMG Founder
Posts: 3905
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 15 times
Been thanked: 140 times

Post by Roberto Lopez » Thu Oct 22, 2009 4:00 pm

esgici wrote:
Roberto Lopez wrote: <...>
Please, test and tell me what happened.
<...>
Hi Maestro

Yes; that's all :D

Compiling with (new) build.bat is OK.

Waiting for IDE ...

Best Regards

--

Esgici
Thanks!

IDE will be require a fix too.

I'm on it.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
esgici
Posts: 4439
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 323 times
Been thanked: 99 times
Contact:

Post by esgici » Thu Oct 22, 2009 4:10 pm

Thank you very much Maestro :D

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D

Post Reply