From 52da6a02a5affe5610fccbb520c1f0eda0f07def Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 18 Nov 2009 21:47:14 +0000 Subject: [PATCH] 2009-11-18 22:41 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Added dependency tree to flat dependency list converter. (no cyclic reference check here) * contrib/gtwvg/wvgwing.c ! Fixed for Windows x64 platform. * contrib/gtwvg/Makefile + Enabled for Cygwin, IA64 and mingw64 compilers. Latest mingw64 experimental builds build it fine. This means all win compilers are supported except xcc. ; NOTE: Now it's disabled only for xcc. Can someone with xcc installed try gtwvg? Maybe it can be made work so we can drop this exception. * config/global.mk * utils/hbmk2/hbmk2.prg + Added autodetection of x86_64 build of mingw64. (in hbmk2 it's recognized even if host platform isn't x64) * INSTALL + Added darwin -> win/mingw64 cross-platform scenario. Such binaries are now provided by the mingw64 project. --- harbour/ChangeLog | 25 +++++++++++++++++++++++++ harbour/INSTALL | 1 + harbour/config/global.mk | 8 ++++++++ harbour/contrib/gtwvg/Makefile | 2 +- harbour/contrib/gtwvg/wvgwing.c | 10 +++++----- harbour/utils/hbmk2/hbmk2.prg | 25 ++++++++++++++++++++++++- 6 files changed, 64 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 856ff7ee85..761351ac26 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,31 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-18 22:41 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + + Added dependency tree to flat dependency list converter. + (no cyclic reference check here) + + * contrib/gtwvg/wvgwing.c + ! Fixed for Windows x64 platform. + + * contrib/gtwvg/Makefile + + Enabled for Cygwin, IA64 and mingw64 compilers. + Latest mingw64 experimental builds build it fine. + This means all win compilers are supported except xcc. + ; NOTE: Now it's disabled only for xcc. + Can someone with xcc installed try gtwvg? Maybe it can + be made work so we can drop this exception. + + * config/global.mk + * utils/hbmk2/hbmk2.prg + + Added autodetection of x86_64 build of mingw64. + (in hbmk2 it's recognized even if host platform isn't x64) + + * INSTALL + + Added darwin -> win/mingw64 cross-platform scenario. + Such binaries are now provided by the mingw64 project. + 2009-11-18 20:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/harbour.spec ! fixed to build hbsms library diff --git a/harbour/INSTALL b/harbour/INSTALL index bf4ec2f8f1..4406451ee4 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -1159,6 +1159,7 @@ HARBOUR x darwin -> wce/mingwarm arm x darwin -> wce/mingw x86 x darwin -> win/mingw x86 + x darwin -> win/mingw64 x86-64 x darwin -> dos/djgpp x86 hpux -> hpux/gcc (CPU cross-builds possible) beos -> beos/gcc x86 diff --git a/harbour/config/global.mk b/harbour/config/global.mk index e730e13f92..272bb6612f 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -792,6 +792,14 @@ ifeq ($(HB_COMPILER),) ifneq ($(HB_COMP_PATH),) HB_COMPILER := mingw64 HB_CCPREFIX := i686-w64-mingw32- + else + ifeq ($(HB_HOST_CPU),x86_64) + HB_COMP_PATH := $(call find_in_path,x86_64-w64-mingw32-gcc) + ifneq ($(HB_COMP_PATH),) + HB_COMPILER := mingw64 + HB_CCPREFIX := x86_64-w64-mingw32- + endif + endif endif endif endif diff --git a/harbour/contrib/gtwvg/Makefile b/harbour/contrib/gtwvg/Makefile index e93c59938a..762383f9a6 100644 --- a/harbour/contrib/gtwvg/Makefile +++ b/harbour/contrib/gtwvg/Makefile @@ -53,7 +53,7 @@ PRG_HEADERS := \ wvgparts.ch \ ifeq ($(HB_PLATFORM),win) - ifneq ($(filter $(HB_COMPILER),mingw msvc msvc64 watcom pocc pocc64 icc bcc),) + ifeq ($(filter $(HB_COMPILER),xcc),) HB_INC_DEPEND := -I$(TOP)$(ROOT)contrib/hbwin diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index dc3059eec5..aab2648b23 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -859,10 +859,10 @@ BOOL CALLBACK WvgDialogProcChooseFont( HWND hwnd, UINT msg, WPARAM wParam, LPARA { hb_vmPushSymbol( &hb_symEval ); hb_vmPush( block ); - hb_vmPushLong( ( long ) hwnd ); + hb_vmPushNumInt( ( HB_PTRDIFF ) hwnd ); hb_vmPushInteger( msg ); - hb_vmPushLong( ( long ) wParam ); - hb_vmPushLong( ( long ) lParam ); + hb_vmPushNumInt( ( HB_PTRDIFF ) wParam ); + hb_vmPushNumInt( ( HB_PTRDIFF ) lParam ); hb_vmDo( 4 ); bret = hb_parnl( -1 ); @@ -1088,9 +1088,9 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON ) /* set bitmap */ tbab.hInst = NULL; #if (_WIN32_IE >= 0x0500) - tbab.nID = ( UINT_PTR ) ( HBITMAP ) hb_parni( 2 ); + tbab.nID = ( UINT_PTR ) ( HBITMAP ) hb_parnint( 2 ); #else - tbab.nID = ( UINT ) ( HBITMAP ) hb_parni( 2 ); + tbab.nID = ( UINT ) ( HBITMAP ) hb_parnint( 2 ); #endif iNewBitmap = ( int ) SendMessage( hWndTB, TB_ADDBITMAP, ( WPARAM ) 1, ( LPARAM ) &tbab ); diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index b76c10287d..1df3cb8134 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1011,7 +1011,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) { {|| iif( ( tmp1 := FindInPath( "icl" ) ) != NIL .AND. "itanium" $ Lower( tmp1 ), tmp1, NIL ) }, "iccia64" },; { {|| FindInPath( "icl" ) }, "icc" },; { {|| FindInPath( "xcc" ) }, "xcc" },; - { {|| FindInPath( "i686-w64-mingw32-gcc" ) }, "mingw64", "i686-w64-mingw32-" }} + { {|| FindInPath( "i686-w64-mingw32-gcc" ) }, "mingw64", "i686-w64-mingw32-" },; + { {|| FindInPath( "x86_64-w64-mingw32-gcc" ) }, "mingw64", "x86_64-w64-mingw32-" }} #endif aCOMPSUP := { "mingw", "msvc", "bcc", "watcom", "icc", "pocc", "xcc", "cygwin",; "mingw64", "msvc64", "msvcia64", "iccia64", "pocc64" } @@ -1139,6 +1140,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingw" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "win" , "mingw" , "" , NIL, NIL } ) AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingw64" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "win" , "mingw64" , "i686-w64-mingw32-" , NIL, NIL } ) + AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingw64" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "win" , "mingw64" , "x86_64-w64-mingw32-" , NIL, NIL } ) AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingwarm" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "wce" , "mingwarm", "arm-mingw32ce-" , NIL, NIL } ) AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingwarm" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "wce" , "mingwarm", "arm-wince-mingw32ce-", NIL, NIL } ) AAdd( aCOMPDET_EMBED, { {| cPrefix | tmp1 := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + _COMPEMBED_BASE_ + "mingwarm" + hb_osPathSeparator() + "bin" ), iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc" + cCCEXT ), tmp1, NIL ) }, "wce" , "mingw" , "i386-mingw32ce-" , NIL, NIL } ) @@ -5229,6 +5231,27 @@ STATIC FUNCTION AAddNotEmpty( array, xItem ) RETURN array +STATIC FUNCTION DepTreeToList( aTree ) + LOCAL aList := {} + + DepTreeWorker( aList, aTree ) + + RETURN aList + +STATIC PROCEDURE DepTreeWorker( aList, aTree ) + LOCAL xItem + + FOR EACH xItem IN aTree DESCEND + IF ISARRAY( xItem ) .AND. Len( xItem ) == 2 + DepTreeWorker( aList, xItem[ 2 ] ) + AAddNew( aList, xItem[ 1 ] ) + ELSE + AAddNew( aList, xItem ) + ENDIF + NEXT + + RETURN + STATIC FUNCTION ListDirExt( arraySrc, cDirNew, cExtNew, lStripClpAt ) LOCAL array := AClone( arraySrc ) LOCAL cFileName