New and Blue
My prg files build successfully residing in the c:\hmg3.4.3\mysourcecode directory using "..\build myprog.prg"
However, I want to put files together in a sub-directory off mySourceCode - as in c:\hmg3.4.3\mysourcecode \ProjectXZY
Looking at the HMG SAMPLES directory, there are complex (for me) batch files that work for samples in the SAMPLES directory.
How can I most easily make a batch file for my own subdirectory? Just moving BUILD.BAT does not do it.
Thanks
How to Change source directory
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
How to Change source directory
In my mind it's hard to put all your projects inside HMG installation folder.
I use to separate my projects in "My_Sources" and then I make subdirectories for each project.
Any way, I believe you can based on Build.bat of any HMG in SAMPLES directory. But you will need replace SAMPLES by mysourcecode (no spaces or must be quoted). I do not tested, but I believe it can works (if you have .hbp file ofcourse) in each your project.
I use much IDE. So easy and practical.
I use to separate my projects in "My_Sources" and then I make subdirectories for each project.
Any way, I believe you can based on Build.bat of any HMG in SAMPLES directory. But you will need replace SAMPLES by mysourcecode (no spaces or must be quoted). I do not tested, but I believe it can works (if you have .hbp file ofcourse) in each your project.
I use much IDE. So easy and practical.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: How to Change source directory
bluebird
In your project directory (c:\hmg3.4.3\mysourcecode\ProjectXZY), create build.cmd file with contents:
and create myprog.hbp file with contents (# - it is comment line):
And run build.cmd.
In your project directory (c:\hmg3.4.3\mysourcecode\ProjectXZY), create build.cmd file with contents:
Code: Select all
call c:\hmg3.4.3\build.bat myprog.hbp
Code: Select all
#harbour options:
#-w3
#hbmk2 options:
#-compr
#sources:
myprog.prg
#myprog1.prg
#myprog2.prg
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: How to Change source directory
Easy, add c:\hmg3.4.3 to PATH
and use build myprog.hbp
and use build myprog.hbp
Re: How to Change source directory
Kind Friend,
please correct this amateur batch file attempt to build mtxtest.hbp which resides in MySourceCode\mtxtestDir
Tel SET Temp1= line comes from the build files in \SAMPLES. I thought it meant the current directory .
BuildMtx.Bat contains
cls
SET Temp1=%~dp0
set PATH=c:\hmg3.4.3
build.bat mtxtest.hbp
please correct this amateur batch file attempt to build mtxtest.hbp which resides in MySourceCode\mtxtestDir
Tel SET Temp1= line comes from the build files in \SAMPLES. I thought it meant the current directory .
BuildMtx.Bat contains
cls
SET Temp1=%~dp0
set PATH=c:\hmg3.4.3
build.bat mtxtest.hbp
Re: How to Change source directory
Hola
La manera mas facíl ( para mí ), es crear un .bat en cada carpeta que tenga un proyecto
para compilar, con lo siguiente:
c.bat
******************************************
echo off
cls
D:\HMG\3.4.3\build agl-shell
******************************************
en donde solo cambio el nombre del programa principal.
------------------------------------------------------------------------------------------------------------
Hello
The easiest way (for me) is to create a .bat in every folder that has a project
To compile, with the following:
c.bat
******************************************
echo off
cls
D:\HMG\3.4.3\build agl-shell
******************************************
Where only the name of the main program changes.
If I change version of HMG, I only add
c.bat
******************************************
echo off
cls
rem D:\HMG\3.4.3\build agl-shell
D:\HMG\3.x.x\build agl-shell
******************************************
La manera mas facíl ( para mí ), es crear un .bat en cada carpeta que tenga un proyecto
para compilar, con lo siguiente:
c.bat
******************************************
echo off
cls
D:\HMG\3.4.3\build agl-shell
******************************************
en donde solo cambio el nombre del programa principal.
------------------------------------------------------------------------------------------------------------
Hello
The easiest way (for me) is to create a .bat in every folder that has a project
To compile, with the following:
c.bat
******************************************
echo off
cls
D:\HMG\3.4.3\build agl-shell
******************************************
Where only the name of the main program changes.
If I change version of HMG, I only add
c.bat
******************************************
echo off
cls
rem D:\HMG\3.4.3\build agl-shell
D:\HMG\3.x.x\build agl-shell
******************************************
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
-
- Posts: 190
- Joined: Wed Jan 06, 2010 5:39 pm
Re: How to Change source directory
I create a compile.bat with this line in the directory of the prg programm
FOR %%x IN (*.prg) DO (CALL c:\hmg.3.4.3\build.bat %%x )
It looks for all prg files in the current directory and compile them. You can replace prg by hbp.
That's all!
FOR %%x IN (*.prg) DO (CALL c:\hmg.3.4.3\build.bat %%x )
It looks for all prg files in the current directory and compile them. You can replace prg by hbp.
That's all!