2012-11-02 19:47 UTC+0100 Viktor Szakats (harbour syenar.net)

* config/postinst.hb
    + compile list of all available contrib functions (into
      a file named 'hbmk2.hbr'), so hbmk2 can use it as for
      hints for libs, even if they are not built/installed on 
      the user's system.

  * utils/hbmk2/hbmk2.prg
    * tweaked the hint message for not installed packages
    ! fixed new strings not marked as translatable

  * package/winuni/mpkg_win_uni.bat
  * package/winuni/mpkg_win_uni.nsi
    * include .hbr files in winuni packages

  * contrib/xhb/xdbmodst.prg
  * contrib/xhb/xhbmemo.prg
  * contrib/hbct/disk.c
  * contrib/hbct/doc/en/dattime3.txt
  * contrib/hbct/doc/en/video.txt
  * extras/hbxlsxml/tests/*.prg
  * extras/hbxlsxml/*.prg
  * src/debug/dbgentry.c
    * minor cleanups
This commit is contained in:
Viktor Szakats
2012-11-02 18:52:14 +00:00
parent b1b458112e
commit d8a33f2581
17 changed files with 119 additions and 59 deletions

View File

@@ -16,6 +16,31 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-02 19:47 UTC+0100 Viktor Szakats (harbour syenar.net)
* config/postinst.hb
+ compile list of all available contrib functions (into
a file named 'hbmk2.hbr'), so hbmk2 can use it as for
hints for libs, even if they are not built/installed on
the user's system.
* utils/hbmk2/hbmk2.prg
* tweaked the hint message for not installed packages
! fixed new strings not marked as translatable
* package/winuni/mpkg_win_uni.bat
* package/winuni/mpkg_win_uni.nsi
* include .hbr files in winuni packages
* contrib/xhb/xdbmodst.prg
* contrib/xhb/xhbmemo.prg
* contrib/hbct/disk.c
* contrib/hbct/doc/en/dattime3.txt
* contrib/hbct/doc/en/video.txt
* extras/hbxlsxml/tests/*.prg
* extras/hbxlsxml/*.prg
* src/debug/dbgentry.c
* minor cleanups
2012-11-02 18:13 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
! fixed to use proper harbour root for finding missing

View File

@@ -126,11 +126,11 @@ PROCEDURE Main( ... )
IF hb_DirBuild( PathSepToSelf( GetEnvC( "HB_INSTALL_MAN" ) ) + hb_ps() + "man1" )
FOR EACH tmp IN { ;
"src/main/harbour.1", ;
"src/pp/hbpp.1", ;
"utils/hbmk2/hbmk2.1", ;
"utils/hbtest/hbtest.1", ;
"contrib/hbrun/hbrun.1" }
"src/main/harbour.1", ;
"src/pp/hbpp.1", ;
"utils/hbmk2/hbmk2.1", ;
"utils/hbtest/hbtest.1", ;
"contrib/hbrun/hbrun.1" }
mk_hb_FCopy( tmp, GetEnvC( "HB_INSTALL_MAN" ) + hb_ps() + "man1" + hb_ps(), .T. )
NEXT
ELSE
@@ -193,13 +193,22 @@ PROCEDURE Main( ... )
/* Creating docs for core */
IF ! Empty( tmp := GetEnvC( "HB_INSTALL_DOC" ) ) .AND. ! tmp == "no"
IF ! Empty( tmp := GetEnvC( "HB_INSTALL_DOC" ) ) .AND. !( tmp == "no" )
OutStd( "! Compiling core documentation (.hbd)..." + hb_eol() )
mk_hbd_core( "." + hb_ps(), tmp )
ENDIF
/* Creating compressed archives of available contrib functions */
IF ! Empty( tmp := GetEnvC( "HB_INSTALL_BIN" ) )
OutStd( "! Compiling list of contrib functions (.hbr)..." + hb_eol() )
mk_hbr( tmp )
ENDIF
/* Creating install packages */
IF GetEnvC( "HB_BUILD_PKG" ) == "yes" .AND. ;
@@ -513,6 +522,49 @@ STATIC FUNCTION GetEnvC( cEnvVar )
RETURN s_hEnvCache[ cEnvVar ] := GetEnv( cEnvVar )
PROCEDURE mk_hbr( cDestDir )
LOCAL hAll := { => }
LOCAL cDir := "contrib" + hb_ps()
LOCAL aFile
LOCAL cFileName
FOR EACH aFile IN Directory( cDir + hb_osFileMask(), "D" )
IF aFile[ F_NAME ] == "." .OR. aFile[ F_NAME ] == ".."
ELSEIF "D" $ aFile[ F_ATTR ]
IF hb_FileExists( cFileName := cDir + aFile[ F_NAME ] + hb_ps() + aFile[ F_NAME ] + ".hbx" )
LoadHBX( cFileName, hAll )
ENDIF
ENDIF
NEXT
hb_MemoWrit( hb_DirSepAdd( cDestDir ) + "hbmk2.hbr", hb_ZCompress( hb_Serialize( hAll ) ) )
RETURN
STATIC FUNCTION LoadHBX( cFileName, hAll )
LOCAL cName := StrTran( cFileName, "\", "/" )
LOCAL cFile
LOCAL pRegex
LOCAL tmp
LOCAL aDynamic := {}
IF ! Empty( cFile := hb_MemoRead( cFileName ) ) .AND. ;
! Empty( pRegex := hb_regexComp( "^DYNAMIC ([a-zA-Z0-9_]*)$", .T., .T. ) )
FOR EACH tmp IN hb_regexAll( pRegex, StrTran( cFile, Chr( 13 ) ),,,,, .T. )
IF tmp[ 2 ] $ hAll
hAll[ tmp[ 2 ] ] += "," + cName
ELSE
hAll[ tmp[ 2 ] ] := cName
ENDIF
NEXT
ENDIF
RETURN aDynamic
#define _HB_FUNC_INCLUDE_ "HB_FUNC_INCLUDE"
#define _HB_FUNC_EXCLUDE_ "HB_FUNC_EXCLUDE"

View File

@@ -143,7 +143,7 @@ HB_FUNC( DRIVETYPE )
iType = 5; /* Network Drive - xHarbour extension */
break;
default:
iType = 9; /* Unknow Drive - xHarbour extension */
iType = 9; /* Unknown Drive - xHarbour extension */
break;
}
hb_retni( iType );

