HMG IDE for compiling in pure console mode

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

HMG IDE for compiling in pure console mode

Post by Pablo César » Thu Oct 09, 2014 3:07 pm

Hi All,

At HMG version 3.0.35 our IDE works with Console mode option, where user could it change by mouse clicking from .F. to .T. (see picture below):
Screen.PNG
Screen.PNG (9.87 KiB) Viewed 3268 times
So from higher HMG version, this was eliminated in our IDE. This was eliminated due Harbour has also changed, passed to work with GT drivers by REQUEST HB_GT_WIN_DEFAULT at source code (begining of prg). Which it is working quite normally except all console apps open always a new section (new window). But if you compile the same app thru Build.bat with /c parameter for pure console propose, then it works perfectly at same section when app is running at line command.

I do not know if I have loosing something but I can not make same compilation thru IDE building.

Is it possible to make IDE pass onto Build.bat a "/c" parameter when is setted in console mode by any switchable option in the IDE ? In case I doing something wrong or missing something, would someone tell me how compile in console mode in the IDE ?

P.S. Message re-edicted to clarify this instructions is for pure console avoiding to open a new section at line command.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Thu Oct 09, 2014 6:31 pm

I was thinking how I can it make for pure console compiling thru the IDE.

Because when build our console apps, executable is created but when we execute can noted two windows are open for the same app. One in black color and another is the screen of app. I do not wish to see the black window as empty one without any sense to be displayed. I've remembered in IDE of 3.0.35 version and how to get the same result ?

And I found this topic: IDE - Configuration options

I found the right way for console compiling adding gui='no' at Project Browser/Configuration as follows:
Screen.PNG
Screen.PNG (12.97 KiB) Viewed 2629 times
This set at IDE will pass as /c parameter onto Build.bat for console mode compiling which it will be the same for saving at hbc file.

Please note in above picture, the boolean assigning MUST be in quoted. It could be a simple quotes or double quotes but always in quotes. So be careful when your project was made by IDE of HMG 3.0.35 and you will build in the new IDE version. Because hbc files will bring without quotes.

The instruction to put REQUEST HB_GT_WIN_DEFAULT lines before Function Main... it is still remaining. This is for loading GT drivers (fonts for console mode).

I hope to be usefull in console mode. :D

P.S. Message re-edicted to clarify this instructions is for pure console avoiding to open a new section at line command.
Second time re-edicted to clarify that it need be in quotes as boolean value (new text red color).
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

LOUIS
Posts: 140
Joined: Tue Dec 11, 2012 9:05 pm

Post by LOUIS » Fri Oct 10, 2014 3:00 am

Hola Pablo

Si en Project Browser/Configuration escribo gui=no
ya no debo poner HB_GT_WIN_DEFAULT al principio del Programa ?
Pero, es esto sólo para pure console ?
Porque mi proyecto es Mix, es decir Console+Gui y hasta ahora va muy bien 8-)

Saludos
Last edited by LOUIS on Thu Feb 19, 2015 2:28 am, edited 2 times in total.

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Fri Oct 10, 2014 11:14 am

Hola Louis, gracias por tu interés en el asunto y por ayudar a esclarecer. :)
LOUIS wrote:Si en Project Browser/Configuration esbribo gui=no
ya no debo poner HB_GT_WIN_DEFAULT al principio del Programa ?
Si quieres utilizar el modo console, debes utilizar la GT, por lo tanto es necesario hacer el REQUEST. Sea solo para consle, como para mix.
Pero, es esto sólo para pure console ?
Exactamente. Voy a re-edictar mis mensajes anteriores para dejar bien claro eso.
Porque mi proyecto es Mix, es decir Console+Gui y hasta ahora va muy bien
Si pones el gui='no' no irá cargar las fuentes GUI. Por lo tanto si es mix es mejor seguir como estaba.

P.S.: Message re-edicted to put gui='no' in quotes
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Thu Oct 16, 2014 8:03 am

Hi Pablo,

This topic is interesting. Tell me what exactly the benefits of compiling in true console mode?

Regards.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Thu Oct 16, 2014 11:45 am

Hi Agil,

When O mentioned true console is for differantiating when differs with mix console i.e. app with modules in console and modules in GUI.

What I tried to explain is when you need only console mode and you wish to avoid in the app creates a new session, like this:
Screen.PNG
Screen.PNG (20.6 KiB) Viewed 3041 times
But if you compile with gui='no' option, as I indicated, then it will be create an APP which will preserve same section, like this:
Screen_01.PNG
Screen_01.PNG (16.86 KiB) Viewed 3041 times
This instructions is when you build/compile your app thru our IDE.

P.S.: Message re-edicted to put gui='no' in quotes
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Thu Oct 16, 2014 4:52 pm

Ok understood. Thanks for explaining with clear illustration.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Fri May 29, 2015 12:42 pm

This is to clarify and correct this my message where gui='no' needs to be in quotes at Project Browser/Configuration in our IDE.

Keeping you informed.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Post Reply