General Help regarding HMG, Compilation, Linking, Samples
Moderator: Rathinagiri
-
AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
hi,
when using CMD-Box and BUILD.BAT it will include PATH for HMG
Code: Select all
SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\mingw\bin;%PATH%
this will be done every time i use it in CMD-Box ...
how to modify BUILD.BAT to SET PATH "once" ( check if already in PATH )
have fun
Jimmy
-
trmpluym
- Posts: 303
- Joined: Tue Jul 15, 2014 6:52 pm
- Location: The Netherlands
Post
by trmpluym »
path|find /i "%HMGPATH%\harbour\bin" >nul || set path=%HMGPATH%\harbour\bin;%path%
path|find /i "%HMGPATH%\mingw\bin" >nul || set path=%HMGPATH%\mingw\bin;%path%
-
Anand
- Posts: 595
- Joined: Tue May 24, 2016 4:36 pm
- DBs Used: DBF
Post
by Anand »
trmpluym wrote: ↑Sat May 16, 2020 8:27 am
path|find /i "%HMGPATH%\harbour\bin" >nul || set path=%HMGPATH%\harbour\bin;%path%
path|find /i "%HMGPATH%\mingw\bin" >nul || set path=%HMGPATH%\mingw\bin;%path%
Never knew about this trick.
We learn each day !
Regards,
Anand
Regards,
Anand
-
dragancesu
- Posts: 920
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Post
by dragancesu »
Just add c:\hmg.3.4.4 in PATH
control panel'-> system -> advanced system setting -> environment variables
in section system in PATH add hmgpath
-
AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
hi,
dragancesu wrote: ↑Sat May 16, 2020 12:03 pm
Just add c:\hmg.3.4.4 in PATH
thx
Code: Select all
rundll32.exe sysdm.cpl,EditEnvironmentVariables
it is not "only" HMG ... need it also for Extended Version or FiveWin when using *.BAT in CMD-Box
have fun
Jimmy
-
AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
hi,
trmpluym wrote: ↑Sat May 16, 2020 8:27 am
path|find /i "%HMGPATH%\harbour\bin" >nul || set path=%HMGPATH%\harbour\bin;%path%
path|find /i "%HMGPATH%\mingw\bin" >nul || set path=%HMGPATH%\mingw\bin;%path%
it is long time ago that i work with *.BAT Syntax.
how to write it with GOTO
Code: Select all
@echo off
IF EXIST %1 GOTO ERRORRAUS
// do something here
goto OKRAUS
:ERRORRAUS
CLS
ECHO.
ECHO Das File %1 existiert schon !!!
:OKRAUS
i like to "skip" Section of SET PATH when exist
have fun
Jimmy
-
trmpluym
- Posts: 303
- Joined: Tue Jul 15, 2014 6:52 pm
- Location: The Netherlands
Post
by trmpluym »
i like to "skip" Section of SET PATH when exist
Code: Select all
path|find /i "%HMGPATH%\harbour\bin" >nul || GOTO SETPATH
GOTO END
:SETPATH
set path=%HMGPATH%\harbour\bin;%path%
:END
-
AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
trmpluym wrote: ↑Sat May 16, 2020 6:27 pm
i like to "skip" Section of SET PATH when exist
Code: Select all
path|find /i "%HMGPATH%\harbour\bin" >nul || GOTO SETPATH
GOTO END
:SETPATH
set path=%HMGPATH%\harbour\bin;%path%
:END
thats it, THX
have fun
Jimmy