From 8e71e0eb6fb44e904e7f65e4fef066a9a414ddf4 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 29 Apr 2011 00:45:29 +0000 Subject: [PATCH] 2011-04-29 02:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtwvt/gtwvt.c ! put back CS_HREDRAW | CS_VREDRAW apparently needed for HB_GTI_RESIZEMODE_FONT. Thanks Pritpal. * use XP double buffering on Vista and upper systems only (was: all). This is not based on hard scientific data at this time, some users reported "slowness" on certain XP systems. It doesn't seem to be tied to any particular video chipset (or driver), exact reason still uncertain (other software? GPO setting? SP level?). I cannot find evidence for general WS_EX_COMPOSITED related problem on the internet. So we're back to *fugly* screen updates on XP and lower systems, this means that visible lag will be seen when drawing text with changing colors in them (f.e. menubar with hotkey). If you know better, speak up. * contrib/hbqt/hbmk2_qt.hbs ! fixed typo in one HB_WITH_QT envvar reference (Thanks Francesco) + accept HB_QTPATH with or without ending dirsep ! use host exe extension when looking for qt tools + use win/os2 specific autodetection logic based on host OS, rather than target OS, thus helping QT in cross-builds, like droid. And now let the avalanche of crap follow. - doc/howtobld.txt - outdated, deleted * doc/howtosvn.txt * minor update --- harbour/ChangeLog | 30 ++++++++ harbour/contrib/hbqt/hbmk2_qt.hbs | 20 +++--- harbour/doc/howtobld.txt | 116 ------------------------------ harbour/doc/howtosvn.txt | 2 - harbour/src/rtl/gtwvt/gtwvt.c | 4 +- 5 files changed, 44 insertions(+), 128 deletions(-) delete mode 100644 harbour/doc/howtobld.txt diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6381774ab7..3485b53ab2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,36 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-29 02:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/gtwvt/gtwvt.c + ! put back CS_HREDRAW | CS_VREDRAW + apparently needed for HB_GTI_RESIZEMODE_FONT. Thanks Pritpal. + * use XP double buffering on Vista and upper systems only (was: all). + This is not based on hard scientific data at this time, some users + reported "slowness" on certain XP systems. It doesn't seem to be + tied to any particular video chipset (or driver), exact reason + still uncertain (other software? GPO setting? SP level?). + I cannot find evidence for general WS_EX_COMPOSITED related problem + on the internet. + So we're back to *fugly* screen updates on XP and lower systems, this + means that visible lag will be seen when drawing text with changing + colors in them (f.e. menubar with hotkey). + If you know better, speak up. + + * contrib/hbqt/hbmk2_qt.hbs + ! fixed typo in one HB_WITH_QT envvar reference (Thanks Francesco) + + accept HB_QTPATH with or without ending dirsep + ! use host exe extension when looking for qt tools + + use win/os2 specific autodetection logic based on host OS, rather + than target OS, thus helping QT in cross-builds, like droid. + And now let the avalanche of crap follow. + + - doc/howtobld.txt + - outdated, deleted + + * doc/howtosvn.txt + * minor update + 2011-04-28 16:32 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/gtwvg.c ! Normalized code close to GTWVT as much as possible. diff --git a/harbour/contrib/hbqt/hbmk2_qt.hbs b/harbour/contrib/hbqt/hbmk2_qt.hbs index 56d68dd72c..0c000ac19d 100644 --- a/harbour/contrib/hbqt/hbmk2_qt.hbs +++ b/harbour/contrib/hbqt/hbmk2_qt.hbs @@ -413,35 +413,39 @@ STATIC FUNCTION qt_tool_detect( hbmk2, cName, cEnvQT, lPostfix ) cBIN := GetEnv( cEnvQT ) IF Empty( cBIN ) + IF lPostfix cName += GetEnv( "HB_QTPOSTFIX" ) ENDIF - IF Empty( GetEnv( "HB_QTPATH" ) ) .OR. ; - ! hb_FileExists( cBIN := GetEnv( "HB_QTPATH" ) + cName ) + cName += hbmk2[ "cCCEXT" ] - cBIN := "" - IF hbmk2[ "cPLAT" ] $ "win|os2" + IF Empty( GetEnv( "HB_QTPATH" ) ) .OR. ; + ! hb_FileExists( cBIN := hb_DirSepAdd( GetEnv( "HB_QTPATH" ) ) + cName ) + + #if defined( __PLATFORM__WINDOWS ) .OR. defined( __PLATFORM__OS2 ) hb_AIns( aEnvList, 1, "HB_WITH_QT", .T. ) IF ! Empty( GetEnv( "HB_WITH_QT" ) ) - IF GetEnv( "HB_W_ITH_QT" ) == "no" + IF GetEnv( "HB_WITH_QT" ) == "no" /* Return silently. It shall fail at dependency detection inside hbmk2 */ RETURN NIL ELSE - IF ! hb_FileExists( cBIN := hb_PathNormalize( GetEnv( "HB_WITH_QT" ) + "\..\bin\" + cName + ".exe" ) ) + IF ! hb_FileExists( cBIN := hb_PathNormalize( hb_DirSepAdd( GetEnv( "HB_WITH_QT" ) ) + "..\bin\" + cName ) ) hbmk2_OutErr( hbmk2, hb_StrFormat( "Warning: HB_WITH_QT points to incomplete QT installation. '%1$s' executable not found.", cName ) ) cBIN := "" ENDIF ENDIF ELSE - cBIN := hb_DirSepAdd( hb_DirBase() ) + cName + ".exe" + cBIN := hb_DirSepAdd( hb_DirBase() ) + cName IF ! hb_FileExists( cBIN ) cBIN := "" ENDIF ENDIF - ENDIF + #else + cBIN := "" + #endif IF Empty( cBIN ) cBIN := hbmk2_FindInPath( cName, GetEnv( "PATH" ) + hb_osPathListSeparator() + "/opt/qtsdk/qt/bin" ) diff --git a/harbour/doc/howtobld.txt b/harbour/doc/howtobld.txt deleted file mode 100644 index 4d5e31c077..0000000000 --- a/harbour/doc/howtobld.txt +++ /dev/null @@ -1,116 +0,0 @@ -/* - * $Id$ - */ - -In the last phase of install process if bash shell is available in the -system then few bash scripts are created to make compiling and linking -with Harbour a little easier. There are compiler and linker wrappers -called "hbcc", "hbcmp", "hblnk" and "hbmk". - -"hbcc" is a wrapper to the C compiler only. It sets all flags -and paths necessary to compile .c files which include Harbour header -files. The result of its work is an object file. - -Use "hbcmp" exactly as you would use the harbour compiler itself. -The main difference with hbcmp is that it results in an object file, -not a C file that needs compiling down to an object. hbcmp also -ensures that the harbour include directory is seen by the harbour compiler. - -"hblnk" simply takes a list of object files and links them together -with the harbour virtual machine and run-time library to produce an -executable. The executable will be given the basename of the first object -file if not directly set by the "-o" command line switch. - -"hbmk" tries to produce an executable from your .prg file. It's a simple -equivalent of cl.bat from the CA-Cl*pper distribution. - -All these scripts accept command line switches: --o # output file name --static # link with static Harbour libs --fullstatic # link with all static libs --shared # link with shared libs (default) --mt # link with multi-thread libs --gt # link with GT driver, can be repeated to - # link with more GTs. The first one will be - # the default at runtime --xbgtk # link with xbgtk library (xBase GTK+ interface) --hwgui # link with HWGUI library (GTK+ interface) --l # link with library --L # additional path to search for libraries --fmstat # link with the memory statistics lib --nofmstat # do not link with the memory statistics lib (default) --[no]strip # strip (no strip) binaries --main= # set the name of main program function/procedure. - # if not set then 'MAIN' is used or if it doesn't - # exist the name of first public function/procedure - # in first linked object module (link) - -Link options work only with "hblnk" and "hbmk" and have no effect -in "hbcc" and "hbcmp". -Other options are passed to Harbour/C compiler/linker. - -An example compile/link session looks like: ----------------------------------------------------------------------- -druzus@uran:~/tmp$ cat foo.prg -function main() -? "Hello, World!" -return nil - -druzus@uran:~/tmp$ hbcmp foo -Harbour Compiler Alpha build 46.2 (Flex) -Copyright 1999-2006, http://harbour-project.org/ -Compiling 'foo.prg'... -Lines 5, Functions/Procedures 2 -Generating C source output to 'foo.c'... Done. - -druzus@uran:~/tmp$ hblnk foo.o - -druzus@uran:~/tmp$ strip foo - -druzus@uran:~/tmp$ ls -l foo --rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo ----------------------------------------------------------------------- - -or using hbmk only: ----------------------------------------------------------------------- -druzus@uran:~/tmp$ cat foo.prg -function main() -? "Hello, World!" -return nil - -druzus@uran:~/tmp$ hbmk foo -Harbour Compiler Alpha build 46.2 (Flex) -Copyright 1999-2006, http://harbour-project.org/ -Compiling 'foo.prg'... -Lines 5, Functions/Procedures 2 -Generating C source output to 'foo.c'... Done. - -druzus@uran:~/tmp$ ls -l foo --rwxrwxr-x 1 druzus druzus 3824 maj 17 02:46 foo ----------------------------------------------------------------------- - - -You will find additional wonderful tools: /usr/bin/hbrun -You can run clipper/xbase compatible source files with it -if you only put in their first line: -#!/usr/bin/hbrun - -For example: ----------------------------------------------------------------------- -druzus@uran:~/tmp$ cat foo.prg -#!/usr/bin/hbrun -function main() -? "Hello, World!, This is a script !!! :-)" -? -return nil - -druzus@uran:~/tmp$ chmod +x foo.prg - -druzus@uran:~/tmp$ ./foo.prg - -Hello, World!, This is a script !!! :-) - -druzus@uran:~/tmp$ - -I hope you will find this information useful, -Przemyslaw Czerpak (druzus/at/priv.onet.pl) diff --git a/harbour/doc/howtosvn.txt b/harbour/doc/howtosvn.txt index 2a09c1d2f8..e553919495 100644 --- a/harbour/doc/howtosvn.txt +++ b/harbour/doc/howtosvn.txt @@ -77,8 +77,6 @@ by Ryszard Glab 8) Run 'svn update' again 9) Commit changes running: svn commit -F file_with_saved_ChangeLog_changes --username sfuser - 10) Mail file_with_saved_ChangeLog_changes as an email body (do not - send it as an attachment) to the harbour list Important notes: diff --git a/harbour/src/rtl/gtwvt/gtwvt.c b/harbour/src/rtl/gtwvt/gtwvt.c index 378677b229..4aefca3912 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.c +++ b/harbour/src/rtl/gtwvt/gtwvt.c @@ -157,7 +157,7 @@ static void hb_gt_wvt_RegisterClass( HINSTANCE hInstance ) WNDCLASS wndclass; memset( &wndclass, 0, sizeof( wndclass ) ); - wndclass.style = CS_DBLCLKS; + wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS; wndclass.lpfnWndProc = hb_gt_wvt_WndProc; /* wndclass.cbClsExtra = 0; */ /* wndclass.cbWndExtra = 0; */ @@ -1886,7 +1886,7 @@ static HB_BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT ) hb_errInternal( 10001, "Failed to create WVT window", NULL, NULL ); #if ! defined( HB_OS_WIN_CE ) - if( ! GetSystemMetrics( SM_REMOTESESSION ) ) + if( hb_iswinvista() && ! GetSystemMetrics( SM_REMOTESESSION ) ) SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE ) | WS_EX_COMPOSITED ); #endif