HMG 3.0.36 (Test)

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

Moderator: Rathinagiri

Post Reply
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:Hi Roberto,

Sorry to intrude.

Have you tried to use the modified build.bat?

Buildapp.bat is old one and the latest build.bat is working fine except the problems I have mentioned.
Ok.

My thinking was that there were more serious problems with build.bat...

I'll stop to think about this, since it is becoming a little difficult to me...

The .hbc files added to .36 looks cryptic to me. I don't know the meaning of things like: "libs=${hb_name}${__HB_DYN__}" or "{win}sources=${hb_curdir}_temp.o", and the need of an extra project file (.hbm) is a complication too (I've used such things on HMG4 only because its experimental nature and were required for HBQT to work).

The whole thing looks messy to me, so, I guess I'm not able to solve the problems you've posted.

The original build.bat did not required any hbmk2 configuration files (excepting the project ones) giving use a more clear view of what are we doing and what's happening.

Our goal (simple goal) is to create Windows apps. using a couple of extra libraries. Is really difficult to understand why, such thing requires such great effort to be communicated to hbmk2.

By the way... anyone knows if is there another build tool for Harbour? (I'm tempted to return to the 2.x 'compile.bat' :) )
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:Hi Roberto,

Sorry to intrude.

Have you tried to use the modified build.bat?

Buildapp.bat is old one and the latest build.bat is working fine except the problems I have mentioned.
And... I'm not sure, but, could be the cause of the problems that we have now two .hbc files?

I mean, the user's project one and the one located at HMG root..
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 »

If anything that is messy, it is because of me. :)

I am sure there IS a simple solution. Since I am not well versed in hbmk2, I could not solve this.
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 »

IMHO,

hbmk.hbk is to refer the hmg.hbc in the root folder. That file contains the list of default library files (like mysql, sqlite, etc...,). So, if we can list these in project.hbc file itself we need not require hbmk.hbk and hmg.hbc files.

Previously these default libraries are listed in build.bat itself.
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:If anything that is messy, it is because of me. :)

I am sure there IS a simple solution. Since I am not well versed in hbmk2, I could not solve this.
Sorry... :)

I'm not talking about your work.. I'm talking about hbmk2 itself, that appears to become more difficult to use...

The problem is that I'm not versed on hbmk2 either.

I've selected it, because when I've made the decision, it was very easy to make it work.

So, the problem is not you or me. The problem, appears to be that hbmk2 is, apparently, becoming more harder to configure.

I say apparently, because, maybe a simpler way to make the things work and we don't knew it.
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:IMHO,

hbmk.hbk is to refer the hmg.hbc in the root folder. That file contains the list of default library files (like mysql, sqlite, etc...,). So, if we can list these in project.hbc file itself we need not require hbmk.hbk and hmg.hbc files.

Previously these default libraries are listed in build.bat itself.
The main problem now, is that build.bat is working fine from command line and not from IDE.

The problem for me is that IDE, simply calls build.bat with the same parameters used from command line (no hidden things).

IDE just do the following:

build.bat <project.hbp> <project.hbc>

Prior to this call, IDE just update project .hbc file according user's preferences.

The only different thing is that when you use IDE, the is a local .hbc project file.

IMHO the only obscure point here, is the ability of hbmk2 to work with two different .hbc files.

I'm almost sure that it can handle it, but we are not sure about the correct way to do it...

I guess that all we need the help of a hbmk2 expert... :)
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 »

I guess that all we need the help of a hbmk2 expert...
Exactly!
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 »

Hi Roberto,

I am giving the hbmk2 help here.

Will this switch be useful for us?

Code: Select all

  -autohbc=<.ch:.hbc> <.ch> is a header file name. <.hbc> is a .hbc filename to
                      be automatically included in case the header is found in
                      any of the compiled sources. (EXPERIMENTAL)

Code: Select all

Harbour Make (hbmk2) 2.1.0rc2 (Rev. 16814)
Copyright (c) 1999-2011, Viktor Szakats
http://harbour-project.org/

Syntax:

  hbmk2 [options] [<script[s]>] <src[s][.prg|.c|.obj|.o|.rc|.res|.def|.po|.pot|.hbl|@.clp|.d]>

