HI:
MyBuild.bat
Code: Select all
@echo off
cls
Title New HMG -- Build.bat --
SET HMGPATH=c:\HMG.3.0.40\
SET Backup=%PATH%
@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
SET HMGPATH=e:\hmg.3.0.40\
Color 04
@echo ********************************************************************************
@echo This batch passes information to compile hbmk2 for easy and clean
@echo is distributed as is and does not guarantee error-free
@echo if you find one you can write danielmaximiliano@yahoo.com.ar
@echo Based on a distributed Build.bat HMG Roberto Lopez Project
@echo ********************************************************************************
@echo.
@echo Enter the name of the project to compile, assumes the extension .HBP if it exists
@echo in the project folder , but will compile the file .PRG
@echo.
@echo "<Enter>" Batch leaves
@echo.
color 07
Set /p Filename=Name of Application:=
@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 Extras parameters to compile %Filename%%extension%
@echo.
@echo /n Do not run after compile
@echo /d enable DEBUG
@echo /c Mode D.O.S CONSOLE
@echo.
@echo Note: " With <Enter> no parameter is passed"
@echo *******************************************************************************
@echo.
Set /p Parameter=Parameters :=
@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 compiling with parameters
if EXIST %Filename%.hbp Goto HBPParameters
if EXIST %Filename%.prg Goto PRGParameters
goto Cleanvar
:HBPParameters
@Echo compiling %Filename%.hbp %Parameter%
call %HMGPATH%build.bat %filename%.hbp %Parameter%
goto Cleanvar
:PRGParameters
Echo compiling %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
SET PATH=%Backup%;;%HMGPATH%\mingw\bin
@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=)
- Mybuild.rar
- Idioma/Languaje
Español : Mibuild.bat
English : MyBuild.bat - (2.44 KiB) Downloaded 182 times
save the folder where your application to compile.
if you want to see how it works build.bat can edit, delete "-q" on line 102
from Windows Explorer, drag and drop your application on MyBuild.bat
or doubleclick on MyBuild.bat thus compile your application interactively.
only need to enter the name of your application, if any project is compiled it, but compile myaplication.prg