From 87b9b46b37fbc9b943b62ad34d4e7d9dd329c157 Mon Sep 17 00:00:00 2001 From: Stefan Gehn Date: Fri, 1 Feb 2008 19:13:51 +0000 Subject: [PATCH] - own win32 resource-file for gkrellm (client) - demand admin-rights on startup (done via manifest file) --- src/Makefile | 6 +++--- src/win32-manifest.xml | 12 +++++++++++ src/win32-resource.h | 5 +++++ src/win32-resource.rc | 47 ++++++++++++++++++++++++++++++++++++++++++ src/winops-win32.c | 4 ++-- 5 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 src/win32-manifest.xml create mode 100644 src/win32-resource.h create mode 100644 src/win32-resource.rc diff --git a/src/Makefile b/src/Makefile index 3d01651..d3a092c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -162,7 +162,7 @@ windows: libgkrellm.a $(MAKE) \ CFLAGS="${CFLAGS} -DWIN32_CLIENT -D_WIN32_WINNT=0x0500 -DWINVER=0x0500" \ LINK_FLAGS="${LINK_FLAGS} -mwindows" \ - EXTRAOBJS="${EXTRAOBJS} winops-win32.o sysdeps/win32.o win32-plugin.o resource.o" \ + EXTRAOBJS="${EXTRAOBJS} winops-win32.o sysdeps/win32.o win32-plugin.o win32-resource.o" \ SYS_LIBS=" -llargeint -lws2_32 -lpdh -lnetapi32 -liphlpapi -lntdll -lintl" \ SMC_LIBS="" \ UNIXOBJS="" \ @@ -314,7 +314,7 @@ sysdeps/win32.o: sysdeps/win32.c $(GKRELLM_H_SYS) winops-win32.o: winops-win32.c $(GKRELLM_H) win32-plugin.o: win32-plugin.c win32-plugin.h win32-libgkrellm.o: win32-libgkrellm.c win32-plugin.h -resource.o: ../resource.rc - windres -I.. -o resource.o ../resource.rc +win32-resource.o: win32-resource.rc win32-resource.h + windres -I.. -o win32-resource.o win32-resource.rc libgkrellm.a: win32-libgkrellm.o ar -cr libgkrellm.a win32-libgkrellm.o diff --git a/src/win32-manifest.xml b/src/win32-manifest.xml new file mode 100644 index 0000000..721d637 --- /dev/null +++ b/src/win32-manifest.xml @@ -0,0 +1,12 @@ + + + + GKrellM + + + + + + + + diff --git a/src/win32-resource.h b/src/win32-resource.h new file mode 100644 index 0000000..d6c7354 --- /dev/null +++ b/src/win32-resource.h @@ -0,0 +1,5 @@ +#ifndef IDC_STATIC +#define IDC_STATIC (-1) +#endif + +#define IDI_ICON3 105 diff --git a/src/win32-resource.rc b/src/win32-resource.rc new file mode 100644 index 0000000..249858b --- /dev/null +++ b/src/win32-resource.rc @@ -0,0 +1,47 @@ +// Generated by ResEdit 1.3.6 +// Copyright (C) 2006-2007 +// http://www.resedit.net + +#include "win32-resource.h" +#include "windows.h" + + +// +// Icon resources +// +IDI_ICON3 ICON "gkrellm.ico" + + +// +// Version Information resources +// +1 VERSIONINFO + FILEVERSION 2,3,1,0 + PRODUCTVERSION 0,0,0,0 + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "FileDescription", "GKrellM" + VALUE "FileVersion", "2.3.1" + VALUE "InternalName", "gkrellm" + VALUE "LegalCopyright", "Copyright (C) 1999-2007 Bill Wilson" + VALUE "OriginalFilename", "gkrellm.exe" + VALUE "ProductName", "GKrellM" + VALUE "ProductVersion", "2.3.1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +// +// Manifest resources +// +1 RT_MANIFEST "win32-manifest.xml" diff --git a/src/winops-win32.c b/src/winops-win32.c index 1fd99b4..a0c4ffa 100644 --- a/src/winops-win32.c +++ b/src/winops-win32.c @@ -21,7 +21,7 @@ #include "gkrellm.h" #include "gkrellm-private.h" -#include "resource.h" +#include "win32-resource.h" #include static UINT WM_GKRELLMCALLBACK; @@ -252,7 +252,7 @@ gboolean gkrellm_winop_draw_rootpixmap_onto_transparent_chart(GkrellmChart *p) gboolean gkrellm_winop_draw_rootpixmap_onto_transparent_panel(GkrellmPanel *p) { if (!p->transparency || !p->drawing_area || !p->drawing_area->window || trans_gc == NULL) - return FALSE; + return FALSE; gdk_gc_set_fill(trans_gc, GDK_SOLID); gdk_gc_set_foreground(trans_gc, &trans_color);