Options:
  -o<outname>         output file name
  -l<libname>         link with <libname> library. <libname> should be without
                      path, extension and 'lib' prefix (unless part of
                      libname). Do not add core Harbour libraries, they are
                      automatically added as needed.
  -L<libpath>         additional path to search for libraries
  -i<p>|-incpath=<p>  additional path to search for headers
  -static|-shared     link with static/shared libs
  -mt|-st             link with multi/single-thread Harbour VM
  -gt<name>           link with GT<name> GT driver, can be repeated to link
                      with more GTs. First one will be the default at runtime
  -hbexe              create executable (default)
  -hblib              create static library
  -hbdyn              create dynamic library (without linked Harbour VM)
  -hbdynvm            create dynamic library
  -hbimplib           create import library

  -gui|-std           create GUI/console executable
  -main=<mainfunc>    override the name of starting function/procedure
  -request=<func>     force function/procedure to be linked
  -fullstatic         link with all static libs
  -pic[-]             create position independent object code (always enabled
                      in -hbdyn/-hbdynvm modes)
  -[full|fix]shared   create shared Harbour binaries without/with absolute dir
                      reference to Harbour library (default: 'fullshared' when
                      Harbour is installed on system location, 'fixshared'
                      otherwise) (fix/full option in *nix only)
  -nulrdd[-]          link with nulrdd
  -[no]debug          add/exclude C compiler debug info. For Harbour level
                      debug, use Harbour option -b as usual
  -[no]optim          toggle C compiler optimizations (default: on)
  -[no]cpp[=def]      force C/C++ mode or reset to default
  -c=[<std>]          select C standard. Allowed values are: iso90, iso99,
                      iso1x, gnu90, gnu99, gnu1x
  -cpp=[<std>]        select C++ standard. Allowed values are: iso98, iso03,
                      iso0x, gnu98, gnu0x
  -[no]map            create (or not) a map file
  -[no]implib         create (or not) an import library (in -hbdyn/-hbexe
                      mode). The name will have a postfix added.
  -implib=<output>    create import library (in -hbdyn/-hbexe mode) name to
                      <output> (default: same as output)
  -ln=<link>          create symbolic link pointing to <output> (<link> is
                      considered relative to <output>)
  -[no]strip          strip (no strip) binaries
  -[no]trace          show commands executed
  -[no]beep           enable (or disable) single beep on successful exit,
                      double beep on failure
  -[no]ignore         ignore errors when running compiler tools (default: off)
  -[no]hbcppmm        override standard C++ memory management functions with
                      Harbour ones
  -winuni[-]          select between UNICODE (WIDE) and ANSI compilation modes
                      (default: ANSI) (Windows only. For WinCE it is always set
                      to UNICODE)
  -nohblib[-]         do not use static core Harbour libraries when linking
  -nodefgt[-]         do not link default GTs (effective in -static mode)
  -nolibgrouping[-]   disable library grouping on gcc based compilers
  -nomiscsyslib[-]    do not add extra list of system libraries to default
                      library list
  -traceonly          show commands to be executed, but do not execute them
  -[no]warn[=lev]     set C compiler warning level
                      <lev> can be: max, yes, low, no, def (default: yes)
  -[no]compr[=lev]    compress executable/dynamic lib (needs UPX)
                      <lev> can be: min, max, def
  -[no]run            run/do not run output executable
  -vcshead=<file>     generate .ch header file with local repository
                      information. SVN, CVS, Git, Mercurial, Bazaar, Fossil and
                      Monotone are currently supported. Generated header will
                      define macro _HBMK_VCS_TYPE_ with the name of detected
                      VCS and _HBMK_VCS_ID_ with the unique ID of local
                      repository
  -tshead=<file>      generate .ch header file with timestamp information.
                      Generated header will define macros _HBMK_BUILD_DATE_,
                      _HBMK_BUILD_TIME_, _HBMK_BUILD_TIMESTAMP_ with the
                      date/time of build
  -icon=<file>        set <file> as application icon. <file> should be a
                      supported format on the target platform
  -manifest=<file>    embed manifest <file> in executable/dynamic lib (Windows
                      only)
  -instfile=<g:file>  add <file> in to the list of files to be copied to path
                      specified by -instpath option. <g> is an optional copy
                      group, it must be at least two characters long.
  -instpath=<g:path>  copy target to <path>. if <path> is a directory, it
                      should end with path separatorm, in this case files
                      specified by -instfile option will also be copied. can be
                      specified multiple times. <g> is an optional copy group,
                      it must be at least two characters long. Build target
                      will be automatically copied to default (empty) copy
                      group.
  -instforce[-]       copy target to install path even if it is up to date
  -depimplib[-]       enable (or disable) import library generation for import
                      library sources specified in -depimplibs= options
                      (default: yes)
  -stop[=<text>]      stop without doing anything and display <text> if
                      specified
  -echo=<text>        echo text on screen
  -pause              force waiting for a key on exit in case of failure (with
                      alternate GTs only)
  -info               turn on informational messages
  -quiet[-]           suppress all screen messages

  -bldf[-]            inherit all/no (default) flags from Harbour build
  -bldf=[p][c][l]     inherit .prg/.c/linker flags (or none) from Harbour build
  -F<framework>       link with <framework> framework (Darwin only)
  -prgflag=<f>        pass flag to Harbour
  -cflag=<f>          pass flag to C compiler
  -resflag=<f>        pass flag to resource compiler (Windows only)
  -ldflag=<f>         pass flag to linker (executable)
  -aflag=<f>          pass flag to linker (static library)
  -dflag=<f>          pass flag to linker (dynamic library)
  -iflag=<f>          pass flag to import library creation command
  -runflag=<f>        pass flag to output executable when -run option is used
  -cflag+=<f>         pass flag to C compiler overriding C compiler flags added
                      by hbmk2 itself. Use with caution.
  -3rd=<f>            options/flags reserved for 3rd party tools, always
                      ignored by hbmk2 itself
  -jobs=<n>           start n compilation threads (multiprocess platforms only)
  -inc                enable incremental build mode
  -[no]head[=<m>]     control source header parsing (in incremental build mode)
                      <m> can be: native (uses compiler to extract
                      dependencies), full (default, uses simple text parser on
                      the whole file), dep, off
  -rebuild            rebuild (in incremental build mode)
  -rebuildall         rebuild with sub-projects (in incremental build mode)
  -clean              clean (in incremental build mode)
  -workdir=<dir>      working directory
                      (default: .hbmk/plat/comp in incremental mode, OS temp
                      directory otherwise)

  -hbl[=<output>]     output .hbl filename. %{hb_lng} macro is accepted in
                      filename
  -lng=<languages>    list of languages to be replaced in %{hb_lng} macros in
                      .pot/.po filenames and output .hbl/.po filenames. Comma
                      separared list:
                      -lng=en,hu-HU,de
  -po=<output>        create/update .po file from source. Merge it with
                      previous .po file of the same name
  -[no]minipo         do (not) add Harbour version number and source file
                      reference to .po (default: add them)
  -rebuildpo          recreate .po file, thus removing all obsolete entries in
                      it

  -hbx=<.ch>          Create Harbour header (in .hbx format) with all external
                      symbols.
  -autohbc=<.ch:.hbc> <.ch> is a header file name. <.hbc> is a .hbc filename to
                      be automatically included in case the header is found in
                      any of the compiled sources. (EXPERIMENTAL)

  -deppkgname=<d:n>   <d> is the name of the dependency. <n> name of the
                      package depedency. Can be specified multiple times.
  -depkeyhead=<d:h>   <d> is the name of the dependency. <h> is the key header
                      (.h) of the package dependency. Multiple alternative
                      headers can be specified.
  -depoptional=<d:f>  <d> is the name of the dependency. <f> can be 'yes' or
                      'no', specifies whether the dependency is optional.
                      Default: no
  -depcontrol=<d:v>   <d> is the name of the dependency. <v> is a value that
                      controls how detection is done. Accepted values: no, yes,
                      force, nolocal, local. Default: content of envvar
                      HBMK2_WITH_<d>
  -depincroot=<d:r>   <d> is the name of the dependency. Set <r> as root
                      directory for paths specified in -depincpath options.
  -depincpath=<d:i>   <d> is the name of the dependency. Add <i> to the header
                      detection path list. May be ';' delimited list of paths.
  -depincpathlocal=   <d> is the name of the dependency. Add <i> to the header
  <d:i>               detection path list, where <i> is pointing to a directory
                      local to the project and containing an embedded (or
                      locally hosted) dependency.
  -depimplibs=<d:dll> <d> is the name of the dependency. Add <dll> to the
                      import library source list. May be ';' delimited list of
                      paths.
  -depimplibd=<d:lib> <d> is the name of the dependency. Set generated import
                      library name to <lib>

  -plugin=<.prg|.hbs|.add plugin
  b>                  
  -pi=<filename>      pass input file to plugins
  -pflag=<f>          pass flag to plugins

  Options below are available on command line only:

  -target=<script>    specify a new build target. <script> can be .prg (or no
                      extension) or .hbp file. Note that .hbp files are
                      automatically considered as separate targets.

  -env:<e>[<o>[<v>]]  alter local environment. <e> is the name of the
                      environment variable to alter. <o> can be '=' to
                      set/override, '-' to delete, '+' to append to the end of
                      existing value, '#' to insert to the beginning of
                      existing value. <v> is the value to set/append/insert. If
                      multiple options are passed, they are processed from left
                      to right.

  -hbrun              run target
  -hbraw              stop after running Harbour compiler
  -hbcmp|-clipper     stop after creating the object files
                      create link/copy hbmk2 to hbcmp/clipper for the same
                      effect
  -hbcc               stop after creating the object files and accept raw C
                      flags
                      create link/copy hbmk2 to hbcc for the same effect
  -hblnk              accept raw linker flags
  -autohbm[-]         enable (or disable) processing of hbmk.hbm in current
                      directory (default: yes)
  -hb10               enable Harbour 1.0.x compatibility mode
  -hb20               enable Harbour 2.0.x compatibility mode
  -xhb                enable xhb mode
  -hbc                enable pure C mode
  -rtlink             
  -blinker            
  -exospace           emulate Clipper compatible linker behavior
                      create link/copy hbmk2 to rtlink/blinker/exospace for the
                      same effect

  -hbmake=<file>      convert hbmake project <file> to .hbp file
  -xbp=<file>         convert .xbp (xbuild) project <file> to .hbp file
  -xhp=<file>         convert .xhp (xMate) project <file> to .hbp file

  --hbdirbin          output Harbour binary directory
  --hbdirdyn          output Harbour dynamic library directory
  --hbdirlib          output Harbour static library directory
  --hbdirinc          output Harbour header directory
  --hbinfo            output Harbour build information. The data output comes
                      in the format: '<name>{{<value>}}'. The included paths
                      always contain forward slashes.

  -plat[form]=<plat>  select target platform.
  -comp[iler]=<comp>  select C compiler.
                      Special value:
                       - bld: use original build settings (default on *nix)
  -cpu=<cpu>          select target CPU. (EXPERIMENTAL)
  -build=<name>       use a specific build name
  -lang=<lang>        override default language. Similar to HB_LANG envvar.
  -width=<n>          set output width to <n> characters (0=unlimited).
  -shl                show sub-project level in output lines
  --version           display version header only

