From 5d7fa8a78d1e9e738e28a942357e12fec114fc4b Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Sat, 10 Mar 2012 17:15:31 +0200 Subject: [PATCH] contrib: add NSIS to MinGW cross-compilation instructions Ported the NSIS build steps from OBS pidgin-sipe.spec to the top-level MinGW Makefile.mingw. Updated the cross-compilation instructions accordingly. Also noticed that VERSION wasn't set for the cross-compilation approach in src/core/Makefile.mingw. --- ChangeLog | 1 + Makefile.mingw | 41 +++++++++++++++++++++++++++------- NEWS | 3 +++ contrib/mingw-cross-compile/README.txt | 30 ++++++++++++++++++++++--- src/core/Makefile.mingw | 1 + 5 files changed, 65 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7269ab1..369f49d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ version 1.13.0 "Lync & Office365" (2012-XX-XX) * [MS-PRES] SIP-Based Active Directory Search is disabled in Lync - added experimental media TCP transport (Jakub Adam) - make it compile against the latest purple 3.0.x API (Stefan Becker) + - make it compile against the latest glib2 3.31.x API (Stefan Becker) - completed cleanup: core no longer requires libpurple (Stefan Becker) - refactored crypto code, ie. NSS can replaced if necessary (Stefan Becker) - sipe-domino.c is no longer built under UNIX to remove dead code (Stefan Becker) diff --git a/Makefile.mingw b/Makefile.mingw index e0e5ec38..5ea24382 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -1,3 +1,7 @@ +################################### tell Emacs this is a -*- makefile-gmake -*- +# +# Copyright (C) 2012 SIPE Project +# # Makefile.mingw # # Author: pier11@operamail.com @@ -5,8 +9,12 @@ # Date 11 Nov 2009 # Description: Top Makefile for win32 (mingw) port of LCS protocol plugin # +############################################################################### +ifndef PIDGIN_TREE_TOP +# standalone MinGW build export PIDGIN_TREE_TOP := ../pidgin-2.10.0 +endif include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak export CFLAGS=-Werror @@ -17,11 +25,11 @@ export VERSION := $(shell cat VERSION) .PHONY: all clean install msi dev devinst nsis -all: +all: $(MAKE) -C src -f $(MINGW_MAKEFILE) $(MAKE) -C po -f $(MINGW_MAKEFILE) - -dev: + +dev: $(MAKE) -C src -f $(MINGW_MAKEFILE) clean: @@ -30,22 +38,22 @@ clean: rm -f $(WXS_NAME).wix* rm -f $(WXS_NAME)-$(VERSION).msi rm -f pidgin-sipe-$(VERSION).exe - + rmbak: rm -f *~ $(MAKE) -C src -f $(MINGW_MAKEFILE) rmbak - + install: all $(MAKE) -C src -f $(MINGW_MAKEFILE) install $(MAKE) -C po -f $(MINGW_MAKEFILE) install $(MAKE) -C pixmaps -f $(MINGW_MAKEFILE) install - + devinst: dev $(MAKE) -C src -f $(MINGW_MAKEFILE) install - + tests: dev $(MAKE) -C src -f $(MINGW_MAKEFILE) tests - + msi: all PACKAGE_VERSION=$(VERSION) $(WIX3_HOME)/bin/candle $(WXS_NAME).wxs $(WIX3_HOME)/bin/light $(WXS_NAME).wixobj @@ -53,3 +61,20 @@ msi: all nsis: install makensis -DTREETOP=..\\pidgin-2.10.0 -DVERSION=$(VERSION) pidgin-sipe.nsi + +# MinGW cross-compile build (see contrib/mingw-cross-compile/README.txt) +.PHONY: cross-compile-nsis +cross-compile-nsis: + $(MAKE) -f Makefile.mingw install + mv $(PIDGIN_INSTALL_DIR)/plugins $(PIDGIN_INSTALL_DIR)/purple-2 + perl contrib/opensuse-build-service/generate_nsi.pl po/LINGUAS \ + $(PIDGIN_INSTALL_DIR)/pidgin-sipe.nsi + set -e; cd $(PIDGIN_INSTALL_DIR); \ + makensis \ + -DVERSION=$(VERSION) \ + -DMINGW_LIBDIR=. \ + -DMINGW_DATADIR=. \ + pidgin-sipe.nsi + mv $(PIDGIN_INSTALL_DIR)/pidgin-sipe-$(VERSION).exe $(PIDGIN_TREE_TOP) + rm -rf $(PIDGIN_INSTALL_DIR) diff --git a/NEWS b/NEWS index 3d597873..0e86ae0e 100644 --- a/NEWS +++ b/NEWS @@ -3,10 +3,12 @@ version 1.13.0 "Lync & Office365" (2012-XX-XX) * TLS-DSK has been introduced in Lync * mandatory for Office365 accounts * also works for non-public Lync installations + * does not work yet with SSPI on Windows - added [MS-DLX] based Get Info/Contact Search (Stefan Becker) * [MS-PRES] SIP-Based Active Directory Search is disabled in Lync - added experimental media TCP transport (Jakub Adam) - make it compile against the latest purple 3.0.x API (Stefan Becker) + - make it compile against the latest glib2 3.31.x API (Stefan Becker) - completed cleanup: core no longer requires libpurple (Stefan Becker) - refactored crypto code, ie. NSS can replaced if necessary (Stefan Becker) - sipe-domino.c is no longer built under UNIX to remove dead code (Stefan Becker) @@ -16,3 +18,4 @@ version 1.13.0 "Lync & Office365" (2012-XX-XX) - OBS mingw packages now use SSPI instead of NTLM (Stefan Becker) - added NSIS package generation to OBS mingw packages (Stefan Becker) - removed kopete backend. KDE is moving to telepathy (Stefan Becker) + - added MinGW cross-compilation on Linux instructions (Stefan Becker) diff --git a/contrib/mingw-cross-compile/README.txt b/contrib/mingw-cross-compile/README.txt index e6229734..574550f5 100644 --- a/contrib/mingw-cross-compile/README.txt +++ b/contrib/mingw-cross-compile/README.txt @@ -29,12 +29,16 @@ This will most likely work also for other Linux distros, but you'll have to check what names the MinGW cross-compilation packages are for your distro. -If you are trying to build the source code from the git repository you'll -need additional tools installed, at least: +If you are trying to build the source code from the git repository then +you'll need additional tools installed, at least: autoconf automake +If you want to build the NSIS installer package then you'll need to install: + + mingw32-nsis + Build ===== @@ -74,7 +78,7 @@ Build (to compile without SSPI support add " USE_SSPI=" to the command line) -If everything goes will you should now have +If everything goes well you should now have pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...>/src/core/libsipe.dll @@ -82,3 +86,23 @@ which you can copy into your Pidgin Windows installation directory. NOTE: PLEASE make sure that there is NO OTHER libsipe.dll in that installation or in your PATH! + + +NSIS Installer Package +====================== + +After you have successfully executed the build: + + - run (this is one line on the command line!) + + PIDGIN_TREE_TOP=.. make + -C pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...> + -f Makefile.mingw cross-compile-nsis + + (to compile without SSPI support add " USE_SSPI=" to the command line) + +If everything goes well you should now have + + pidgin-sipe-<...REPLACE PIDGIN-SIPE VERSION HERE...>.exe + +which you now can execute on your Windows machine. diff --git a/src/core/Makefile.mingw b/src/core/Makefile.mingw index 4e0a9360..27b304b2 100644 --- a/src/core/Makefile.mingw +++ b/src/core/Makefile.mingw @@ -24,6 +24,7 @@ PIDGIN_TREE_TOP := ../$(OLD_PIDGIN_TREE_TOP) else # MinGW cross-compile build (see contrib/mingw-cross-compile/README.txt) PIDGIN_TREE_TOP := ../../.. +VERSION := $(shell cat ../../VERSION) endif include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak -- 2.11.4.GIT