2012-11-10 14:30 UTC+0100 Viktor Szakats (harbour syenar.net)

+ utils/hbmk2/pkg_dynl.hbm
  * utils/hbmk2/hbmk2.prg
    + added built-in package $hb_pkg_dynlib.hbm which adds
      hbmk2 options needed to build standard dynamic libs out
      of lib projects the same way contribs are built when
      using HB_BUILD_CONTRIB_DYN=yes.

  * utils/hbmk2/pkg_inst.hbm
    ! fixed to place target dynamic libs to main project
      directory, so they can be used right away

  * extras/hbvpdf/hbvpdf.hbp
  - extras/hbvpdf/hbvpdf.prg
  + extras/hbvpdf/core.prg
  - extras/hbvpdf/hbvpsup.prg
  + extras/hbvpdf/fonts.prg
    * renamed source to not collide with .hbx file
    * renamed other source to simpler name
    * fonts.prg hbformatted

  * extras/gtwvw/gtwvw.hbp
  * extras/hbusb/hbusb.hbp
  * extras/hbvpdf/hbvpdf.hbp
  * extras/hbxlsxml/hbxlsxml.hbp
    + added $hb_pkg_dynlib.hbm built-in build rules,
      so now these can be built as dynamic libs using
      command:
         'hbmk2 -hbdyn <name>.hbp'

  * extras/gtwvw/gtwvwd.c
    ! fixed wrong startup code causing GPF when
      used as hbrun script.

  * extras/hbusb/tests/test.prg
  * extras/hbvpdf/tests/pdf_demo.prg
  * extras/hbxlsxml/tests/example.prg
  * extras/hbxlsxml/tests/example2.prg
  * extras/hbxlsxml/tests/example3.prg
    + added #require directives to make
      them run as scripts.

  * extras/gtwvw/tests/cbtest1.prg
  * extras/gtwvw/tests/cbtest6.prg
  * extras/gtwvw/tests/drawimg.prg
  * extras/gtwvw/tests/ebtest7.prg
  * extras/gtwvw/tests/inpfocus.prg
  * extras/gtwvw/tests/maincoor.prg
  * extras/gtwvw/tests/maximize.prg
  * extras/gtwvw/tests/prog0.prg
  * extras/gtwvw/tests/prog1.prg
  * extras/gtwvw/tests/prog2.prg
  * extras/gtwvw/tests/wvwtest9.hbp
  * extras/gtwvw/tests/wvwtest9.prg
  - extras/gtwvw/tests/wvwmouse.prg
  + extras/gtwvw/tests/_wvwmous.prg
    + added #require directives and dynamic switching
      to GTWVW GT to make them run as scripts.
    * renamed one internal .prg to start with an
      underscore
    * changed the way _wvwmous.prg is added to the
      main project source to make it run as
      script (though the .rc file won't be available
      in this case)

  * extras/hbxlsxml/tests/example.prg
    ! fixed typo in a recent manual cleanup update

  ; After this, 3rd party addons can easily use this
    facility to build and used as dynamic libs, making
    it possible to use them from scripts.

  ; NOTE: I didn't check if these dynamic libs can be 
          linked statically to dependent projects. Left 
          for the future.

  ; TODO: - clean contrib/hbpost.hbm to be more in
            sync with utils/hbmk2/pkg_dynl.hbm
          - inspect if _HB_DYNSUFF can be avoided in
            contrib .hbc files
This commit is contained in:
Viktor Szakats
2012-11-10 13:38:42 +00:00
parent 544ae8990c
commit 6b2ebb5004
30 changed files with 230 additions and 38 deletions

View File