Notes:
  - <script> can be:
      <@script> or <script.hbm>: command line options in file
      <script.hbp>: command line options in file, it also marks a new target if
    specified on the command line
      <script.hbc>: package configuration file
  - Multiple -l, -L and <script> parameters are accepted.
  - Regular Harbour compiler options are also accepted.
    (see them with -harbourhelp option)
  - hbmk.hbc option file in hbmk2 directory is always processed if it exists.
    On *nix platforms ~/.harbour, /etc/harbour, <base>/etc/harbour, <base>/etc
    are checked (in that order) before the hbmk2 directory.
  - hbmk.hbm make script in current directory is always processed if it exists.
  - .hbc options (they should come in separate lines): libs=[<libname[s]>],
    hbcs=[<.hbc file[s]>], gt=[gtname], syslibs=[<libname[s]>],
    frameworks=[<framework[s]>], prgflags=[Harbour flags], cflags=[C compiler
    flags], resflags=[resource compiler flags], ldflags=[linker flags],
    pflags=[flags for plugins], libpaths=[paths], sources=[source files],
    psources=[source files for plugins], incpaths=[paths], requests=[func],
    instfiles=[files], instpaths=[paths], autohbcs=[<.ch>:<.hbc>],
    plugins=[plugins],
    gui|mt|pic|shared|nulrdd|nodefgt|debug|opt|map|strip|hbcppmm|winuni|implib|
    run|inc=[yes|no], cpp=[yes|no|def], warn=[max|yes|low|no|def],
    compr=[yes|no|def|min|max], head=[off|full|native|dep], skip=<reason>,
    stop=<reason>, echo=<text>
    Lines starting with '#' char are ignored
  - Platform filters are accepted in each .hbc line and with several options.
    Filter format: {[!][<plat>|<comp>|<cpu>|<keyword>]}. Filters can be
    combined using '&', '|' operators and grouped by parantheses. Ex.: {win},
    {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui},
    -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin},
    {allwin|allmsvc|allgcc|allmingw|allicc|allpocc|unix},
    {x86|x86_64|ia64|arm|mips|sh},
    {debug|nodebug|gui|std|mt|st|shared|static|winuni|winansi|xhb}
  - Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=,
    instfiles=, instpaths=, echo=) and corresponding command line parameters
    will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_plat},
    ${hb_comp}, ${hb_build}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn},
    ${hb_inc}, ${<envvar>}. libpaths= also accepts %{hb_name} which translates
    to the name of the .hbc file under search.
  - Options accepting macros also support command substitution. Enclose command
    inside ``, and, if the command contains space, also enclose in double
    quotes. F.e. "-cflag=`wx-config --cflags`", or
    ldflags={unix&gcc}"`wx-config --libs`".
  - Defaults and feature support vary by platform/compiler.
  - Options can also be specified in environment variable HBMK_OPTIONS
  - .hbs or .hrb file passed as first parameter will be run as Harbour script.
    (EXPERIMENTAL)

