HMG 3.1.5

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.1.5 (Test)

Post by Pablo César »

There is a IDE message error well-known, especially in countries where special characters such as accents, spaces, etc.. as shows below:
Screen.PNG
Screen.PNG (9.13 KiB) Viewed 6376 times
IMHO, now at IDE UNICODE version, is not more necessary to have this restrictions for opening project files when is with accents.

When hbp file is created with prg(s), then the IDE open the project and compile normally. And the executable file is created even with accents in the name of project. It would then be possible to remove this restriction in the IDE ?

In my C:\hmg.3.1.5\build.bat file I have this (see red quotations below):
@echo off

rem *******************************************************************************
rem SYNTAX
rem *******************************************************************************
rem build [ /n ] [ /d ] [ /c ] <program.prg> | <project.hbp> [<hbmk2 params>]
rem
rem /n no run after build
rem /d enabled debugger
rem /c console mode
rem
rem
rem This batch file passes information to hbmk2 to make possible an easy (zero
rem configuration build of HMG applications).
rem
rem You can achieve a customized build passing parameters directly to hbmk2.
rem Please, take a look at hbmk2 help:
rem
rem hbmk2 --help

rem *******************************************************************************
rem SET DEFAULT OPTIONS
rem *******************************************************************************

set gtdrivers=-gtgui -gtwin
set runafterbuild=.t.
set debug=

rem ******************************************************************************
rem DELETE FILES FROM PREVIOUS BUILD
rem ******************************************************************************

if exist build.log del build.log
if exist error.log del error.log
if exist init.cld del init.cld

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

SET HMGPATH=%~dp0

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

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

rem *******************************************************************************
rem PROCESS PARAMETERS
rem *******************************************************************************
rem
rem /n no run after build
rem /d enabled debugger
rem /c console mode
rem

if [%1]==[/n] set runafterbuild=.f.
if [%1]==[/n] shift

if [%1]==[/d] set gtdrivers=-gtwin -gtgui
if [%1]==[/d] set debug=-b
if [%1]==[/d] echo options norunatstartup > init.cld
if [%1]==[/d] shift

if [%1]==[/c] set gtdrivers=-gtwin -gtgui
if [%1]==[/c] shift

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 >windres.log 2>&1

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

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

rem *******************************************************************************
rem SET QUIET MODE
rem *******************************************************************************
rem
rem The third parameter sent to hbmk2 is -q (Harbour quiet mode)

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

rem HBMK2 -mt -o%~n1.exe %HMGPATH%\hmg.hbc %gtdrivers% %debug% -q %1 %2 %3 %4 %5 %6 %7 %8 >hbmk.log 2>&1
HBMK2 -mt -o"%~n1" %HMGPATH%\hmg.hbc %gtdrivers% %debug% -q %1 %2 %3 %4 %5 %6 %7 %8 >hbmk.log 2>&1

rem ******************************************************************************
rem CREATE LOGS
rem ******************************************************************************

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

if errorlevel 0 if exist windres.log copy /a windres.log+hbmk.log build.log >nul
if errorlevel 0 if not exist windres.log copy /a hbmk.log build.log >nul

rem ******************************************************************************
rem CLEANUP
rem ******************************************************************************

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 ******************************************************************************
rem SHOW LOG
rem ******************************************************************************

if exist error.log type error.log
if exist build.log type build.log

rem ******************************************************************************
rem RUN APPLICATION
rem ******************************************************************************
rem (new implementation)

if [%runafterbuild%]==[.f.] goto END
if exist dat GOTO OTHER
if exist "%~n1".exe "%~n1".exe
GOTO END
:OTHER
SET /p "OTHER=" <dat
COPY "%~n1".exe %other%
if errorlevel 1 goto END
if exist "%~n1".exe %other%\"%~n1".exe
:END
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.1.5 (Test)

Post by Roberto Lopez »

I'm really amazed with all the fantastic new features in this release.

