2009-07-06 14:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* bin/postinst.bat
    + Added .hbc search paths: /contrib, /contrib/rddsql, /addins, /examples.
      NOTE: addins will be the directory where 3rd party addins
            can be added.

  * utils/hbmk2/hbmk2.prg
    * Refinements to path handling of -icon= parameter.

  - utils/hbrun/hbrun.rc
  * utils/hbrun/hbrun.hbp
    * Switched to use -icon option instead of .rc file.

  * contrib/hbtip/client.prg
    ! Minor cleanups and fixes to proxy handling.
    % Deleted second parameter from HB_BASE64() calls.

  * contrib/hbtip/smtpcln.prg
    % Deleted second parameter from HB_BASE64() calls.
This commit is contained in:
Viktor Szakats
2009-07-06 12:06:04 +00:00
parent 44d6733d3e
commit a1e5aadc3d
7 changed files with 121 additions and 152 deletions

View File

@@ -17,6 +17,26 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-07-06 14:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* bin/postinst.bat
+ Added .hbc search paths: /contrib, /contrib/rddsql, /addins, /examples.
NOTE: addins will be the directory where 3rd party addins
can be added.
* utils/hbmk2/hbmk2.prg
* Refinements to path handling of -icon= parameter.
- utils/hbrun/hbrun.rc
* utils/hbrun/hbrun.hbp
* Switched to use -icon option instead of .rc file.
* contrib/hbtip/client.prg
! Minor cleanups and fixes to proxy handling.
% Deleted second parameter from HB_BASE64() calls.
* contrib/hbtip/smtpcln.prg
% Deleted second parameter from HB_BASE64() calls.
2009-07-06 13:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/gttrm/gttrm.c
* reset default color index on exit
@@ -29,21 +49,21 @@
+ harbour/contrib/hbqt/doc/html
+ Added this folder to hold auto generated pure .htm documentation files.
These files can be used by any decent tool to form a useful compiled help
manual. You can visit
manual. You can visit
http://www.vouch.info/harbour-qt/
to have first impressions. This on-line help source
seemlessly links with Qt's online help system, so it can be a very useful
reference source for developers.
* harbour/contrib/hbqt/generator/hbqtgen.prg
+ Implemented <DOC> </DOC> section of a .qth header. This section
+ Implemented <DOC> </DOC> section of a .qth header. This section
is placed as is in TQ*.txt and html/Q*.htm at appropriate place.
+ Re-implemented :new() method of TQ*.prg classes. If <CLASS></CLASS> section
contains "Type = PlainObject" entry, it generates this method as
contains "Type = PlainObject" entry, it generates this method as
METHOD New( ... )
LOCAL aP, nParams
aP := hb_aParams()
nParams := len( aP )
@@ -59,11 +79,11 @@
RETURN Self
This construct was necessary for those classes which are not inherited from
This construct was necessary for those classes which are not inherited from
QWidget and which do not have parent and their contructors are either complex
or cannot be supplied later after creation. Moreover, it simplifies .prg
code considerably.
* harbour/contrib/hbqt/qth/QFont.qth
* harbour/contrib/hbqt/hbqt_qfont.cpp
* harbour/contrib/hbqt/TQFont.prg
@@ -176,7 +196,7 @@
2009-07-04 10:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
+ Added app bundle generation for OS X targets in -gui mode.
It's experimental yet. (f.e. clean will not clean it f.e.)
It's experimental yet. (f.e. clean will not clean it)
Thanks to Teo Fonrouge for the hints.
* Using escapting function (instead of manual escaping) when
launching Windows apps on NT.
@@ -188,7 +208,7 @@
* source/rtl/copyfile.c
* Minor formatting.
; TODO: Add generic app icon support. Possible?
; TODO: Add generic app icon support. Possible? [DONE]
2009-07-04 09:13 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
@@ -255,7 +275,7 @@
+ Added support for `<command-creating-stdout>` type of macro
in all options where regular macros are accepted.
It's now possible to use this in an .hbp file:
-cflag={unix&gcc}"`wx-config --cflags`"
"-cflag={unix&gcc}`wx-config --cflags`"
2009-07-03 18:51 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/rtl/fscopy.c

View File

@@ -18,6 +18,11 @@ echo # Harbour Make configuration> %HB_BIN_INSTALL%\hbmk.cfg
echo # Generated by Harbour build process>> %HB_BIN_INSTALL%\hbmk.cfg
echo arch=%HB_ARCHITECTURE%>> %HB_BIN_INSTALL%\hbmk.cfg
echo comp=%HB_COMPILER%>> %HB_BIN_INSTALL%\hbmk.cfg
echo.>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/rddsql/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../addins/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../examples/%%{hb_name}>> %HB_BIN_INSTALL%\hbmk.cfg
rem ; Post-build installation
set _HB_COPYCMD=%COPYCMD%

View File

@@ -119,14 +119,11 @@ CLASS tIPClient
DATA Cargo
/* Data For proxy connection */
/* Data for proxy connection */
DATA cProxyHost
DATA nProxyPort
DATA nProxyPort INIT 0
DATA cProxyUser
DATA cProxyPassword
METHOD SetProxy()
METHOD Openproxy( cServer, nPort, cProxy, nProxyPort, cResp, cUserName, cPassWord, nTimeOut, cUserAgent )
METHOD ReadHTTPProxyResponse()
METHOD New( oUrl, lTrace, oCredentials )
METHOD Open()
@@ -138,7 +135,10 @@ CLASS tIPClient
METHOD WriteFromFile( cFile )
METHOD Reset()
METHOD Close()
/* METHOD Data( cData ) */ // commented: calls undeclared METHOD :getOk
/* METHOD Data( cData ) */ // commented: calls undeclared METHOD :getOk
METHOD SetProxy( cProxyHost, nProxyPort, cProxyUser, cProxyPassword )
METHOD lastErrorCode() INLINE ::nLastError
METHOD lastErrorMessage(SocketCon) INLINE ::INetErrorDesc(SocketCon)
@@ -147,8 +147,12 @@ CLASS tIPClient
METHOD InetSndBufSize( SocketCon, nSizeBuff )
PROTECTED:
DATA nLastError INIT 0
METHOD OpenProxy( cServer, nPort, cProxy, nProxyPort, cResp, cUserName, cPassWord, nTimeOut, cUserAgent )
METHOD ReadHTTPProxyResponse()
/* Methods to log data if needed */
METHOD InetRecv( SocketCon, cStr1, len)
METHOD InetRecvLine( SocketCon, nLen, size )
@@ -212,7 +216,7 @@ RETURN self
METHOD Open( cUrl ) CLASS tIPClient
LOCAL nPort
Local cResp
LOCAL cResp
IF ISCHARACTER( cUrl )
::oUrl := tUrl():New( cUrl )
@@ -229,7 +233,7 @@ METHOD Open( cUrl ) CLASS tIPClient
HB_InetTimeout( ::SocketCon, ::nConnTimeout )
IF ! Empty( ::cProxyHost )
cResp := ""
IF ! ::openProxy( ::oUrl:cServer, nPort, ::cProxyHost, ::nProxyPort, @cResp, ::cProxyUser, ::cProxyPassword, ::nConnTimeout, "" )
IF ! ::OpenProxy( ::oUrl:cServer, nPort, ::cProxyHost, ::nProxyPort, @cResp, ::cProxyUser, ::cProxyPassword, ::nConnTimeout, "Mozilla/3.0 compatible" )
RETURN .F.
ENDIF
ELSE
@@ -243,6 +247,73 @@ METHOD Open( cUrl ) CLASS tIPClient
RETURN .T.
METHOD OpenProxy( cServer, nPort, cProxy, nProxyPort, cResp, cUserName, cPassWord, nTimeOut, cUserAgent ) CLASS tIPClient
LOCAL cRequest := ""
LOCAL tmp
LOCAL lRet := .T.
LOCAL nResponseCode
LOCAL sResponseCode, nFirstSpace
::InetConnect( cProxy, nProxyPort, ::SocketCon )
IF ( tmp := ::InetErrorCode( ::SocketCon ) ) == 0
cRequest += "CONNECT " + cServer + ":" + hb_ntos( nPort ) + " HTTP/1.0" + Chr( 13 ) + Chr( 10 )
IF ! Empty( cUserAgent )
cRequest += "User-agent: " + cUserAgent + Chr( 13 ) + Chr( 10 )
ENDIF
IF ! Empty( cUserName )
cRequest += "Proxy-authorization: Basic " + hb_base64( cUserName + ":" + cPassWord ) + Chr( 13 ) + Chr( 10 )
ENDIF
cRequest += Chr( 13 ) + Chr( 10 )
::InetSendAll( ::SocketCon, cRequest )
cResp := ""
IF ::ReadHTTPProxyResponse( nTimeOut, @cResp )
nFirstSpace := At( " ", cResp )
IF nFirstSpace != 0
sResponseCode := Right( cResp, Len( cResp ) - nFirstSpace )
nResponseCode := Val( sResponseCode )
IF nResponseCode != 200
::close()
lRet := .F.
ENDIF
ENDIF
ELSE
::close()
lRet := .F.
ENDIF
ELSE
cResp := hb_ntos( tmp )
lRet := .F.
ENDIF
RETURN lRet
METHOD ReadHTTPProxyResponse( dwTimeout, sResponse ) CLASS tIPClient
LOCAL bMoreDataToRead := .T.
LOCAL nLength, nData
LOCAL szResponse
HB_SYMBOL_UNUSED( dwTimeout )
DO WHILE bMoreDataToRead
szResponse := Space( 1 )
nData := hb_inetRecv( ::SocketCon, @szResponse, Len( szResponse ) )
IF nData == 0
RETURN .F.
ENDIF
sResponse += szResponse
nLength := Len( sResponse )
IF nLength >= 4
bMoreDataToRead := !( ( SubStr( sResponse, nLength - 3, 1 ) == Chr( 13 ) ) .AND. ( SubStr( sResponse, nLength - 2, 1 ) == Chr( 10 ) ) .AND. ;
( SubStr( sResponse, nLength - 1, 1 ) == Chr( 13 ) ) .AND. ( SubStr( sResponse, nLength, 1 ) == Chr( 10 ) ) )
ENDIF
ENDDO
RETURN .T.
METHOD Close() CLASS tIPClient
@@ -252,11 +323,11 @@ METHOD Close() CLASS tIPClient
nRet := HB_InetClose( ::SocketCon )
::SocketCon:=nil
::SocketCon := NIL
::isOpen := .F.
ENDIF
RETURN(nRet)
RETURN nRet
@@ -449,7 +520,7 @@ METHOD Write( cData, nLen, bCommit ) CLASS tIPClient
nLen := Len( cData )
ENDIF
::nLastWrite := ::InetSendall( ::SocketCon, cData , nLen )
::nLastWrite := ::InetSendall( ::SocketCon, cData, nLen )
IF ! Empty( bCommit ) .AND. bCommit
::Commit()
@@ -623,81 +694,9 @@ METHOD Log( ... ) CLASS tIPClient
RETURN Self
METHOD SetProxy( cProxyHost, nProxyPort, cProxyUser, cProxyPassword ) CLASS tIPClient
::cProxyHost := cProxyHost
::nProxyPort := nProxyPort
::cProxyUser := cProxyUser
::cProxyPassword := cProxyPassword
RETURN Self
METHOD Openproxy( cServer, nPort, cProxy, nProxyPort, cResp, cUserName, cPassWord, nTimeOut, cUserAgent ) CLASS tIPClient
LOCAL cLine
LOCAL cRequest := ""
LOCAL cEncoded
LOCAL cPass
LOCAL lRet := .T.
LOCAL nResponseCode
LOCAL sResponseCode, nFirstSpace
::InetConnect( cProxy, nProxyPort, ::SocketCon )
IF ::InetErrorCode( ::SocketCon ) == 0
cLine := "CONNECT " + cServer + ":" + hb_ntos( nPort ) + " HTTP/1" + Chr( 13 ) + Chr( 10 )
cRequest += cLine
IF ! Empty( cUserName )
cPass := cUserName + ":" + cPassWord
cEncoded := hb_base64( cPass, Len( cPass ) )
cLine := "Proxy-authorization: Basic " + cEncoded + Chr( 13 ) + Chr( 10 )
cRequest += cLine
ENDIF
IF ! Empty( cUserAgent )
cLine := "User-Agent: " + cUserAgent + Chr( 13 ) + Chr( 10 )
cRequest += cLine
ENDIF
cRequest += Chr( 13 ) + Chr( 10 )
::InetSendAll( ::SocketCon, cRequest )
cResp := ""
IF ::ReadHTTPProxyResponse( nTimeOut, @cResp )
nFirstSpace := At( " ", cResp )
IF nFirstSpace != 0
sResponseCode := Right( cResp, Len( cResp ) - nFirstSpace )
nResponseCode := Val( sResponseCode )
IF nResponseCode != 200
::close()
lRet := .F.
ENDIF
ENDIF
ELSE
::close()
lRet := .F.
ENDIF
ENDIF
RETURN lRet
METHOD ReadHTTPProxyResponse( dwTimeout, sResponse ) CLASS tIPClient
LOCAL bMoreDataToRead := .T.
LOCAL nLength, nData
LOCAL szResponse
HB_SYMBOL_UNUSED( dwTimeout )
DO WHILE bMoreDataToRead
szResponse := Space( 1 )
nData := hb_inetRecv( ::SocketCon, @szResponse, Len( szResponse ) )
IF nData == 0
RETURN .F.
ENDIF
sResponse += szResponse
nLength := Len( sResponse )
IF nLength >= 4
bMoreDataToRead := !( ( SubStr( sResponse, nLength - 3, 1 ) == Chr( 13 ) ) .AND. ( SubStr( sResponse, nLength - 2, 1 ) == Chr( 10 ) ) .AND. ;
( SubStr( sResponse, nLength - 1, 1 ) == Chr( 13 ) ) .AND. ( SubStr( sResponse, nLength, 1 ) == Chr( 10 ) ) )
ENDIF
ENDDO
RETURN .T.

View File

@@ -196,8 +196,8 @@ METHOD AUTH( cUser, cPass ) CLASS tIPClientSMTP
cUser := StrTran( cUser, "&at;", "@" )
cEncodedUser := AllTrim( HB_BASE64( cUser, Len( cUser ) ) )
cEncodedPAss := AllTrim( HB_BASE64( cPass, Len( cPass ) ) )
cEncodedUser := AllTrim( HB_BASE64( cUser ) )
cEncodedPAss := AllTrim( HB_BASE64( cPass ) )
::InetSendall( ::SocketCon, "AUTH LOGIN" + ::ccrlf )

View File

@@ -1690,7 +1690,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
CASE Left( cParamL, Len( "-icon=" ) ) == "-icon="
cParam := MacroProc( hbmk, ArchCompFilter( hbmk, SubStr( cParam, Len( "-icon=" ) + 1 ) ), aParam[ _PAR_cFileName ] )
cParam := PathNormalize( PathProc( PathSepToSelf( MacroProc( hbmk, ArchCompFilter( hbmk, SubStr( cParam, Len( "-icon=" ) + 1 ) ), aParam[ _PAR_cFileName ] ) ), aParam[ _PAR_cFileName ] ) )
IF ! Empty( cParam )
AAdd( hbmk[ _HBMK_aICON ], cParam )
ENDIF

View File

@@ -3,11 +3,9 @@
#
hbrun.prg
hbrun.rc
# for harbour.ico
-incpath=../../package
-lhbcplr
-lhbpp
-lhbcommon
-icon={allwin|os2}../../package/harbour.ico

View File

@@ -1,53 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* hbrun Windows resource file
*
* Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* 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, 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 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 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 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 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.
*
*/
ICON1 ICON DISCARDABLE "harbour.ico"