@@ -16,6 +16,87 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-10 14:30 UTC+0100 Viktor Szakats (harbour syenar.net)
+ utils/hbmk2/pkg_dynl.hbm
* utils/hbmk2/hbmk2.prg
+ added built-in package $hb_pkg_dynlib.hbm which adds
hbmk2 options needed to build standard dynamic libs out
of lib projects the same way contribs are built when
using HB_BUILD_CONTRIB_DYN=yes.
* utils/hbmk2/pkg_inst.hbm
! fixed to place target dynamic libs to main project
directory, so they can be used right away
* extras/hbvpdf/hbvpdf.hbp
- extras/hbvpdf/hbvpdf.prg
+ extras/hbvpdf/core.prg
- extras/hbvpdf/hbvpsup.prg
+ extras/hbvpdf/fonts.prg
* renamed source to not collide with .hbx file
* renamed other source to simpler name
* fonts.prg hbformatted
* extras/gtwvw/gtwvw.hbp
* extras/hbusb/hbusb.hbp
* extras/hbvpdf/hbvpdf.hbp
* extras/hbxlsxml/hbxlsxml.hbp
+ added $hb_pkg_dynlib.hbm built-in build rules,
so now these can be built as dynamic libs using
command:
'hbmk2 -hbdyn <name>.hbp'
* extras/gtwvw/gtwvwd.c
! fixed wrong startup code causing GPF when
used as hbrun script.
* extras/hbusb/tests/test.prg
* extras/hbvpdf/tests/pdf_demo.prg
* extras/hbxlsxml/tests/example.prg
* extras/hbxlsxml/tests/example2.prg
* extras/hbxlsxml/tests/example3.prg
+ added #require directives to make
them run as scripts.
* extras/gtwvw/tests/cbtest1.prg
* extras/gtwvw/tests/cbtest6.prg
* extras/gtwvw/tests/drawimg.prg
* extras/gtwvw/tests/ebtest7.prg
* extras/gtwvw/tests/inpfocus.prg
* extras/gtwvw/tests/maincoor.prg
* extras/gtwvw/tests/maximize.prg
* extras/gtwvw/tests/prog0.prg
* extras/gtwvw/tests/prog1.prg
* extras/gtwvw/tests/prog2.prg
* extras/gtwvw/tests/wvwtest9.hbp
* extras/gtwvw/tests/wvwtest9.prg
- extras/gtwvw/tests/wvwmouse.prg
+ extras/gtwvw/tests/_wvwmous.prg
+ added #require directives and dynamic switching
to GTWVW GT to make them run as scripts.
* renamed one internal .prg to start with an
underscore
* changed the way _wvwmous.prg is added to the
main project source to make it run as
script (though the .rc file won't be available
in this case)
* extras/hbxlsxml/tests/example.prg
! fixed typo in a recent manual cleanup update
; After this, 3rd party addons can easily use this
facility to build and used as dynamic libs, making
it possible to use them from scripts.
; NOTE: I didn't check if these dynamic libs can be
linked statically to dependent projects. Left
for the future.
; TODO: - clean contrib/hbpost.hbm to be more in
sync with utils/hbmk2/pkg_dynl.hbm
- inspect if _HB_DYNSUFF can be avoided in
contrib .hbc files
2012-11-10 03:59 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/bitmap.prg
* contrib/gtwvg/drawarea.prg

View File

@@ -33,4 +33,5 @@ wvwtbar.c
# NOTE: Due to large quantity of unprecise code, it doesn't build in C++ mode.
-warn=no
$hb_pkg_dynlib.hbm
$hb_pkg_install.hbm

View File

@@ -456,7 +456,10 @@ static void hb_gt_wvw_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
s_iStdErr = hFilenoStderr;
if( ! hb_winmainArgGet( &hInstance, &hPrevInstance, &iCmdShow ) )
hb_errInternal( 10001, "It's not a GUI program", NULL, NULL );
{
hInstance = GetModuleHandle( NULL );
iCmdShow = 1;
}
s_iOldCurStyle = s_iCursorStyle = SC_NORMAL;

View File

@@ -12,6 +12,7 @@
Compile: bldwvw cbtest1
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
@@ -35,6 +36,10 @@ PROCEDURE Main()
LOCAL nMaxWidth, nCBid, nPBid, nPos
LOCAL ch, ncursor
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SetColor( "N/W" )
WVW_SetTitle( NIL, "Quick Survey" )
WVW_NoClose( NIL )

View File

@@ -14,6 +14,8 @@
Compile: bldwvw cbtest6
*/
#require "gtwvw"
#include "getexit.ch"
#include "inkey.ch"
@@ -58,6 +60,10 @@ PROCEDURE Main()
LOCAL mname := PadR( "Budyanto Dj.", 30 ), msex := "MALE", mage := 17, mstat := "married"
LOCAL __nCBid__, __temp__ // these two are temporary var required by CB get creation
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
WVW_SetCodePage( NIL, 255 )
WVW_SetLineSpacing( NIL, 4 )
WVW_SetLSpaceColor( NIL, 0 )