Supported <comp> values for each supported <plat> value:
  - linux   : gcc, clang, icc, watcom, sunpro, open64, pcc
  - darwin  : gcc, clang, icc, pcc
  - win     : mingw, msvc, bcc, watcom, icc, pocc, xcc,
  -           mingw64, msvc64, msvcia64, iccia64, pocc64
  - wce     : mingwarm, mingw, msvcarm, poccarm
  - os2     : gcc, gccomf, watcom
  - dos     : djgpp, watcom
  - bsd     : gcc, clang, pcc
  - hpux    : gcc
  - beos    : gcc
  - qnx     : gcc
  - android : gcc, gccarm
  - vxworks : gcc, diab
  - symbian : gcc
  - cygwin  : gcc
  - minix   : gcc, clang, ack
  - sunos   : gcc, sunpro, pcc
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:Hi Roberto,

I am giving the hbmk2 help here.

Will this switch be useful for us?
<...>
I've spent the las half hour writting to you a proposition about some findings in the hbmk2 help file and the power goes off for a couple of seconds :)

I'll write again in small chunks (just in case :) ) please wait...
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: I've spent the las half hour writting to you a proposition about some findings in the hbmk2 help file and the power goes off for a couple of seconds :)

I'll write again in small chunks (just in case :) ) please wait...
My ISP is the world's worst and my energy company is not the better either... :)

Ok.

I've found the following:
- hbmk.hbc option file in hbmk2 directory is always processed if it exists.
Meaning that we could move the hmg.hbc file from the HMG root folder to /harbour/bin and get rid of all hbmk.hbm files.

We could put all required things in such file, letting the hbmk2 invoke line in build.bat 'clean'.

This way, any user preference (outside standard build) should be passed directly to hbmk2 without our intervention, simplyfing the things a lot.

Continue...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply