Page 1 of 1

Path Problem

Posted: Sun Mar 16, 2025 4:23 am
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

Re: Path Problem

Posted: Sun Mar 16, 2025 5:12 am
by AUGE_OHR
hi,

why not use HMG IDE ?

Re: Path Problem

Posted: Sun Mar 16, 2025 7:53 am
by serge_girard
BAT files is not my speciality!

Re: Path Problem

Posted: Sun Mar 16, 2025 10:44 am
by branislavmil
Try this:
echo Making Program1
c:\hmg.3.4.4\build Program1.hbp
pause

Re: Path Problem

Posted: Mon Mar 17, 2025 3:02 am
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.

Re: Path Problem

Posted: Tue Mar 18, 2025 4:01 am
by bluebird
Are there any entries in the windows 10 environmental table that are needed to run 32 bit HMG.3.4.4

Re: Path Problem

Posted: Tue Mar 18, 2025 2:17 pm
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.

Re: Path Problem

Posted: Tue Mar 18, 2025 4:30 pm
by serge_girard
I think no entries in the windows 10 environmental table are needed.

Serge

Re: Path Problem

Posted: Fri Mar 21, 2025 3:26 am
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