Thanks for all the work you've done!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG 3.1.5 (Test)

Post by bpd2000 »

You are welcome
BPD
Convert Dream into Reality through HMG
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

GetPrinter

Post by dragancesu »

Version 3.1.4 GetPrinter function () works well
Version 3.1.5 GetPrinter function () does not work, that does not wait to make a choice

[u]Moderator Notes[/u] (Pablo César) wrote:Message moved from topic HMG v3.1.5 IDE error when changing default language.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

GetPrinter

Post by Pablo César »

dragancesu wrote:Version 3.1.4 GetPrinter function () works well
May you please post the screen captured at printer selecting after have been compiled with 3.1.4 ?

I have compiled C:\hmg.3.1.5\samples\Controls\PRINT\ImageFromFile\jpg example and GetPrinter is working well. I have also regsitered a new printer with brazilian accents just to know if could be this the problem of accents, but not, it is working. Would be also important to give a look of you source code, please remember to post it (or part of it) for your next posts.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: HMG 3.1.5 (Test)

Post by dragancesu »

maybe a little rushed and wrote the bug but this code does not work, the function does not return anything and appears error

Code: Select all

   mPrinter := GetPrinter()
   If Empty ( mPrinter ) 
      msgexclamation("Printer is not selected ","Attention:")
      return NIL
   EndIf
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: HMG 3.1.5 (Test)

Post by Pablo César »

dragancesu wrote:Version 3.1.4 GetPrinter function () works well
Version 3.1.5 GetPrinter function () does not work, that does not wait to make a choice
You are right !

GetPrinter changed behaviour in 3.1.5 version. In 3.1.4, working well.

I made this example for demonstration:

Code: Select all

#include <hmg.ch>

Function Main()
DEFINE WINDOW Form_1 AT 138 , 235 WIDTH 550 HEIGHT 350 MAIN

    DEFINE BUTTON Button_1
        ROW    190
        COL    220
        WIDTH  100
        HEIGHT 28
        ACTION See_Printers()
        CAPTION "GetPrinter"
    END BUTTON

END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return Nil

Function See_Printers()
Local Printers := GetPrinter()

MsgInfo("This message should wait after confirmation of GetPrinter"+CRLF+CRLF+"Printer selected: "+Printers+If(Empty(Printers),">"+Printers+"<"+" (Printer is not selected, empty return)",">"+Printers+"<"))

Return Nil
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.1.5 (Test)

Post by esgici »

Confirmed :(

We have a severe problem :(

Code: Select all

PROC TestPrinter()         
                  
   LOCAL cResult := "What are happening ? "
   
   cResult := GetPrinter()
   
   MsgBox(  cResult, "Printer" )
   
RETU // TestPrinter()
Result of GetPrinter() testing
Result of GetPrinter() testing
TestPrinter.JPG (18.73 KiB) Viewed 6267 times
GetPrinter() terminating without waiting user response, and following msg function activated :?

TIA
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.1.5 (Test)

Post by srvet_claudio »

Roberto Lopez wrote:I'm really amazed with all the fantastic new features in this release.

Thanks for all the work you've done!
Thank you very much for your kind words are very encouraging for us.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
klauskugel
Posts: 90
Joined: Tue Oct 09, 2012 2:28 pm

Re: HMG 3.1.5 (Test)

Post by klauskugel »

Many thanks for making HMG 3.1.5 come true.
Wonderful stuff.
I tested it under Wine 1.7.0 and it worked absolutely well.
HFCL with Cairo, no prob.
Sure there are little, sometimes annoying things, but I think
HMG is not far from Release Candidate.
As a growing system it is normal, that we have some
little quirks in it. But I'm sure, we can live with it and
find out, to make things work.
And with a DosBox/or DOSEMU under Linux
it is just the right thing to port older Programs to
HMG.

Viva HMG, Viva Harbour.

Best wishes from Germany
klauskugel
Post Reply