Dos application help

Dos application help

Postby Silvio.Falconi » Thu Aug 17, 2017 4:59 pm

Someone can help me to create a small harbour dos test ?
I need a bat file to compile thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Dos application help

Postby Enrico Maria Giordano » Thu Aug 17, 2017 7:26 pm

Do you mean a real dos 16-bit application or just a Windows console application?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Dos application help

Postby Silvio.Falconi » Fri Aug 18, 2017 5:13 pm

Ho visto un programma in un supermercato e mi hanno detto che era stato fatto in harbour ...
era in dos ho visto anche la cartella con i dbf
volevo sapere come si faceva
perchè ho visto che era veloce
fare un prg magazzino mi piacerebbe per la scuola
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Dos application help

Postby anserkk » Sat Aug 19, 2017 4:47 am

Silvio.Falconi wrote:Someone can help me to create a small harbour dos test ?
I need a bat file to compile thanks


Long time back, I tried compiling one of my 16 bit clipper applications using Harbour. It worked fine, except some minor issues in the Tbrowse classs.

Here is the rmk file that I used

Code: Select all  Expand view
#Borland make sample, (c) FiveTech Software 2005

HBDIR=D:\Harbour
BCDIR=D:\bcc582
FWDIR=D:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
.\MyApp.PRG   \
.\MyPrg1.PRG    \
.\MyPrg2.PRG

C =          \

OBJ = $(PRG:.PRG=.OBJ)
OBJS = $(OBJ:.\=.\obj\)

PROJECT    : MyApp.exe

MyApp.exe  : $(OBJS) $(C:.C=.OBJ) MyApp.res
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo $(OBJS), + >> b32.bc
   echo MyApp.exe, + >> b32.bc
   echo MyApp.map, + >> b32.bc
   rem echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtwvt.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\hbpcre.lib + >> b32.bc
   echo $(HBDIR)\lib\xhb.lib + >> b32.bc
   echo $(HBDIR)\lib\hbziparc.lib + >> b32.bc
   echo $(HBDIR)\lib\hbmzip.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzlib.lib + >> b32.bc
   echo $(HBDIR)\lib\minizip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   rem Uncomment the below 2 lines if u want to use TDolphin
   rem echo $(FWDIR)\lib\dolphin.lib + >> b32.bc
   rem echo $(FWDIR)\lib\libmysql.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

   IF EXIST MyApp.res echo MyApp.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /N /W0 /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

MyApp.res : MyApp.rc
  D:\PellesC\Bin\PORC.EXE MyApp.rc   /I D:\pellesc\include /I D:\pellesc\include\win


In the Main PRG, I had to include the following lines at the beginning.

Code: Select all  Expand view
ANNOUNCE HB_GT_SYS
REQUEST HB_GT_WVT_DEFAULT
//-------------------------------------------------//
Function Main()


Tried this just to experiment. I remember that while scrolling on TBrowse, the row highlight painting was not proper. ie while scrolling thru rows, all the previous rows were also painted like the current row ie TBrowse was failing to repaint the rows above the current row.

Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Dos application help

Postby Silvio.Falconi » Sat Aug 19, 2017 7:45 pm

thanks anserkk
I have many prg to converte on fwh or window
many prg I not remember How was the exe and now I cannot see it on 64bit
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Dos application help

Postby RAMESHBABU » Sun Aug 20, 2017 1:12 am

Silvio,

Try this. This EXE generated with the following code works fine with Windows10 also.

- Ramesh Babu

TestBrow.prg

Code: Select all  Expand view


#include "TBrowse.ch"
#include "Box.ch"

ANNOUNCE HB_GTSYS
REQUEST HB_GT_WIN_DEFAULT

#define MY_HEADSEP  "ÄÂÄ"
#define MY_COLSEP   " ³ "
#define MY_FOOTSEP  "ÄÁÄ"

PROCEDURE Main

      LOCAL oTBrowse, oTBColumn
      LOCAL bFieldBlock, cFieldName, i, nKey

      SetMode(25,80)

      USE Customer ALIAS Cust

      @ 1,1,MaxRow()-1,MaxCol()-1 BOX B_SINGLE

      * create TBrowse object
      oTBrowse := TBrowse():new( 2,2, MaxRow()-2, MaxCol()-2 )
      oTBrowse:headSep := MY_HEADSEP
      oTBrowse:footSep := MY_FOOTSEP
      oTBrowse:colSep  := MY_COLSEP

      oTBrowse:colorSpec := "N/BG,W+/B"

      * add code blocks for navigating the record pointer
      oTBrowse:goTopBlock    := {|| DbGoTop() }
      oTBrowse:goBottomBlock := {|| DbGoBottom() }
      oTBrowse:skipBlock     := {|nSkip| DbSkipper(nSkip) }

      * create TBColumn objects and add them to TBrowse object
      FOR i:=1 TO FCount()
         cFieldName  := FieldName( i )
         bFieldBlock := FieldBlock( cFieldName )
         oTBColumn   := TBColumn():new( cFieldName, bFieldBlock )
         oTBrowse:addColumn( oTBColumn )
      NEXT

      * display browser and process user input
      DO WHILE .T.
         oTBrowse:forceStable()
         nKey := Inkey(0)
         IF oTBrowse:applyKey( nKey ) == TBR_EXIT
            EXIT
         ENDIF
      ENDDO

      USE

RETURN

 


Compile/Link Script
Code: Select all  Expand view


@ECHO OFF
CLS

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%XHDIR%" == "" set XHDIR=C:\xharbour

set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=C:\bcc7

%hdir%\bin\harbour %1 /n /i;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\GTWIN.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\tip.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdir%\lib\usrrdd.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\uuid.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\gdi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc

rem uncomment this line to use the debugger and comment the following one
REM if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
rem %1
GOTO EXIT
ECHO

rem delete temporary files
@del %1.c

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi¢n PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT

User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 104 guests