changeset 27407:b74fa3d29cda

Modify the Windows build/install setup to deal with the perl modules the way the Linux build/install setup does. This wasn't strictly necessary but does make things more nicely parallel.
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 07 Jul 2009 15:44:24 +0000
parents cd390b71b9ff
children 71e8748bc408
files Makefile.mingw libpurple/plugins/perl/common/Makefile.mingw libpurple/win32/global.mak libpurple/win32/targets.mak libpurple/win32/win32dep.c pidgin/plugins/perl/common/Makefile.mingw pidgin/win32/nsis/pidgin-installer.nsi
diffstat 7 files changed, 21 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.mingw	Tue Jul 07 15:42:04 2009 +0000
+++ b/Makefile.mingw	Tue Jul 07 15:44:24 2009 +0000
@@ -129,7 +129,7 @@
 	rm -rf doc/html Doxyfile.mingw
 
 uninstall:
-	rm -rf $(PURPLE_INSTALL_PERLMOD_DIR) $(PIDGIN_INSTALL_PLUGINS_DIR) $(PURPLE_INSTALL_PO_DIR) $(PIDGIN_INSTALL_DIR) $(STRIPPED_RELEASE_DIR)
+	rm -rf $(PURPLE_INSTALL_PERL_DIR) $(PIDGIN_INSTALL_PLUGINS_DIR) $(PURPLE_INSTALL_PO_DIR) $(PIDGIN_INSTALL_DIR) $(STRIPPED_RELEASE_DIR)
 	rm -f ./VERSION
 
 include $(PIDGIN_COMMON_TARGETS)
--- a/libpurple/plugins/perl/common/Makefile.mingw	Tue Jul 07 15:42:04 2009 +0000
+++ b/libpurple/plugins/perl/common/Makefile.mingw	Tue Jul 07 15:44:24 2009 +0000
@@ -97,9 +97,10 @@
 all: $(TARGET).dll $(AUTOSPLIT)
 
 install: all
-	rm -rf $(PURPLE_INSTALL_PERLMOD_DIR)
-	cp -R lib $(PURPLE_INSTALL_PERLMOD_DIR)
-	cp $(TARGET).dll $(PURPLE_INSTALL_PERLMOD_DIR)
+	rm -rf $(PURPLE_INSTALL_PERL_DIR)
+	mkdir -p $(PURPLE_INSTALL_PERL_DIR)
+	cp -R lib/* $(PURPLE_INSTALL_PERL_DIR)
+	cp $(TARGET).dll $(PURPLE_INSTALL_PERL_DIR)/auto/Purple
 
 $(C_FILES): $(PURPLE_CONFIG_H)
 
--- a/libpurple/win32/global.mak	Tue Jul 07 15:42:04 2009 +0000
+++ b/libpurple/win32/global.mak	Tue Jul 07 15:44:24 2009 +0000
@@ -27,10 +27,10 @@
 # Where we installing this stuff to?
 PIDGIN_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
 PURPLE_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
-PIDGIN_INSTALL_PERLMOD_DIR := $(PIDGIN_INSTALL_DIR)/perlmod
 PIDGIN_INSTALL_PLUGINS_DIR := $(PIDGIN_INSTALL_DIR)/plugins
-PURPLE_INSTALL_PERLMOD_DIR := $(PURPLE_INSTALL_DIR)/perlmod
+PIDGIN_INSTALL_PERL_DIR := $(PIDGIN_INSTALL_PLUGINS_DIR)/perl
 PURPLE_INSTALL_PLUGINS_DIR := $(PURPLE_INSTALL_DIR)/plugins
+PURPLE_INSTALL_PERL_DIR := $(PURPLE_INSTALL_PLUGINS_DIR)/perl
 PURPLE_INSTALL_PO_DIR := $(PURPLE_INSTALL_DIR)/locale
 
 # Important (enough) locations in our source code
--- a/libpurple/win32/targets.mak	Tue Jul 07 15:42:04 2009 +0000
+++ b/libpurple/win32/targets.mak	Tue Jul 07 15:44:24 2009 +0000
@@ -37,7 +37,7 @@
 	mkdir -p $(PIDGIN_INSTALL_DIR)
 
 $(PIDGIN_INSTALL_PERLMOD_DIR):
-	mkdir -p $(PURPLE_INSTALL_PERLMOD_DIR)
+	mkdir -p $(PIDGIN_INSTALL_PERL_DIR)
 
 $(PIDGIN_INSTALL_PLUGINS_DIR):
 	mkdir -p $(PIDGIN_INSTALL_PLUGINS_DIR)
@@ -45,3 +45,8 @@
 $(PURPLE_INSTALL_PO_DIR):
 	mkdir -p $(PURPLE_INSTALL_PO_DIR)
 
+#$(PURPLE_INSTALL_PLUGINS_DIR):
+#	mkdir -p $(PURPLE_INSTALL_PLUGINS_DIR)
+
+#$(PURPLE_INSTALL_PERL_DIR):
+#	mkdir -p $(PURPLE_INSTALL_PERL_DIR)
--- a/libpurple/win32/win32dep.c	Tue Jul 07 15:42:04 2009 +0000
+++ b/libpurple/win32/win32dep.c	Tue Jul 07 15:44:24 2009 +0000
@@ -419,8 +419,6 @@
 void wpurple_init(void) {
 	WORD wVersionRequested;
 	WSADATA wsaData;
-	const char *perlenv;
-	char *newenv;
 
 	if (!g_thread_supported())
 		g_thread_init(NULL);
@@ -444,17 +442,6 @@
 		WSACleanup();
 	}
 
-	/* Set Environmental Variables */
-	/* Tell perl where to find Purple's perl modules */
-	perlenv = g_getenv("PERL5LIB");
-	newenv = g_strdup_printf("%s%s%s" G_DIR_SEPARATOR_S "perlmod;",
-		perlenv ? perlenv : "",
-		perlenv ? ";" : "",
-		wpurple_install_dir());
-	if (!g_setenv("PERL5LIB", newenv, TRUE))
-		purple_debug_warning("wpurple", "putenv failed for PERL5LIB\n");
-	g_free(newenv);
-
 	purple_debug_info("wpurple", "wpurple_init end\n");
 }
 
--- a/pidgin/plugins/perl/common/Makefile.mingw	Tue Jul 07 15:42:04 2009 +0000
+++ b/pidgin/plugins/perl/common/Makefile.mingw	Tue Jul 07 15:44:24 2009 +0000
@@ -86,14 +86,15 @@
 
 all: $(TARGET).dll
 
-$(PURPLE_INSTALL_PERLMOD_DIR)/Purple.pm:
+$(PURPLE_INSTALL_PERL_DIR)/Purple.pm:
 	$(MAKE) -C $(PURPLE_PERL_TOP)/common -f $(MINGW_MAKEFILE) install
 
-install: all $(PURPLE_INSTALL_PERLMOD_DIR)/Purple.pm
-	rm -f $(PIDGIN_INSTALL_PERLMOD_DIR)/$(TARGET).dll $(PIDGIN_INSTALL_PERLMOD_DIR)/Pidgin/$(TARGET).pm
-	mkdir -p $(PIDGIN_INSTALL_PERLMOD_DIR)
-	cp $(TARGET).pm $(PIDGIN_INSTALL_PERLMOD_DIR)
-	cp $(TARGET).dll $(PIDGIN_INSTALL_PERLMOD_DIR)
+install: all $(PURPLE_INSTALL_PERL_DIR)/Purple.pm
+	rm -f $(PIDGIN_INSTALL_PERL_DIR)/$(TARGET).dll $(PIDGIN_INSTALL_PERL_DIR)/auto/Pidgin/$(TARGET).pm
+	mkdir -p $(PIDGIN_INSTALL_PERL_DIR)
+	cp $(TARGET).pm $(PIDGIN_INSTALL_PERL_DIR)
+	mkdir -p $(PIDGIN_INSTALL_PERL_DIR)/auto/Pidgin
+	cp $(TARGET).dll $(PIDGIN_INSTALL_PERL_DIR)/auto/Pidgin
 
 $(C_FILES): $(PIDGIN_CONFIG_H)
 
--- a/pidgin/win32/nsis/pidgin-installer.nsi	Tue Jul 07 15:42:04 2009 +0000
+++ b/pidgin/win32/nsis/pidgin-installer.nsi	Tue Jul 07 15:44:24 2009 +0000
@@ -726,7 +726,6 @@
     RMDir "$INSTDIR\ca-certs"
     RMDir /r "$INSTDIR\locale"
     RMDir /r "$INSTDIR\pixmaps"
-    RMDir /r "$INSTDIR\perlmod"
     Delete "$INSTDIR\plugins\autoaccept.dll"
     Delete "$INSTDIR\plugins\buddynote.dll"
     Delete "$INSTDIR\plugins\convcolors.dll"
@@ -775,6 +774,7 @@
     Delete "$INSTDIR\plugins\winprefs.dll"
     Delete "$INSTDIR\plugins\xmppconsole.dll"
     Delete "$INSTDIR\plugins\xmppdisco.dll"
+    RMDir /r "$INSTDIR\plugins\perl"
     RMDir "$INSTDIR\plugins"
     RMDir /r "$INSTDIR\sasl2"
     Delete "$INSTDIR\sounds\purple\alert.wav"