Path Problem

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
bluebird
Posts: 176
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Path Problem

Post by bluebird »

Dear Friends in HMG

I have been out of programming for a while, but started to make an edit of an old program on my laptop

Using an old batch file that once worked I now get this error: the system cannot find the path specified"

The batch file is run inside of the same folder as the source files Using HMG3.4.4

It must be an old topic from ages ago but please help with ideas on how to get HMG ing again

Here is the simple batch file :
echo Making Program1
build Program1.hbp
pause

Which uses this orignal build.bat below
CLS
@ECHO OFF
SETLOCAL
SET Temp1=%~dp0
SET Temp3=%Temp1%&SET Pos=0

:Loop
SET /a Pos+=1
ECHO %Temp3%|FINDSTR /b /c:/hmg.3.4.4/"MySourceCode/Sudoku" >NUL
IF ERRORLEVEL 1 (
SET Temp3=%Temp3:~1%
IF DEFINED Temp3 GOTO Loop
SET Pos=0
)

SETLOCAL EnableDelayedExpansion
SET "Temp2=%Temp1%"
SET /a Pos=Pos-2
SET Temp1=!Temp2:~0,%Pos%!

IF "%1"=="" GOTO WithOutParam
SET MainFile="%1"
GOTO WithParam

:WithOutParam
FOR %%x IN (*.hbp) DO ( ECHO Building %%x
IF "%NoRun%"=="" CALL %Temp1%\build.bat %%x
IF NOT "%NoRun%"=="" CALL %Temp1%\build.bat /n %%x )
pause
GOTO End

:WithParam
IF "%NoRun%"=="" CALL %Temp1%\Build.bat %MainFile%
IF NOT "%NoRun%"=="" CALL %Temp1%\Build.bat /n %MainFile%

echo check for a new file
pause
:End

Any ideas on how
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Path Problem

Post by AUGE_OHR »

hi,

why not use HMG IDE ?
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Path Problem

Post by serge_girard »

BAT files is not my speciality!
There's nothing you can do that can't be done...
branislavmil
Posts: 10
Joined: Sat Sep 29, 2018 3:36 pm
DBs Used: DBF

Re: Path Problem

Post by branislavmil »

Try this:
echo Making Program1
c:\hmg.3.4.4\build Program1.hbp
pause
bluebird
Posts: 176
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Re: Path Problem

Post by bluebird »

I can build the program in 64 bit but not 32 bit .
In 64 bit I use
cls
title Building Program1 in 64 bit mode
call c:\hmg.3.4.4\build64.bat Program1.hbp
exit

I wish to thank all who tried to help.
bluebird
Posts: 176
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Re: Path Problem

Post by bluebird »

Are there any entries in the windows 10 environmental table that are needed to run 32 bit HMG.3.4.4
Red2
Posts: 281
Joined: Sat May 18, 2019 2:11 pm
DBs Used: Visual FoxPro, FoxPro
Location: United States of America

Re: Path Problem

Post by Red2 »

I have encountered no issues running under either 32 bit HMG.3.4.4 or HMG.3.5 under Windows 10 or Windows 11.
I am not sure what to suggest here.
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Path Problem

Post by serge_girard »

I think no entries in the windows 10 environmental table are needed.

Serge
There's nothing you can do that can't be done...
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Path Problem

Post by danielmaximiliano »

Hola : yo uso esto desde el explorador de archivo o CMD en la carpeta donde tengo los archivos fuentes

Code: Select all

@echo off

SET HMGPATH=C:\hmg.3.6\
Title New HMG -- Build.bat -- 
@echo 
if "%1"=="" goto Input                                                                                                                                        
if not EXIST %1 Goto Noexist

:Build  
@Echo Compiling %*                                                                            
call %HMGPATH%build.bat %*
@echo.
goto Finish

:Noexist
echo  El archivo %1  no existe,  revise el nombre
@echo  
Goto Finish

:Input

Color 04
@echo ********************************************************************************
@echo   Este Batch pasa informacion a hbmk2 para un compilacion facil y limpia       
@echo   se distribuye como esta y no garantiza que este libre de errores             
@echo   si encuentra una puede escribirme a danielmaximiliano@yahoo.com.ar            
@echo   Basado un Build.bat distribuido en el Proyecto HMG de Roberto Lopez           
@echo ********************************************************************************
@echo.
@echo Entre el nombre del proyecto a compilar, asume la extension .HBP si este existe
@echo en la carpeta del proyecto, sino compila el .PRG
@echo. 
@echo "<Enter>" sale del Batch
@echo.
color 07
Set /p Filename=Nombre de la Aplicacion:=
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.

if {%Filename%}=={} goto :Finish
if EXIST %Filename%.hbp (Set Extension=.hbp&&Goto Enterparameters)
if EXIST %Filename%.prg (Set Extension=.prg&&Goto Enterparameters)
goto Cleanvar


:EnterParameters
@echo *******************************************************************************
@echo  Parametros Extras para compilar %Filename%%extension%
@echo. 
@echo                           /n	No EJECUTAR desdepues de compilar
@echo                           /d	Habilita DEBUG
@echo                           /c	Modo CONSOLA DOS
@echo. 
@echo Nota: " Con un <Enter> ningun parametro es pasado "
@echo *******************************************************************************
@echo.
Set /p Parameter=Parametros :=
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
@echo.
If "%Parameter%"== "" goto Continue
If /I "%Parameter%"=="/n" Goto Withparameters
If /I "%Parameter%"=="/d" Goto Withparameters
If /I "%Parameter%"=="/c" Goto Withparameters
cls
Goto EnterParameters


:Withparameters
@echo compilando con parametros
if EXIST %Filename%.hbp Goto HBPParameters 
if EXIST %Filename%.prg Goto PRGParameters
goto Cleanvar



:HBPParameters
@Echo Compilando %Filename%.hbp %Parameter%
call %HMGPATH%build.bat  %filename%.hbp %Parameter%
goto Cleanvar

:PRGParameters
Echo Compilando %Filename%.PRG %Parameter%
call %HMGPATH%build.bat %filename%.prg %Parameter%
goto Cleanvar


:Continue
@echo no parameters compilation
if EXIST %Filename%.hbp Goto HBP 
if EXIST %Filename%.prg Goto PRG


:HBP
@Echo Compile %Filename%.hbp
call %HMGPATH%build.bat %filename%.hbp 
goto Cleanvar

:PRG
@Echo Compile %Filename%.prg
call %HMGPATH%build.bat %filename%.prg
goto Cleanvar

:CleanVar
@echo Cleaning variable´s
(SET HMGPATH=)
(SET Filename=)
(SET Parameter=)
Goto Input 

:Finish
@echo Cleaning variable´s
set "bar="
set "percent=0"
set "count=0"
for /l %%i in (1,1,20) do set "bar=!bar!±"
:loop
set /p "= %bar:~0,20% %percent%%%"<nul
ping -n 1 -w 1 localhost>nul
for /l %%i in (1,1,26) do set /p "="<nul
set "bar=Û%bar%"
set /a "count+=1"
set /a "percent+=5"
if %count% leq 20 goto:loop
echo.
echo.
(SET HMGPATH=)
(SET Filename=)
(SET Parameter=)
(set bar=)
(set percent=)
(set count=)

recuerde que la llamada CALL puede ser a build.bat , build32.bat o build64.bat según la version de HMG
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply