summary refs log tree commit diff stats
path: root/xchat-wdk.patch
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2010-05-23 01:51:41 +0200
committerberkeviktor@aol.com <berkeviktor@aol.com>2010-05-23 01:51:41 +0200
commit45ea25ed57d9692355d4812c5813ab2a1433f390 (patch)
tree34d649aa8fe50dfb4237a2a6a8419adfcdb98202 /xchat-wdk.patch
parente80acf8ad4f2e36a500ef7f376e69fd753e65231 (diff)
add support for building a portable version
Diffstat (limited to 'xchat-wdk.patch')
-rw-r--r--xchat-wdk.patch45
1 files changed, 41 insertions, 4 deletions
diff --git a/xchat-wdk.patch b/xchat-wdk.patch
index 8f293e9f..2e9bbd14 100644
--- a/xchat-wdk.patch
+++ b/xchat-wdk.patch
@@ -75,7 +75,7 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/plugins/tcl/tclplugin.c xchat-wdk/p
  #include "xchat-plugin.h"
 diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src/common/cfgfiles.c
 --- xchat-wdk.orig/src/common/cfgfiles.c	2009-01-02 06:56:12 +0100
-+++ xchat-wdk/src/common/cfgfiles.c	2010-05-22 03:42:11 +0200
++++ xchat-wdk/src/common/cfgfiles.c	2010-05-23 01:37:33 +0200
 @@ -17,7 +17,6 @@
   */
  
@@ -84,7 +84,36 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src
  #include <stdlib.h>
  #include <string.h>
  #include <stdio.h>
-@@ -676,7 +675,12 @@
+@@ -32,7 +31,11 @@
+ #include "xchatc.h"
+ 
+ #ifdef WIN32
++#ifdef PORTABLE_BUILD
++#define XCHAT_DIR "config"
++#else
+ #define XCHAT_DIR "X-Chat 2"
++#endif
+ #else
+ #define XCHAT_DIR ".xchat2"
+ #endif
+@@ -308,12 +311,16 @@
+ {
+ 	if (!xdir_fs)
+ 	{
++#ifdef PORTABLE_BUILD
++		xdir_fs = XCHAT_DIR;
++#else
+ 		char out[256];
+ 
+ 		if (!get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\"
+ 				"Explorer\\Shell Folders", "AppData", out, sizeof (out)))
+ 			return "./config";
+ 		xdir_fs = g_strdup_printf ("%s\\" XCHAT_DIR, out);
++#endif
+ 	}
+ 	return xdir_fs;
+ }
+@@ -676,7 +683,12 @@
  	prefs.mainwindow_save = 1;
  	prefs.bantype = 2;
  	prefs.input_balloon_time = 20;
@@ -521,8 +550,16 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/xchat.h xchat-wdk/src/co
  #define	X_OK	1
 diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/about.c xchat-wdk/src/fe-gtk/about.c
 --- xchat-wdk.orig/src/fe-gtk/about.c	2010-05-16 09:43:49 +0200
-+++ xchat-wdk/src/fe-gtk/about.c	2010-05-21 21:42:51 +0200
-@@ -117,7 +117,7 @@
++++ xchat-wdk/src/fe-gtk/about.c	2010-05-23 01:47:48 +0200
+@@ -113,11 +113,15 @@
+ 	gtk_container_add (GTK_CONTAINER (vbox), label);
+ 	g_get_charset (&locale);
+ 	(snprintf) (buf, sizeof (buf),
++#ifdef PORTABLE_BUILD
++				"<span size=\"x-large\"><b>"DISPLAY_NAME" "PACKAGE_VERSION"</b></span>\n<span size=\"x-large\"><b>Portable Version</b></span>\n\n"
++#else
+ 				"<span size=\"x-large\"><b>"DISPLAY_NAME" "PACKAGE_VERSION"</b></span>\n\n"
++#endif
  				"%s\n\n"
  #ifdef WIN32
  				/* leave this message to avoid time wasting bug reports! */