View File

@@ -19,7 +19,7 @@
WAITPERIOD() returns .T., if the time span designated at initialization
has not elapsed.
$DESCRIPTION$
This function sets a time span for a xHarbour DO WHILE loop to run.
This function sets a time span for a DO WHILE loop to run.
The function must initialize prior to the loop, since you must specify
the <nDelay> parameter in 1/100th seconds. Subsequently, the function
can be implemented without a parameter for additional loop conditions.
@@ -137,7 +137,7 @@
The FUNCTION RETURNs .T. when the time is set successfully.
$DESCRIPTION$
When you use this FUNCTION to convert the time into the system time from
within your xHarbour application, all files acquire this time with
within your application, all files acquire this time with
each write procedure.
$EXAMPLES$
Set the system time in each case; but the hardware clock only
@@ -188,8 +188,7 @@
SETDATE() RETURNs .T. when the date is successfully set.
$DESCRIPTION$
When you use this FUNCTION to set the system date from within your
xHarbour application, all files acquire this date with each write
procedure.
application, all files acquire this date with each write procedure.
$EXAMPLES$
Set the system date in each case; but the hardware clock only
on an AT:

View File

@@ -24,7 +24,6 @@
$STATUS$
Started
$COMPLIANCE$
This function is xHarbour libct contrib
$PLATFORMS$
DJGPP
$FILES$
@@ -64,7 +63,6 @@
$STATUS$
Started
$COMPLIANCE$
This function is xHarbour libct contrib
$PLATFORMS$
DJGPP
$FILES$
@@ -96,7 +94,6 @@
$STATUS$
Started
$COMPLIANCE$
This function is xHarbour libct contrib
$PLATFORMS$
DJGPP
$FILES$
@@ -134,7 +131,6 @@
$STATUS$
Started
$COMPLIANCE$
This function is xHarbour libct contrib
$PLATFORMS$
DJGPP
$FILES$

View File

