BUILDING HMG APPLICATIONS
Build.Bat / HMG-IDE

 

 

 

- BUILD.BAT

 

      The easiest way is to use the Build.Bat file located at \hmg... folder.

 

      Usage:

 

             Build [ /n ] [ /d ] [ /c ] <program.prg> | <project.hbp> [<hbmk2 params>]

 

                [/n] :  No run after build

                [/d] :  Enabled debugger

                [/c] :  Console mode

 

 

      <program.prg>  : A main text file containing your source code.

     

      <filelist.hbp> : A text file with .hbp extension containing a source list.

     

      <hbmk2 params> : A text file with configuration parameters as additional libs, include paths and lib paths.

 

                       For example:

                              incpaths = incpath1 incpath2 ... incpathn

                              libpaths = libpath1 libpath2 ... libpathn

                              libs = lib1 lib2 ... libn

                              mt = yes (multi-threading support)

 

 

See sample at: ..\SAMPLES\Basics\MULTIPRG

 


- Library names must not include 'lib' prefix nor '.a' extension.

 

- Build.bat will create an error.log file in the app folder when build process ends with an error condition.

 

- If no parameters have been passed, no action is going to happen using the main Build.bat at HMG folder. Some Build.bat at C:\HMG..\SAMPLES will accept to compile even without any parameter because it will acts according all hbp files in the current folder. Then all files in the current folder are automatically be processed.

 

- There is an option to build projects with long names.

  For example: Build “My Project”

  

  This “My Project” must be in quoted and is the hbp file or prg file with this name.

  If exist more prgs files with long names, must be always in quoted at hbp file.

 

  Read this topic: http://www.hmgforum.com/viewtopic.php?p=33737#p33737

 

- Also there another option when you need to make copy in a second place.

  For example:

You have yur project only with your surce code and also a second folder where is the system running already. If you create a text file with name of dat (without extension file) containing the full path where your system is running on at second folder.

 

  Read this topic: http://www.hmgforum.com/viewtopic.php?p=29435#p29435

 

 

 

- HMG IDE

 

      This programming environment allows visual form editing and application build.

 

      Environment settings (HMG Folder, Program Editor, etc.) are stored in '.ini' files, located at IDE folder. You can interactively change default settings (Main Menu->Tools->Preferences).

 

In IDE, all build customizations must be handled by the user from 'Configuration' (project browser) tab. It is direct edit of the project .hbc file. Look at hbmk2 help for details. By default two gt drivers are ALWAYS linked: GTGUI (as default) and GTWIN (Windows console).

 

To create apps console/mixed mode, you only need to add this followinq command: REQUEST  HB_GT_WIN_DEFAULT  at line to top of your main prg file.

 

See example:

 

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

REQUEST HB_GT_WIN_DEFAULT

     

Function Main()

SetMode(25,80)

     

Cls

@ 10,10 Say 'Hello'

     

Alert('Hello')

Return Nil


Screenshot

1

Tip: When upgrading HMG, please clean previous build data from your projects using incremental building, use the 'Reset project incremental data' option from the project menu.