From 8a6409240f47a087097fd617e172ee70db48e6ca Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Mon, 30 Aug 2010 02:57:48 +0200 Subject: [PATCH] re-enable xtray, disable plugin-tray if installed --- build/release-x64.bat | 1 + build/release-x86.bat | 1 + plugins/makefile.mak | 7 +++++++ plugins/xtray/makefile.mak | 2 +- src/makeinc.skel | 2 +- xchat-wdk.patch | 11 ++++++++++- 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/build/release-x64.bat b/build/release-x64.bat index fd191414..8136b49f 100644 --- a/build/release-x64.bat +++ b/build/release-x64.bat @@ -37,4 +37,5 @@ copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins\xcperl-512.dll.x64 copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins\xcpython.dll.x64 copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins\xctcl.dll.x64 copy ..\plugins\xdcc\xcxdcc.dll %XCHAT_DEST%\plugins\xcxdcc.dll.x64 +copy ..\plugins\xtray\xtray.dll %XCHAT_DEST%\plugins\xtray.dll.x64 copy %LUA_BIN%\lua51.dll %XCHAT_DEST%\lua51.dll.x64 diff --git a/build/release-x86.bat b/build/release-x86.bat index 803e988b..17d27193 100644 --- a/build/release-x86.bat +++ b/build/release-x86.bat @@ -44,6 +44,7 @@ copy ..\plugins\perl\xcperl-512.dll %XCHAT_DEST%\plugins copy ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins copy ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins copy ..\plugins\xdcc\xcxdcc.dll %XCHAT_DEST%\plugins +copy ..\plugins\xtray\xtray.dll %XCHAT_DEST%\plugins copy %LUA_BIN%\lua51.dll %XCHAT_DEST% xcopy /q /s /i ..\po\locale %XCHAT_DEST%\locale xcopy /q /s /i %GTK_BIN%\..\share\locale %XCHAT_DEST%\share\locale diff --git a/plugins/makefile.mak b/plugins/makefile.mak index 82cc41ec..fdd17b86 100644 --- a/plugins/makefile.mak +++ b/plugins/makefile.mak @@ -9,6 +9,8 @@ all: @-$(MAKE) /nologo /s /f makefile.mak $@ @cd ..\xdcc @-$(MAKE) /nologo /s /f makefile.mak $@ + @cd ..\xtray + @-$(MAKE) /nologo /s /f makefile.mak $@ clean: @del ewc\*.def @@ -36,3 +38,8 @@ clean: @del xdcc\*.exp @del xdcc\*.lib @del xdcc\*.obj + @del xtray\*.def + @del xtray\*.dll + @del xtray\*.exp + @del xtray\*.lib + @del xtray\*.obj diff --git a/plugins/xtray/makefile.mak b/plugins/xtray/makefile.mak index f5fdb44e..bb0d07cf 100644 --- a/plugins/xtray/makefile.mak +++ b/plugins/xtray/makefile.mak @@ -10,7 +10,7 @@ utility.obj \ xchat.obj \ xtray.obj -CPPFLAGS = $(CPPFLAGS) /D_STL70_ /D_STATIC_CPPLIB /EHsc +CPPFLAGS = $(CPPFLAGS) /D_STL70_ /D_STATIC_CPPLIB /EHsc /DUNICODE /D_UNICODE all: $(TRAY_OBJECTS) $(TARGET) diff --git a/src/makeinc.skel b/src/makeinc.skel index 8eb5feb5..0c53bf36 100644 --- a/src/makeinc.skel +++ b/src/makeinc.skel @@ -2,7 +2,7 @@ CC = cl LINK = link CFLAGS = $(CFLAGS) /Ox /c /MD /MP2 /W0 /nologo /DWIN32 /DG_DISABLE_CAST_CHECKS /Dstrcasecmp=stricmp /Dstrncasecmp=strnicmp /Dstrtoull=_strtoui64 /DHAVE_STRTOULL -DUSE_IPV6 CFLAGS = $(CFLAGS) -Ic:\mozilla-build\build\xchat-wdk\plugins -CPPFLAGS = /c /MD /nologo /DWIN32 +CPPFLAGS = /c /MD /W0 /nologo /DWIN32 LDFLAGS = /subsystem:windows /nologo LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib winmm.lib ws2_32.lib diff --git a/xchat-wdk.patch b/xchat-wdk.patch index 66534a27..91a78a08 100644 --- a/xchat-wdk.patch +++ b/xchat-wdk.patch @@ -943,7 +943,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/palette.c xchat-wdk/src/ #include diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/src/fe-gtk/plugin-tray.c --- xchat-wdk.orig/src/fe-gtk/plugin-tray.c 2010-08-14 03:46:21 +0200 -+++ xchat-wdk/src/fe-gtk/plugin-tray.c 2010-08-26 15:53:53 +0200 ++++ xchat-wdk/src/fe-gtk/plugin-tray.c 2010-08-30 02:48:50 +0200 @@ -1,8 +1,7 @@ /* Copyright (C) 2006-2007 Peter Zelezny. */ @@ -1050,6 +1050,15 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/ word[1], network); return XCHAT_EAT_NONE; +@@ -835,7 +834,7 @@ + + xchat_hook_print (ph, "Focus Window", -1, tray_focus_cb, NULL); + +- if (prefs.gui_tray) ++ if (prefs.gui_tray && !((_access( "plugins/xtray.dll", 0 )) != -1)) + tray_init (); + + return 1; /* return 1 for success */ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugingui.c xchat-wdk/src/fe-gtk/plugingui.c --- xchat-wdk.orig/src/fe-gtk/plugingui.c 2010-05-16 05:20:22 +0200 +++ xchat-wdk/src/fe-gtk/plugingui.c 2010-08-26 15:53:53 +0200