@@ -4,7 +4,7 @@
/*
* Harbour Project source code:
* dbModifyStructure( <cFile> ) -> lSuccess
* dbModifyStructure( <cFile> ) -> lSuccess
*
* Copyright 2009 Ron Pinkas <Ron.Pinkas at xHarbour.com>
* www - http://harbour-project.org
@@ -59,11 +59,7 @@
#define EG_RENAME 26
#endif
#xtranslate THROW( <oErr> ) => ( Eval( ErrorBlock(), <oErr>), Break( <oErr> ) )
/*
xHarbour extensions by Ron Pinkas
*/
#xtranslate THROW( <oErr> ) => ( Eval( ErrorBlock(), <oErr> ), Break( <oErr> ) )
FUNCTION dbModifyStructure( cFile )
@@ -81,7 +77,6 @@ FUNCTION dbModifyStructure( cFile )
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
// Open exclusively, get name info, and create the structure db.
// -----------------------
USE ( cFile ) ALIAS ModifySource EXCLUSIVE NEW
nSourceArea := Select()
@@ -95,22 +90,19 @@ FUNCTION dbModifyStructure( cFile )
cNewFile := cTable + ".new." + cDateTime + cExt
COPY STRUCTURE EXTENDED TO ( cStructureFile )
// -----------------------
// Let user modify the structure.
// -----------------------
USE ( cStructureFile ) ALIAS NewStructure EXCLUSIVE NEW
Browse( 0, 0, Min( 20, MaxRow() - 1 ), Min( MaxCol() - 30, 50 ) )
PACK
CLOSE
CREATE ( cNewFile ) FROM ( cStructureFile ) ALIAS NEW_MODIFIED NEW
// -----------------------
// Import data into the new file, and close it
// -----------------------
lRet := dbImport( nSourceArea )
CLOSE
@@ -118,10 +110,8 @@ FUNCTION dbModifyStructure( cFile )
CLOSE
SELECT ( nPresetArea )
// -----------------------
// Rename original as backup, and new file as the new original.
// -----------------------
IF lRet
IF FRename( cFile, cBakFile ) == -1
BREAK
@@ -146,13 +136,12 @@ FUNCTION dbModifyStructure( cFile )
ENDIF
ENDIF
ENDIF
// -----------------------
RECOVER USING oErr
IF oErr:ClassName == "ERROR"
IF oErr:genCode == EG_RENAME
// This kind of error must be reported
lRet := Throw( oErr )
lRet := THROW( oErr )
ELSE
lRet := .F.
ENDIF
@@ -176,11 +165,9 @@ FUNCTION dbMerge( xSource, lAppend )
LOCAL cField, xField
LOCAL nSourcePos, aTranslate := {}, aTranslation
// LOCAL oErr
LOCAL cTargetType
// Safety
// -----------------------
IF LastRec() > 0
IF ! lAppend
RETURN .F.
@@ -188,7 +175,6 @@ FUNCTION dbMerge( xSource, lAppend )
ENDIF
// Validate args
// -----------------------
IF HB_ISSTRING( xSource )
nArea := Select()
@@ -208,7 +194,6 @@ FUNCTION dbMerge( xSource, lAppend )
ENDIF
// Create translation plan
// -----------------------
aFields := Array( FCount() )
AFields( aFields )
@@ -228,7 +213,7 @@ FUNCTION dbMerge( xSource, lAppend )
// Ok to process
AAdd( aTranslate, { cField:__EnumIndex(), nSourcePos, {| xSource | xSource } } )
RECOVER // USING oErr
RECOVER
cTargetType := ValType( FieldGet( cField:__EnumIndex() ) )
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
@@ -240,7 +225,7 @@ FUNCTION dbMerge( xSource, lAppend )
// Ok to process
AAdd( aTranslate, { cField:__EnumIndex(), nSourcePos, {| xSource | ValToType( xSource, cTargetType ) } } )
RECOVER // USING oErr
RECOVER
// TraceLog( oErr:Description, oErr:Operation )
END SEQUENCE
END SEQUENCE
@@ -248,16 +233,14 @@ FUNCTION dbMerge( xSource, lAppend )
NEXT
// Reset
// -----------------------
IF LastRec() == 1 .AND. ! lAppend
DELETE
ZAP
ENDIF
// Process
// -----------------------
nRecNo := ( nSource )->( RecNo() )
( nSource )->( dbGoTop( 1 ) )
( nSource )->( dbGoTop() )
WHILE ! ( nSource )->( Eof() )
APPEND BLANK
@@ -272,7 +255,6 @@ FUNCTION dbMerge( xSource, lAppend )
( nSource )->( dbGoto( nRecNo ) )
// Reset
// -----------------------
IF ! Empty( nArea )
SELECT ( nSource )
CLOSE

View File

