From 648567c886dd735de521cc640e232a6fc797e862 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 30 Nov 2009 23:05:44 +0000 Subject: [PATCH] 2009-12-01 00:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added cairo links. * contrib/hbwin/wapi_shellapi.c + WAPI_USERISANADMIN() function. Based on xhb's recently added OS_ISUSERANADMIN() function by Peter Rees. Reformatted, renamed and applied fixes/UNICODE/cleanups, usual stuff. * contrib/hbcairo/hbcairo.hbc + Changed libs= for *nix system. Not tested for this cairo, it comes from my local xhgtk hbmk2 files. --- harbour/ChangeLog | 13 +++++++++++++ harbour/INSTALL | 6 ++++++ harbour/contrib/hbcairo/hbcairo.hbc | 4 +++- harbour/contrib/hbwin/wapi_shellapi.c | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e6760b4eac..3c5ae319b8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-01 00:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + + Added cairo links. + + * contrib/hbwin/wapi_shellapi.c + + WAPI_USERISANADMIN() function. Based on xhb's recently added + OS_ISUSERANADMIN() function by Peter Rees. + Reformatted, renamed and applied fixes/UNICODE/cleanups, usual stuff. + + * contrib/hbcairo/hbcairo.hbc + + Changed libs= for *nix system. Not tested for this cairo, + it comes from my local xhgtk hbmk2 files. + 2009-11-30 22:19 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Documented HB_WITH_CAIRO setting. diff --git a/harbour/INSTALL b/harbour/INSTALL index 502d5b49a2..9d2df3d072 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -1250,6 +1250,12 @@ HARBOUR http://alleg.sourceforge.net/ HB_WITH_BLAT - Blat (SMTP client) [win, free, open-source] http://www.blat.net/ + HB_WITH_CAIRO - Cairo [multiplatform, open-source] + http://www.gtk.org/download-windows.html + Direct links, look for these components on page above: + http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.8-2_win32.zip + http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.8-2_win32.zip + http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.39-1_win32.zip HB_WITH_CURL - libcurl (file transfer) [multiplatform, free, open-source] http://curl.haxx.se/ HB_WITH_FIREBIRD - firebird SQL [multiplatform, free, open-source] diff --git a/harbour/contrib/hbcairo/hbcairo.hbc b/harbour/contrib/hbcairo/hbcairo.hbc index 93b5cdc364..9cc43938ce 100644 --- a/harbour/contrib/hbcairo/hbcairo.hbc +++ b/harbour/contrib/hbcairo/hbcairo.hbc @@ -5,4 +5,6 @@ incpaths=. libs=hbcairo -libs=cairo + +{!unix}libs=cairo +{unix}ldflags="`pkg-config --libs cairo`" diff --git a/harbour/contrib/hbwin/wapi_shellapi.c b/harbour/contrib/hbwin/wapi_shellapi.c index 942679bfb1..37170cd39d 100644 --- a/harbour/contrib/hbwin/wapi_shellapi.c +++ b/harbour/contrib/hbwin/wapi_shellapi.c @@ -95,3 +95,22 @@ HB_FUNC( WAPI_SHELLEXECUTE ) #endif } + +HB_FUNC( WAPI_USERISANADMIN ) +{ + BOOL bResult = FALSE; + + HMODULE hLib = LoadLibrary( TEXT( "shell32.dll" ) ); + + if( hLib ) + { + typedef int ( WINAPI * ISUSERANADMIN )( void ); + ISUSERANADMIN pIsUserAnAdmin = ( ISUSERANADMIN ) GetProcAddress( hLib, "IsUserAnAdmin" ); + if( pIsUserAnAdmin ) + bResult = ( pIsUserAnAdmin )(); + + FreeLibrary( hLib ); + } + + hb_retl( bResult ); +}