View File

@@ -27,11 +27,13 @@
of the image.
Remarks:
Image drawing and wvw_paint management are performed by WUTIL.PRG.
WUTIL.PRG is a simple "middle module" interfacing an application with
Image drawing and wvw_paint management are performed by wutil.prg.
wutil.prg is a simple "middle module" interfacing an application with
gtwvw.
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
#include "hbclass.ch"
@@ -88,6 +90,10 @@ PROCEDURE Main()
LOCAL i, j, oWPaint
LOCAL getlist := {}
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SetColor( "N/W,N/GR*,,,N/W*" )
wvw_setcodepage( , 255 )
wg_ResetWPaintObj( 0 )

View File

@@ -23,6 +23,8 @@
*/
#require "gtwvw"
#include "inkey.ch"
#include "set.ch"
#include "setcurs.ch"
@@ -60,8 +62,13 @@ PROCEDURE Main()
LOCAL lClosepermitted := .F.
LOCAL bSetKey := SetKey( K_F8, {|| MyHelp() } )
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SET CENTURY ON
SET DATE ANSI
SET CENTURY ON
SetMode( 4, 54 ) // a small window
SetColor( "N/W" )
Wvw_SetFont( 0, "Courier New", 16, - 7 )

View File

@@ -10,6 +10,8 @@
*
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
@@ -49,6 +51,10 @@ PROCEDURE Main()
LOCAL ch
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
IF ! SetMode( 25, 80 )
wvw_messagebox( 0, "Cannot set to (25,80) screen", "Warning", MB_OK + MB_ICONEXCLAMATION )
ENDIF

View File

@@ -9,10 +9,16 @@
Standard Mode of GTWVW.
*/
#require "gtwvw"
#include "inkey.ch"
PROCEDURE Main()
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SetColor( "N/W" )
WVW_SetMainCoord( .F. ) // Standard Mode

View File

@@ -7,6 +7,8 @@
budyanto@centrin.net.id
*/
#require "gtwvw"
#include "inkey.ch"
// this dimension will be used when user presses RESTORE button
@@ -19,6 +21,10 @@ PROCEDURE Main()
LOCAL ch
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
// activate WVW_SIZE()
s_lSizeReady := .T.

View File

@@ -11,12 +11,9 @@
Note that this Clipper program uses ZNEWWINDOW() and ZREVWINDOW() to
open and close every pseudo-windows respectively.
Compiling and linking in Clipper:
clipper prog0 -m -n -w
blinker file prog0
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
@@ -28,6 +25,10 @@ PROCEDURE Main()
LOCAL i, j
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SET SCOREBOARD OFF
SetColor( s_cStdColor )
SetCursor( SC_NONE )

View File

@@ -24,15 +24,9 @@
All changes are guarded by #ifdef, so this program is still compilable
in Clipper resulting its original behaviour.
Compiling and linking in Clipper:
clipper prog1 -m -n -w
blinker file prog1
Compiling and linking in xHarbour:
requires GTWVW
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
@@ -52,6 +46,11 @@ PROCEDURE Main()
WVW_SetCodePage( , 255 )
#endif
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SET SCOREBOARD OFF
SetColor( s_cStdColor )
SetCursor( SC_NONE )

View File

@@ -11,16 +11,9 @@
pseudo-GUI objects onto each window, one by one.
Notes: GTWVW now also has native Windows Controls. See other samples.
Compiling and linking in Clipper:
clipper prog2 -m -n -w
blinker file prog2
See also
Compiling and linking in xHarbour:
requires GTWVW
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
@@ -48,6 +41,10 @@ PROCEDURE Main()
WVW_SBcreate()
#endif
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SET SCOREBOARD OFF
SetColor( s_cStdColor )
SetCursor( SC_NONE )

View File

@@ -4,5 +4,3 @@
wvwtest9.prg
wvwtest9.rc
wvwmouse.prg

View File

@@ -24,11 +24,11 @@
/*
Compile/Link info:
This program requires WVWMOUSE.PRG.
You may use 'hbmk2 wvwtest9.hbp' to build this program.
*/
#require "gtwvw"
#include "inkey.ch"
#include "setcurs.ch"
#include "hbgtinfo.ch"
@@ -174,9 +174,14 @@ PROCEDURE Main()
LOCAL oMouse
LOCAL ch
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVW" )
#endif
SET( _SET_EVENTMASK, INKEY_ALL )
SET DATE ANSI
SET CENTURY ON
SET SCOREBOARD OFF
// wvw_SetPaintRefresh( 0 )
wvw_SetVertCaret( .T. )
@@ -1297,3 +1302,5 @@ PROCEDURE pause()
Inkey( 0 )
RETURN
SET PROCEDURE TO "_wvwmous.prg"

View File

@@ -23,4 +23,7 @@ hbusb.hbx
core.c
{hbdyn}hbusb.hbc
$hb_pkg_dynlib.hbm
$hb_pkg_install.hbm

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbusb"
#include "simpleio.ch"
#include "hbusb.ch"

View File

@@ -0,0 +1,7 @@
/*
* $Id$
*/
FUNCTION __pdf_FontsDat()
#pragma __streaminclude "fonts.dat" | RETURN %s

View File

@@ -13,7 +13,8 @@
hbvpdf.hbx
hbvpdf.prg
hbvpsup.prg
core.prg
fonts.prg
$hb_pkg_dynlib.hbm
$hb_pkg_install.hbm

View File

@@ -1,6 +0,0 @@
/*
* $Id$
*/
FUNCTION __pdf_FontsDat()
#pragma __streaminclude "fonts.dat" | RETURN %s

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbvpdf"
#include "hbvpdf.ch"
PROCEDURE Main()

View File

@@ -17,4 +17,5 @@ xlsxml.prg
xlsxml_s.prg
xlsxml_y.prg
$hb_pkg_dynlib.hbm
$hb_pkg_install.hbm

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbxlsxml"
PROCEDURE Main()
LOCAL oXml, oSheet, xarquivo := "example.xml"
@@ -225,7 +227,7 @@ PROCEDURE Main()
Date() - 50 - i, ;
"5.102", ;
StrZero( i, 5 ), ;
"NOME DO CLIENTE TESTE " + hb_ntos( i ) ), ;
"NOME DO CLIENTE TESTE " + hb_ntos( i ), ;
"PR", ;
i * 100, ;
i * 100 * 0.90, ;

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbxlsxml"
PROCEDURE Main()
LOCAL xml, format1, format2, format3, format4

View File

@@ -52,6 +52,8 @@
*
*/
#require "hbxlsxml"
PROCEDURE Main()
LOCAL xml, sheet1, format4

View File

@@ -10381,6 +10381,9 @@ STATIC FUNCTION ValueIsF( cString )
/* built-in files */
STATIC FUNCTION hbmk_builtin_File_hb_pkg_dynlib()
#pragma __streaminclude "pkg_dynl.hbm" | RETURN %s
STATIC FUNCTION hbmk_builtin_File_hb_pkg_install()
#pragma __streaminclude "pkg_inst.hbm" | RETURN %s
@@ -10391,6 +10394,7 @@ STATIC FUNCTION hbmk_builtin_File_hb_pkg_install()
STATIC FUNCTION hbmk_builtin_List()
STATIC s_hHBM_BuildIn := { ;
_HBMK_BUILDIN_FILENAME_MARKER_ + "hb_pkg_dynlib.hbm" => {|| hbmk_builtin_File_hb_pkg_dynlib() } , ;
_HBMK_BUILDIN_FILENAME_MARKER_ + "hb_pkg_install.hbm" => {|| hbmk_builtin_File_hb_pkg_install() } }
RETURN s_hHBM_BuildIn

View File

@@ -0,0 +1,42 @@
#
# $Id$
#
# dynamic lib creation settings
# Do not generate .hbx when building dynamic libs.
# It would cause core functions referenced from lib .prg
# code to appear in the .hbx.
{hbdyn}-hbx=
{hbdyn}-shared
{hbdyn}-implib=lib/${hb_plat}/${hb_comp}${hb_build}/
{hbdyn&hb_dynsuffix}-implib=${hb_outputname}${hb_dynsuffix}
{hbdyn&!hb_dynsuffix}-implib=${hb_outputname}_dll
{hbdyn&unix&!cygwin}-ln=${hb_dynprefix}${hb_outputname}${hb_dynext}
{hbdyn&unix&!darwin&!cygwin}-ln=${hb_dynprefix}${hb_outputname}${hb_dynext}.${hb_major}.${hb_minor}
{hbdyn&unix&darwin}-ln=${hb_dynprefix}${hb_outputname}.${hb_major}.${hb_minor}${hb_dynext}
{hbdyn&(allwin|cygwin)}-lhbmaindllp
{hbdyn}-depimplib-
"{hbdyn&darwin}-dflag=-install_name '${hb_dynprefix}${hb_outputname}${hb_dynext}'"
"{hbdyn&darwin}-dflag=-compatibility_version ${hb_major}.${hb_minor}"
"{hbdyn&darwin}-dflag=-current_version ${hb_major}.${hb_minor}.${hb_release}"
"{hbdyn&linux}-dflag=-Wl,-soname,${hb_dynprefix}${hb_outputname}${hb_dynext}.${hb_major}.${hb_minor}"
"{hbdyn&sunos}-dflag=-Wl,-h,${hb_dynprefix}${hb_outputname}${hb_dynext}.${hb_major}.${hb_minor}"
# output name tweaks for dynamic libs
# NOTE: We're altering previously set output name value here
{hbdyn&unix&!darwin&!cygwin}-o${hb_outputname}${hb_dynext}.${hb_major}.${hb_minor}.${hb_release}
{hbdyn&unix&darwin}-o${hb_outputname}.${hb_major}.${hb_minor}.${hb_release}${hb_dynext}
{hbdyn&unix&cygwin}-o${hb_outputname}${hb_dynext}
{hbdyn&!unix&allwin}-o${hb_outputname}-${hb_major}${hb_minor}${hb_dynsuffix}
{hbdyn&!unix&!allwin}-o${hb_outputname}${hb_dynsuffix}
# output dir (in sync with GNU Make)
{hbdyn&unix&!cygwin}-olib/${hb_plat}/${hb_comp}${hb_build}/
{hbdyn&(cygwin|!unix)}-obin/${hb_plat}/${hb_comp}${hb_build}/
# workdir (in sync with GNU Make)
{hbdyn&unix&!cygwin}-workdir=lib/${hb_plat}/${hb_comp}${hb_build}/${hb_work}/${hb_outputname}${hb_workdynsub}
{hbdyn&(cygwin|!unix)}-workdir=bin/${hb_plat}/${hb_comp}${hb_build}/${hb_work}/${hb_outputname}${hb_workdynsub}

View File

@@ -21,16 +21,17 @@
# -----------------------------------------
# static library & dynamic library on *nix
{hblib|(hbdyn&unix)}-instpath=${HB_ADDONS}/${hb_name}/lib/${hb_plat}/${hb_comp}/
{hblib}-instpath=${HB_ADDONS}/${hb_name}/lib/${hb_plat}/${hb_comp}/
# dynamic library on non-*nix
{hbdyn&!unix}-instpath=${HB_ADDONS}/${hb_name}/bin/${hb_plat}/${hb_comp}/
{hbdyn&!unix}-instpath=${HB_BIN}/
{hbdyn&unix}-instpath=${HB_LIB}/
# import library on non-*nix
-instpath=implib:${HB_ADDONS}/${hb_name}/lib/${hb_plat}/${hb_comp}/
# dynamic libraries belonging to project dependencies
{hbdyn&(win|os2)&HB_INSTALL_3RDDYN='yes'}-instpath=depimplibsrc:${HB_ADDONS}/${hb_name}/bin/${hb_plat}/${hb_comp}/
{hbdyn&(win|os2)&HB_INSTALL_3RDDYN='yes'}-instpath=depimplibsrc:${HB_BIN}/
# import libraries belonging to project dependencies
{!(HB_INSTALL_IMPLIB='no')}-instpath=depimplib:${HB_ADDONS}/${hb_name}/lib/${hb_plat}/${hb_comp}/