@@ -322,7 +322,7 @@ METHOD HandleUdf( nKey, nUdfReturn, lEdited ) CLASS XHB_TMemoEditor
CASE ME_IGNORE // (32)
// Ignore unknow key, only check insert state.
// Ignore unknown key, only check insert state.
::DisplayInsert( ::lInsert() )
EXIT

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
*
* Copyright 2011 Fausto Di Creddo Trautwein, ftwein@yahoo.com.br
* www - http://www.xharbour.org http://harbour-project.org
* www - http://harbour-project.org
*
* Thanks TO Robert F Greer, PHP original version
* http://sourceforge.net/projects/excelwriterxml/

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
*
* Copyright 2011 Fausto Di Creddo Trautwein, ftwein@yahoo.com.br
* www - http://www.xharbour.org http://harbour-project.org
* www - http://harbour-project.org
*
* Thanks TO Robert F Greer, PHP original version
* http://sourceforge.net/projects/excelwriterxml/

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
*
* Copyright 2011 Fausto Di Creddo Trautwein, ftwein@yahoo.com.br
* www - http://www.xharbour.org http://harbour-project.org
* www - http://harbour-project.org
*
* Thanks TO Robert F Greer, PHP original version
* http://sourceforge.net/projects/excelwriterxml/

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
*
* Copyright 2011 Fausto Di Creddo Trautwein, ftwein@yahoo.com.br
* www - http://www.xharbour.org http://harbour-project.org
* www - http://harbour-project.org
*
* Thanks to Robert F Greer, PHP original version
* http://sourceforge.net/projects/excelwriterxml/

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
*
* Copyright 2011 Fausto Di Creddo Trautwein, ftwein@yahoo.com.br
* www - http://www.xharbour.org http://harbour-project.org
* www - http://harbour-project.org
*
* Thanks TO Robert F Greer, PHP original version
* http://sourceforge.net/projects/excelwriterxml/

View File

@@ -6,7 +6,7 @@
* Harbour Project source code:
*
* Copyright 2011 Fausto Di Creddo Trautwein, ftwein@yahoo.com.br
* www - http://www.xharbour.org http://harbour-project.org
* www - http://harbour-project.org
*
* Thanks TO Robert F Greer, PHP original version
* http://sourceforge.net/projects/excelwriterxml/

View File

@@ -117,6 +117,7 @@ echo "%HB_DR%bin\hbpp.exe" >> _hbfiles
echo "%HB_DR%bin\hbrun.exe" >> _hbfiles
echo "%HB_DR%bin\hbtest.exe" >> _hbfiles
if exist "%HB_DR%bin\*.hb" echo "%HB_DR%bin\*.hb" >> _hbfiles
if exist "%HB_DR%bin\*.hbr" echo "%HB_DR%bin\*.hbr" >> _hbfiles
if exist "%HB_DR%bin\*.ucf" echo "%HB_DR%bin\*.ucf" >> _hbfiles
if exist "%HB_DR%bin\hbmk.hbc" echo "%HB_DR%bin\hbmk.hbc" >> _hbfiles
echo "%HB_DR%bin\upx*.*" >> _hbfiles

View File

@@ -102,6 +102,7 @@ Section "Main components" hb_main
File "$%HB_ABSROOT%bin\hbrun.exe"
File "$%HB_ABSROOT%bin\hbtest.exe"
File /nonfatal "$%HB_ABSROOT%bin\*.hb"
File /nonfatal "$%HB_ABSROOT%bin\*.hbr"
File /nonfatal "$%HB_ABSROOT%bin\*.ucf"
File /nonfatal "$%HB_ABSROOT%bin\hbmk.hbc"
File "$%HB_ABSROOT%bin\upx*.*"

View File

@@ -24,26 +24,27 @@
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, xHarbour license gives permission for
* additional uses of the text contained in its release of xHarbour.
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the xHarbour libraries with other
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the xHarbour library code into it.
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released with this xHarbour
* explicit exception. If you add/copy code from other sources,
* as the General Public License permits, the above exception does
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for xHarbour, it is your choice
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*

View File

@@ -12239,14 +12239,17 @@ STATIC PROCEDURE AdviseMissingLibs( hbmk, cOutput )
FOR EACH tmp IN hNeeded
aLib := LibReferenceToOption( tmp:__enumKey() )
_hbmk_OutStd( hbmk, hb_StrFormat( "Hint: Add option '%1$s'%2$s for missing function(s): %3$s", ;
_hbmk_OutStd( hbmk, hb_StrFormat( ;
iif( aLib[ 2 ], ;
I_( "Hint: Add option '%1$s' for missing function(s): %2$s" ), ;
I_( "Hint: Install package %3$s and add option '%1$s' for missing function(s): %2$s" ) ), ;
aLib[ 1 ], ;
iif( aLib[ 2 ], "", " (not installed)" ), ;
ArrayToList( tmp, ", ",,,, "()" ) ) )
ArrayToList( tmp, ", ",,,, "()" ), ;
hb_FNameName( aLib[ 1 ] ) ) )
NEXT
IF ! Empty( aFunction )
_hbmk_OutStd( hbmk, hb_StrFormat( "Error: Referenced, missing, but unknown function(s): %1$s", ArrayToList( aFunction, ", ",,,, "()" ) ) )
_hbmk_OutStd( hbmk, hb_StrFormat( I_( "Error: Referenced, missing, but unknown function(s): %1$s" ), ArrayToList( aFunction, ", ",,,, "()" ) ) )
ENDIF
RETURN