fix plugin linkage and make switching between x86 and x64 much-much easier

This commit is contained in:
berkeviktor@aol.com 2010-03-30 05:43:41 +02:00
parent ca7499fba4
commit 240f43a4c9

View File

@ -1,6 +1,6 @@
diff -Naur xchat-wdk.orig/build/build-x64.bat xchat-wdk/build/build-x64.bat
--- xchat-wdk.orig/build/build-x64.bat 1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/build-x64.bat 2010-03-30 04:31:01 +0200
+++ xchat-wdk/build/build-x64.bat 2010-03-30 05:39:29 +0200
@@ -0,0 +1,20 @@
+@echo off
+set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\mozilla-build\build\xchat-dev64\include;c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x64\include
@ -340,7 +340,7 @@ diff -Naur xchat-wdk.orig/config.h.w32 xchat-wdk/config.h.w32
-#endif
diff -Naur xchat-wdk.orig/plugins/perl/makefile.mak xchat-wdk/plugins/perl/makefile.mak
--- xchat-wdk.orig/plugins/perl/makefile.mak 1970-01-01 01:00:00 +0100
+++ xchat-wdk/plugins/perl/makefile.mak 2010-03-30 01:18:49 +0200
+++ xchat-wdk/plugins/perl/makefile.mak 2010-03-30 05:15:18 +0200
@@ -0,0 +1,29 @@
+include "..\..\src\makeinc.mak"
+
@ -363,7 +363,7 @@ diff -Naur xchat-wdk.orig/plugins/perl/makefile.mak xchat-wdk/plugins/perl/makef
+ perl.exe generate_header
+
+$(TARGET): perl.obj perl.def
+ $(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo perl.obj $(PERLLIB).lib /LIBPATH:$(PERLPATH) /DELAYLOAD:$(PERLLIB).dll DELAYIMP.LIB user32.lib shell32.lib advapi32.lib /def:perl.def
+ $(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo perl.obj $(LDFLAGS) $(PERLLIB).lib /LIBPATH:$(PERLPATH) /DELAYLOAD:$(PERLLIB).dll DELAYIMP.LIB user32.lib shell32.lib advapi32.lib /def:perl.def
+
+clean:
+ del $(TARGET)
@ -392,7 +392,7 @@ diff -Naur xchat-wdk.orig/plugins/perl/perl.c xchat-wdk/plugins/perl/perl.c
#endif
diff -Naur xchat-wdk.orig/plugins/python/makefile.mak xchat-wdk/plugins/python/makefile.mak
--- xchat-wdk.orig/plugins/python/makefile.mak 1970-01-01 01:00:00 +0100
+++ xchat-wdk/plugins/python/makefile.mak 2010-03-30 02:48:35 +0200
+++ xchat-wdk/plugins/python/makefile.mak 2010-03-30 05:15:39 +0200
@@ -0,0 +1,24 @@
+include "..\..\src\makeinc.mak"
+
@ -410,7 +410,7 @@ diff -Naur xchat-wdk.orig/plugins/python/makefile.mak xchat-wdk/plugins/python/m
+ $(CC) $(CFLAGS) -Dusleep=_sleep -DPATH_MAX=255 -c python.c $(GLIB) -I.. -I$(PYTHONPATH)\INCLUDE -DPYTHON_DLL=\"$(PYTHONLIB).dll\"
+
+$(TARGET): python.obj python.def
+ $(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo python.obj $(PYTHONLIB).lib /LIBPATH:$(PYTHONPATH)\LIBS $(PYTHONLIB).lib user32.lib shell32.lib advapi32.lib $(LIBS) /def:python.def
+ $(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo $(LDFLAGS) python.obj $(PYTHONLIB).lib /LIBPATH:$(PYTHONPATH)\LIBS $(PYTHONLIB).lib user32.lib shell32.lib advapi32.lib $(LIBS) /def:python.def
+
+clean:
+ del $(TARGET)
@ -448,7 +448,7 @@ diff -Naur xchat-wdk.orig/plugins/python/python.c xchat-wdk/plugins/python/pytho
#endif
diff -Naur xchat-wdk.orig/plugins/tcl/makefile.mak xchat-wdk/plugins/tcl/makefile.mak
--- xchat-wdk.orig/plugins/tcl/makefile.mak 1970-01-01 01:00:00 +0100
+++ xchat-wdk/plugins/tcl/makefile.mak 2010-03-30 03:10:33 +0200
+++ xchat-wdk/plugins/tcl/makefile.mak 2010-03-30 05:15:52 +0200
@@ -0,0 +1,22 @@
+include "..\..\src\makeinc.mak"
+
@ -466,7 +466,7 @@ diff -Naur xchat-wdk.orig/plugins/tcl/makefile.mak xchat-wdk/plugins/tcl/makefil
+ $(CC) $(CFLAGS) -c tclplugin.c -I$(TCLPATH)\INCLUDE -I../../include -I.. -DTCL_DLL=\"$(TCLLIB).dll\"
+
+$(TARGET): tclplugin.obj tcl.def
+ $(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo tclplugin.obj /LIBPATH:$(TCLPATH)\LIB $(TCLLIB).lib /DELAYLOAD:$(TCLLIB).dll DELAYIMP.LIB /def:tcl.def
+ $(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo $(LDFLAGS) tclplugin.obj /LIBPATH:$(TCLPATH)\LIB $(TCLLIB).lib /DELAYLOAD:$(TCLLIB).dll DELAYIMP.LIB /def:tcl.def
+
+clean:
+ del $(TARGET)
@ -1283,12 +1283,16 @@ diff -Naur xchat-wdk.orig/src/fe-gtk/joind.c xchat-wdk/src/fe-gtk/joind.c
diff -Naur xchat-wdk.orig/src/fe-gtk/makefile.mak xchat-wdk/src/fe-gtk/makefile.mak
--- xchat-wdk.orig/src/fe-gtk/makefile.mak 1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/fe-gtk/makefile.mak 2010-03-30 01:43:55 +0200
@@ -0,0 +1,34 @@
+++ xchat-wdk/src/fe-gtk/makefile.mak 2010-03-30 05:32:43 +0200
@@ -0,0 +1,37 @@
+include "..\makeinc.mak"
+
+LDFLAGS = $(LIBS) /NOLOGO msvcrt_winxp.obj
+#LDFLAGS = $(LIBS) /NOLOGO msvcrt_win2003.obj
+!ifdef x64
+MACHINE_FLAG = /MACHINE:X64
+!else
+MACHINE_FLAG = /MACHINE:X86
+!endif
+
+COMLIB = ..\common\xchatcommon.lib
+PROG = xchat.exe
+
@ -1311,8 +1315,7 @@ diff -Naur xchat-wdk.orig/src/fe-gtk/makefile.mak xchat-wdk/src/fe-gtk/makefile.
+ rc /r xchat.rc
+
+xchat-icon.obj: xchat.res
+ cvtres /NOLOGO /MACHINE:X86 /OUT:xchat-icon.obj xchat.res
+# cvtres /NOLOGO /MACHINE:X64 /OUT:xchat-icon.obj xchat.res
+ cvtres /NOLOGO $(MACHINE_FLAG) /OUT:xchat-icon.obj xchat.res
+
+clean:
+ del *.obj
@ -1422,61 +1425,71 @@ diff -Naur xchat-wdk.orig/src/makefile.mak xchat-wdk/src/makefile.mak
+ del pixmaps\*.h
diff -Naur xchat-wdk.orig/src/makeinc.mak xchat-wdk/src/makeinc.mak
--- xchat-wdk.orig/src/makeinc.mak 1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/makeinc.mak 2010-03-30 03:17:06 +0200
@@ -0,0 +1,115 @@
+### EDIT THESE ################################################
+#OPENSSL = YES
+IPV6 = YES
+#MMX = YES
+++ xchat-wdk/src/makeinc.mak 2010-03-30 05:40:26 +0200
@@ -0,0 +1,125 @@
+#uncomment this to have an x64 build
+#x64 = YES
+
+!ifdef x64
+#############################################################
+#x64 config
+GLIB = -Ic:/mozilla-build/build/xchat-dev64/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/glib-2.0/include
+GTK = -Ic:/mozilla-build/build/xchat-dev64/include/gtk-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/gtk-2.0/include -Ic:/mozilla-build/build/xchat-dev64/include/atk-1.0 -Ic:/mozilla-build/build/xchat-dev64/include/cairo -Ic:/mozilla-build/build/xchat-dev64/include/pango-1.0 -Ic:/mozilla-build/build/xchat-dev64/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/glib-2.0/include -Ic:/mozilla-build/build/xchat-dev64/include/freetype2 -Ic:/mozilla-build/build/xchat-dev64/include -Ic:/mozilla-build/build/xchat-dev64/include/libpng14
+LIBS = /libpath:c:/mozilla-build/build/xchat-dev64/lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib gdi32.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib
+
+LDFLAGS = $(LIBS) /NOLOGO msvcrt_win2003.obj
+
+PERLPATH = c:\mozilla-build\perl-5.10-x64\lib\CORE
+PYTHONPATH = c:\mozilla-build\python-2.6-x64
+TCLPATH = c:\mozilla-build\tcl-8.6-x64
+!else
+#############################################################
+#x86 config
+GLIB = -Ic:/mozilla-build/build/xchat-dev32/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev32/lib/glib-2.0/include
+#GLIB = -Ic:/mozilla-build/build/xchat-dev64/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/glib-2.0/include
+#GLIB = `pkg-config glib-2.0 --msvc-syntax --cflags`
+
+GTK = -Ic:/mozilla-build/build/xchat-dev32/include/gtk-2.0 -Ic:/mozilla-build/build/xchat-dev32/lib/gtk-2.0/include -Ic:/mozilla-build/build/xchat-dev32/include/atk-1.0 -Ic:/mozilla-build/build/xchat-dev32/include/cairo -Ic:/mozilla-build/build/xchat-dev32/include/pango-1.0 -Ic:/mozilla-build/build/xchat-dev32/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev32/lib/glib-2.0/include -Ic:/mozilla-build/build/xchat-dev32/include/freetype2 -Ic:/mozilla-build/build/xchat-dev32/include -Ic:/mozilla-build/build/xchat-dev32/include/libpng14
+#GTK = -Ic:/mozilla-build/build/xchat-dev64/include/gtk-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/gtk-2.0/include -Ic:/mozilla-build/build/xchat-dev64/include/atk-1.0 -Ic:/mozilla-build/build/xchat-dev64/include/cairo -Ic:/mozilla-build/build/xchat-dev64/include/pango-1.0 -Ic:/mozilla-build/build/xchat-dev64/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/glib-2.0/include -Ic:/mozilla-build/build/xchat-dev64/include/freetype2 -Ic:/mozilla-build/build/xchat-dev64/include -Ic:/mozilla-build/build/xchat-dev64/include/libpng14
+#GTK = `pkg-config gtk+-2.0 --msvc-syntax --cflags`
+
+LIBS = /libpath:c:/mozilla-build/build/xchat-dev32/lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib gdi32.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib
+#LIBS = /libpath:c:/mozilla-build/build/xchat-dev64/lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib gdi32.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib
+#LIBS = `pkg-config gtk+-2.0 --msvc-syntax --libs`
+
+# optimize for Pentium and size
+CFLAGS = /Ox
+###############################################################
+LDFLAGS = $(LIBS) /NOLOGO msvcrt_winxp.obj
+
+PERLPATH = c:\mozilla-build\perl-5.10-x86\lib\CORE
+#PERLPATH = c:\mozilla-build\perl-5.10-x64\lib\CORE
+PYTHONPATH = c:\mozilla-build\python-2.6-x86
+TCLPATH = c:\mozilla-build\tcl-8.6-x86
+
+MMX = YES
+!endif
+#############################################################
+
+PERLLIB = perl510
+PERLOUTPUT = xcperl.dll
+
+PYTHONPATH = c:\mozilla-build\python-2.6-x86
+#PYTHONPATH = c:\mozilla-build\python-2.6-x64
+PYTHONLIB = python26
+PYTHONOUTPUT = xcpython.dll
+
+TCLPATH = c:\mozilla-build\tcl-8.6-x86
+#TCLPATH = c:\mozilla-build\tcl-8.6-x64
+TCLLIB = tcl86
+TCLOUTPUT = xctcl.dll
+
+#OPENSSL = YES
+IPV6 = YES
+
+CFLAGS = /Ox
+
+CC = cl
+LINK = link
+CFLAGS = $(CFLAGS) -Dstrcasecmp=stricmp -Dstrncasecmp=strnicmp -Dstrtoull=_strtoui64 /MD /nologo /DWIN32 /DG_DISABLE_CAST_CHECKS
+LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib winmm.lib
+
+!IFDEF IPV6
+!ifdef IPV6
+CFLAGS = $(CFLAGS) -DUSE_IPV6
+LIBS = $(LIBS) ws2_32.lib
+!ELSE
+!else
+LIBS = $(LIBS) wsock32.lib
+!ENDIF
+!endif
+
+!IFDEF OPENSSL
+!ifdef OPENSSL
+CFLAGS = $(CFLAGS) /DUSE_OPENSSL
+LIBS = $(LIBS) libeay32.lib ssleay32.lib
+SSLOBJ = ssl.obj
+!ENDIF
+!endif
+
+COMMON_OBJECTS = \
+cfgfiles.obj \
@ -1535,10 +1548,10 @@ diff -Naur xchat-wdk.orig/src/makeinc.mak xchat-wdk/src/makeinc.mak
+userlistgui.obj \
+xtext.obj
+
+!IFDEF MMX
+!ifdef MMX
+FEGTK_OBJECTS = $(FEGTK_OBJECTS) mmx_cmod.o
+CFLAGS = $(CFLAGS) -DUSE_MMX
+!ENDIF
+!endif
diff -Naur xchat-wdk.orig/src/pixmaps/makefile.mak xchat-wdk/src/pixmaps/makefile.mak
--- xchat-wdk.orig/src/pixmaps/makefile.mak 1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/pixmaps/makefile.mak 2010-03-29 13:15:26 +0200