2010-07-30 18:13 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
+ Added -depimplib[-] option to contrib implib creation for
dependency dlls.
+ Added -autohbm[-] cmdline-only option to disable processing of
hbmk.hbm in current directory.
* contrib/hbpost.hbm
+ Disabled implib creation for dependency dlls for HB_BUILD_CONTRIB_DYN
mode.
* contrib/hbgd/hbgd.hbp
! Fixed to use .lib as implib source for coff-compatible targets and mingw.
; NOTE: Successfully created a small test app which uses harbour.dll and
contrib .dlls:
'contrib\hbct\tests\hbmk2 addascii.prg -lhbct_dll -shared -autohbm-'
'contrib\hbpgsql\tests\hbmk2 async.prg -lhbpgsql_dll -shared -autohbm-'
(-autohbm is there only to disable hbmk.hbm processing)
Quite nice, isn't it?
For these examples, there are problems:
'contrib\hbblat\tests\hbmk2 blatcmd.prg -lhbblat_dll -lhbwin_dll -shared -autohbm-'
It's showing application errro 0xc0000142.
For this other one:
'contrib\hbgd\tests\hbmk2 barms.prg -lhbgd_dll -shared -autohbm-'
It's showing this RTE:
---
Error BASE/3003 Cannot find super class: __CLSINSTSUPER
Called from __CLSINSTSUPER(0)
Called from HBCLASS:CREATE(0)
Called from TCODE(0)
Called from MAIN(30)
---
"Almost" there. If you have any idea why it fails, pls tell.
Loading contrib pcode .dlls dynamically:
--- hbmk2 testdyn.prg -shared -autohbm-
DYNAMIC CHARADD
PROCEDURE Main()
LOCAL l := hb_libLoad( "hbct.dll" )
IF ! Empty( l )
QOUT( CHARADD( "abc", Chr( 1 ) ) )
ENDIF
RETURN
---
Running it results in:
---
Error BASE/1001 Undefined function: CHARADD
Called from CHARADD(0)
Called from MAIN(7)
---
This commit is contained in:
@@ -16,6 +16,60 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-30 18:13 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added -depimplib[-] option to contrib implib creation for
|
||||
dependency dlls.
|
||||
+ Added -autohbm[-] cmdline-only option to disable processing of
|
||||
hbmk.hbm in current directory.
|
||||
|
||||
* contrib/hbpost.hbm
|
||||
+ Disabled implib creation for dependency dlls for HB_BUILD_CONTRIB_DYN
|
||||
mode.
|
||||
|
||||
* contrib/hbgd/hbgd.hbp
|
||||
! Fixed to use .lib as implib source for coff-compatible targets and mingw.
|
||||
|
||||
; NOTE: Successfully created a small test app which uses harbour.dll and
|
||||
contrib .dlls:
|
||||
'contrib\hbct\tests\hbmk2 addascii.prg -lhbct_dll -shared -autohbm-'
|
||||
'contrib\hbpgsql\tests\hbmk2 async.prg -lhbpgsql_dll -shared -autohbm-'
|
||||
(-autohbm is there only to disable hbmk.hbm processing)
|
||||
Quite nice, isn't it?
|
||||
For these examples, there are problems:
|
||||
'contrib\hbblat\tests\hbmk2 blatcmd.prg -lhbblat_dll -lhbwin_dll -shared -autohbm-'
|
||||
It's showing application errro 0xc0000142.
|
||||
For this other one:
|
||||
'contrib\hbgd\tests\hbmk2 barms.prg -lhbgd_dll -shared -autohbm-'
|
||||
It's showing this RTE:
|
||||
---
|
||||
Error BASE/3003 Cannot find super class: __CLSINSTSUPER
|
||||
Called from __CLSINSTSUPER(0)
|
||||
Called from HBCLASS:CREATE(0)
|
||||
Called from TCODE(0)
|
||||
Called from MAIN(30)
|
||||
---
|
||||
"Almost" there. If you have any idea why it fails, pls tell.
|
||||
|
||||
Loading contrib pcode .dlls dynamically:
|
||||
|
||||
--- hbmk2 testdyn.prg -shared -autohbm-
|
||||
DYNAMIC CHARADD
|
||||
|
||||
PROCEDURE Main()
|
||||
LOCAL l := hb_libLoad( "hbct.dll" )
|
||||
IF ! Empty( l )
|
||||
QOUT( CHARADD( "abc", Chr( 1 ) ) )
|
||||
ENDIF
|
||||
RETURN
|
||||
---
|
||||
Running it results in:
|
||||
---
|
||||
Error BASE/1001 Undefined function: CHARADD
|
||||
Called from CHARADD(0)
|
||||
Called from MAIN(7)
|
||||
---
|
||||
|
||||
2010-07-30 16:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
! Fixed RTE when using post-process command on systems without
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
-depcontrol=gd:${HB_WITH_GD}
|
||||
-depincpath=gd:/usr/include
|
||||
-depincpath=gd:/opt/local/include
|
||||
-depimplibs=gd:../bin/bgd.dll
|
||||
-depimplibs=gd:../bin/bgd.dll{!(msvc|pocc|mingw)}
|
||||
-depimplibs=gd:../lib/bgd.lib{msvc|pocc|mingw}
|
||||
|
||||
-instfile=inc:gd.ch
|
||||
-instfile=inc:gdextern.ch
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
{_HB_BUILD_LIBDYN}-shared
|
||||
{_HB_BUILD_LIBDYN}-implib=../lib/${hb_plat}/${hb_comp}${hb_build}/
|
||||
{_HB_BUILD_LIBDYN&allwin}-lhbmaindllp
|
||||
{_HB_BUILD_LIBDYN}-depimplib-
|
||||
|
||||
{hblib}-o../lib/${hb_plat}/${hb_comp}${hb_build}/
|
||||
{hbexe|hbdyn}-o../bin/${hb_plat}/${hb_comp}${hb_build}/
|
||||
|
||||
@@ -410,13 +410,14 @@ REQUEST hbmk_KEYW
|
||||
#define _HBMK_nCOMPVer 118
|
||||
#define _HBMK_lDEPIMPLIB 119 /* Generate import libs configured in dependecy specification */
|
||||
#define _HBMK_lInstForce 120 /* Force to install target even if was up to date */
|
||||
#define _HBMK_lAutoHBM 121 /* Toggles processing of hbmk.hbm file in current directory */
|
||||
|
||||
#define _HBMK_aArgs 121
|
||||
#define _HBMK_nArgTarget 122
|
||||
#define _HBMK_lPause 123
|
||||
#define _HBMK_nLevel 124
|
||||
#define _HBMK_aArgs 122
|
||||
#define _HBMK_nArgTarget 123
|
||||
#define _HBMK_lPause 124
|
||||
#define _HBMK_nLevel 125
|
||||
|
||||
#define _HBMK_MAX_ 124
|
||||
#define _HBMK_MAX_ 125
|
||||
|
||||
#define _HBMK_DEP_CTRL_MARKER ".control." /* must be an invalid path */
|
||||
|
||||
@@ -913,6 +914,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
hbmk[ _HBMK_hDEPTSDIR ] := { => }
|
||||
|
||||
hbmk[ _HBMK_lInstForce ] := .F.
|
||||
hbmk[ _HBMK_lAutoHBM ] := .T.
|
||||
|
||||
hbmk[ _HBMK_aArgs ] := aArgs
|
||||
hbmk[ _HBMK_nArgTarget ] := nArgTarget
|
||||
@@ -997,6 +999,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
cParamL == "-exospace" .OR. ;
|
||||
cParamL == "-blinker" ; hbmk[ _HBMK_lInfo ] := .F. ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .F. ; lAcceptLDClipper := .T.
|
||||
CASE cParamL == "-info" ; hbmk[ _HBMK_lInfo ] := .T.
|
||||
CASE cParamL == "-autohbm" ; hbmk[ _HBMK_lAutoHBM ] := .T.
|
||||
CASE cParamL == "-autohbm-" ; hbmk[ _HBMK_lAutoHBM ] := .F.
|
||||
CASE cParamL == "-xhb" ; hbmk[ _HBMK_nHBMODE ] := _HBMODE_XHB
|
||||
CASE cParamL == "-hb10" ; hbmk[ _HBMK_nHBMODE ] := _HBMODE_HB10
|
||||
CASE cParamL == "-hb20" ; hbmk[ _HBMK_nHBMODE ] := _HBMODE_HB20
|
||||
@@ -1796,7 +1800,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
#endif
|
||||
|
||||
/* Process automatic make files in current dir. */
|
||||
IF hb_FileExists( _HBMK_AUTOHBM_NAME )
|
||||
IF hbmk[ _HBMK_lAutoHBM ] .AND. hb_FileExists( _HBMK_AUTOHBM_NAME )
|
||||
IF ! hbmk[ _HBMK_lQuiet ]
|
||||
hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing local make script: %1$s" ), _HBMK_AUTOHBM_NAME ) )
|
||||
ENDIF
|
||||
@@ -1857,6 +1861,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
Left( cParamL, 6 ) == "-lang=" .OR. ;
|
||||
Left( cParamL, 7 ) == "-width=" .OR. ;
|
||||
Left( cParamL, 5 ) == "-env:" .OR. ;
|
||||
cParamL == "-autohbm" .OR. ;
|
||||
cParamL == "-autohbm-" .OR. ;
|
||||
cParamL == "-hbrun" .OR. ;
|
||||
cParamL == "-hbraw" .OR. ;
|
||||
cParamL == "-hbcmp" .OR. ;
|
||||
@@ -1948,6 +1954,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
CASE cParamL == "-strip" ; hbmk[ _HBMK_lSTRIP ] := .T.
|
||||
CASE cParamL == "-strip-" .OR. ;
|
||||
cParamL == "-nostrip" ; hbmk[ _HBMK_lSTRIP ] := .F.
|
||||
CASE cParamL == "-depimplib" ; hbmk[ _HBMK_lDEPIMPLIB ] := .T.
|
||||
CASE cParamL == "-depimplib-" ; hbmk[ _HBMK_lDEPIMPLIB ] := .F.
|
||||
CASE cParamL == "-instforce" ; hbmk[ _HBMK_lInstForce ] := .T.
|
||||
CASE cParamL == "-instforce-" ; hbmk[ _HBMK_lInstForce ] := .F.
|
||||
|
||||
@@ -11002,6 +11010,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
|
||||
{ "-instfile=<g:file>" , I_( "add <file> in to the list of files to be copied to path specified by -instpath option. <g> is an optional copy group, it must be at least two characters long." ) },;
|
||||
{ "-instpath=<g:path>" , I_( "copy target to <path>. if <path> is a directory, it should end with path separatorm, in this case files specified by -instfile option will also be copied. can be specified multiple times. <g> is an optional copy group, it must be at least two characters long. Build target will be automatically copied to default (empty) copy group." ) },;
|
||||
{ "-instforce[-]" , I_( "copy target to install path even if it is up to date" ) },;
|
||||
{ "-depimplib[-]" , I_( "enable (or disable) import library generation for import library sources specified in -depimplibs= options (default: yes)" ) },;
|
||||
{ "-stop[=<text>]" , I_( "stop without doing anything and display <text> if specified" ) },;
|
||||
{ "-echo=<text>" , I_( "echo text on screen" ) },;
|
||||
{ "-pause" , I_( "force waiting for a key on exit in case of failure (with alternate GTs only)" ) },;
|
||||
@@ -11058,6 +11067,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
|
||||
{ "-hbcmp|-clipper" , I_( "stop after creating the object files\ncreate link/copy hbmk2 to hbcmp/clipper for the same effect" ) },;
|
||||
{ "-hbcc" , I_( "stop after creating the object files and accept raw C flags\ncreate link/copy hbmk2 to hbcc for the same effect" ) },;
|
||||
{ "-hblnk" , I_( "accept raw linker flags" ) },;
|
||||
{ "-autohbm[-]" , hb_StrFormat( I_( "enable (or disable) processing of %1$s in current directory (default: yes)" ), _HBMK_AUTOHBM_NAME ) },;
|
||||
{ "-hb10" , I_( "enable Harbour 1.0.x compatibility mode" ) },;
|
||||
{ "-hb20" , I_( "enable Harbour 2.0.x compatibility mode" ) },;
|
||||
{ "-xhb" , I_( "enable xhb mode" ) },;
|
||||
|
||||
Reference in New Issue
Block a user