summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Packaging')
-rw-r--r--Swift/Packaging/Debian/.dockerignore1
-rw-r--r--Swift/Packaging/Debian/.gitignore4
-rw-r--r--Swift/Packaging/Debian/Dockerfile.package.in30
-rw-r--r--Swift/Packaging/Debian/Dockerfile.source17
-rwxr-xr-xSwift/Packaging/Debian/Testing/swift-distr-tests.sh16
-rw-r--r--Swift/Packaging/Debian/changelog.debian-unstable18
-rw-r--r--Swift/Packaging/Debian/debian/control.in2
-rw-r--r--Swift/Packaging/Debian/debian/copyright2
-rwxr-xr-xSwift/Packaging/Debian/debian/rules4
-rwxr-xr-xSwift/Packaging/Debian/package.sh12
-rwxr-xr-xSwift/Packaging/Debian/package_all_platforms.sh10
-rwxr-xr-xSwift/Packaging/Debian/package_docker.sh70
-rw-r--r--Swift/Packaging/Debian/update_debian_repo.sh17
-rw-r--r--Swift/Packaging/SConscript29
-rw-r--r--Swift/Packaging/WiX/Swift.wxs143
-rw-r--r--Swift/Packaging/WiX/Swift_en-us.wxl4
-rw-r--r--Swift/Packaging/WiX/include.xslt12
17 files changed, 356 insertions, 35 deletions
diff --git a/Swift/Packaging/Debian/.dockerignore b/Swift/Packaging/Debian/.dockerignore
new file mode 100644
index 0000000..5d238e7
--- /dev/null
+++ b/Swift/Packaging/Debian/.dockerignore
@@ -0,0 +1 @@
+**/out
diff --git a/Swift/Packaging/Debian/.gitignore b/Swift/Packaging/Debian/.gitignore
index 5401ae0..9c8f275 100644
--- a/Swift/Packaging/Debian/.gitignore
+++ b/Swift/Packaging/Debian/.gitignore
@@ -1,3 +1,7 @@
/swift-*
/swift_*
/libswiften*
+/out/
+/swift-src/
+swift-im*.orig.tar.gz
+*.tmp.package
diff --git a/Swift/Packaging/Debian/Dockerfile.package.in b/Swift/Packaging/Debian/Dockerfile.package.in
new file mode 100644
index 0000000..b53d477
--- /dev/null
+++ b/Swift/Packaging/Debian/Dockerfile.package.in
@@ -0,0 +1,30 @@
+FROM __DISTRO__
+MAINTAINER packages@swift.im
+
+ENV DEBIAN_VERSION=__DEBIAN_VERSION__
+
+# Make sure nothing needs an interactive prompt
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN \
+ apt-get -qq update && \
+ apt-get install -y lintian devscripts scons build-essential dh-make pkg-config libssl-dev qt5-default libqt5x11extras5-dev libqt5webkit5-dev qtmultimedia5-dev qttools5-dev-tools qt5-image-formats-plugins libqt5svg5-dev libminiupnpc-dev libnatpmp-dev libhunspell-dev libxml2-dev libxss-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev libidn11-dev docbook-xsl docbook-xml xsltproc libxml2-utils libsqlite3-dev zlib1g-dev help2man && \
+ apt-get clean
+
+RUN mkdir /swift-packages
+COPY * /swift-packages/
+
+CMD \
+ gpg --allow-secret-key-import --import /gpg-keys/*.asc && \
+ cd /swift-packages && \
+ tar xf swift-im_${DEBIAN_VERSION}*.orig.tar.gz && \
+ tar xf swift-im_${DEBIAN_VERSION}*.debian.tar.xz -C /swift-packages/swift-im-${DEBIAN_VERSION}/ && \
+ cd swift-im-${DEBIAN_VERSION} && \
+ debuild -i -I -b --lintian-opts --profile debian --pedantic && \
+ cd /swift-packages/ && \
+ rm -rf /swift-packages/swift-im-${DEBIAN_VERSION}/ && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*.orig.tar.gz && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*.debian.tar.xz && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*.dsc && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*_source.* && \
+ mv * /out/
diff --git a/Swift/Packaging/Debian/Dockerfile.source b/Swift/Packaging/Debian/Dockerfile.source
new file mode 100644
index 0000000..3c23b2c
--- /dev/null
+++ b/Swift/Packaging/Debian/Dockerfile.source
@@ -0,0 +1,17 @@
+FROM debian:stretch
+VOLUME ["/gpg-keys"]
+MAINTAINER packages@swift.im
+
+RUN \
+ apt-get -qq update && \
+ apt-get install -y lintian devscripts scons build-essential pkg-config libssl-dev qt5-default libqt5x11extras5-dev libqt5webkit5-dev qtmultimedia5-dev qttools5-dev-tools qt5-image-formats-plugins libqt5svg5-dev libminiupnpc-dev libnatpmp-dev libhunspell-dev libxml2-dev libxss-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev libidn11-dev docbook-xsl docbook-xml xsltproc libxml2-utils libsqlite3-dev zlib1g-dev help2man && \
+ apt-get clean
+
+COPY swift-src /swift-src
+
+CMD \
+ gpg --allow-secret-key-import --import /gpg-keys/*.asc && \
+ cd /swift-src && \
+ mv swift-im_*.orig.tar.gz ../ && \
+ debuild -i -I -S --lintian-opts --pedantic && \
+ mv /swift-im* /out/
diff --git a/Swift/Packaging/Debian/Testing/swift-distr-tests.sh b/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
index 8d03282..e817974 100755
--- a/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
+++ b/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
@@ -40,25 +40,31 @@ arr[0,0]="ubuntu"
arr[0,1]="http://archive.ubuntu.com/ubuntu"
arr[0,2]="xenial"
-#Ubuntu yakkety
+#Ubuntu artful
arr[1,0]="ubuntu"
arr[1,1]="http://archive.ubuntu.com/ubuntu"
-arr[1,2]="yakkety"
+arr[1,2]="artful"
#Debian jessie
arr[2,0]="debian"
arr[2,1]="http://deb.debian.org/debian/"
arr[2,2]="jessie"
-#Debian sid
+#Debian stretch
arr[3,0]="debian"
arr[3,1]="http://deb.debian.org/debian/"
-arr[3,2]="sid"
+arr[3,2]="stretch"
+
+#Debian sid
+arr[4,0]="debian"
+arr[4,1]="http://deb.debian.org/debian/"
+arr[4,2]="sid"
+
DIST="$1"
RETURN_VALUE=0
-for counter in {0..3}
+for counter in {0..4}
do
# for ARCH in "amd64" "i386"
for ARCH in "amd64"
diff --git a/Swift/Packaging/Debian/changelog.debian-unstable b/Swift/Packaging/Debian/changelog.debian-unstable
index ca9ffec..f2bf2c5 100644
--- a/Swift/Packaging/Debian/changelog.debian-unstable
+++ b/Swift/Packaging/Debian/changelog.debian-unstable
@@ -1,3 +1,21 @@
+swift-im (4.0.3-1) UNRELEASED; urgency=medium
+
+ * New chat theme including a new font
+ * Support for message carbons (XEP-0280)
+ * Enabled trellis mode as a default feature, allowing several tiled chats windows to be shown at once
+ * Redesigned keyword highlighting
+ * Improve date formatting
+ * Fix Last Message Correction in multi client scenarios
+ * Fix UI layout issue for translations that require right-to-left (RTL) layout
+ * Fix UX issues in trellis mode
+ * Improvements to font size handling in the chat theme
+ * Add AppImage for Linux 64-bit as a supported platform
+ * Improved spell checker support on Linux
+ * Allow setting vCard on servers that do not return an empty vCard on fresh accounts
+ * And assorted smaller features and usability enhancements. Closes: 840151, 889062
+
+ -- Kevin Smith <kevin@kismith.co.uk> Thu, 03 Jan 2019 13:59:07 +0100
+
swift-im (3.0.4-1) unstable; urgency=low
* New upstream release
diff --git a/Swift/Packaging/Debian/debian/control.in b/Swift/Packaging/Debian/debian/control.in
index 26544e5..e779f21 100644
--- a/Swift/Packaging/Debian/debian/control.in
+++ b/Swift/Packaging/Debian/debian/control.in
@@ -3,7 +3,7 @@ Section: net
Priority: optional
Maintainer: Swift Package Maintainer <packages@swift.im>
Uploaders: Remko Tronçon <dev@el-tramo.be>, Kevin Smith <kevin@kismith.co.uk>
-Build-Depends: debhelper (>= 9), scons (>= 1.2.0), libssl-dev (>= 0.9.8g), qtbase5-dev (>= 5.0.0), qtchooser, qtbase5-dev-tools (>= 5.0.0), libqt5x11extras5-dev (>= 5.0.0), libqt5webkit5-dev (>= 5.0.0), qtmultimedia5-dev (>=5.0.0), qttools5-dev-tools (>=5.0.0), qt5-image-formats-plugins (>=5.0.0), libqt5svg5-dev (>=5.0.0), libxml2-dev (>= 2.7.6), libxss-dev (>= 1.2.0), libboost-dev (>= 1.34.1), libboost-filesystem-dev (>= 1.34.1), libboost-program-options-dev (>= 1.34.1), libboost-regex-dev (>= 1.34.1), libboost-signals-dev (>= 1.34.1), libboost-system-dev (>= 1.34.1), libboost-thread-dev (>= 1.34.1), libboost-date-time-dev (>= 1.34.1), libidn11-dev (>= 1.10), docbook-xsl (>= 1.75.0), docbook-xml (>= 4.5), xsltproc, libxml2-utils, libnatpmp-dev, libminiupnpc-dev, libsqlite3-dev, libhunspell-dev, zlib1g-dev
+Build-Depends: debhelper (>= 9), scons (>= 1.2.0), libssl-dev (>= 0.9.8g), qtbase5-dev (>= 5.0.0), qtchooser, qtbase5-dev-tools (>= 5.0.0), libqt5x11extras5-dev (>= 5.0.0), libqt5webkit5-dev (>= 5.0.0), qtmultimedia5-dev (>=5.0.0), qttools5-dev-tools (>=5.0.0), qt5-image-formats-plugins (>=5.0.0), libqt5svg5-dev (>=5.0.0), libxml2-dev (>= 2.7.6), libxss-dev (>= 1.2.0), libboost-dev (>= 1.34.1), libboost-filesystem-dev (>= 1.34.1), libboost-program-options-dev (>= 1.34.1), libboost-regex-dev (>= 1.34.1), libboost-signals-dev (>= 1.34.1), libboost-system-dev (>= 1.34.1), libboost-thread-dev (>= 1.34.1), libboost-date-time-dev (>= 1.34.1), libidn11-dev (>= 1.10), docbook-xsl (>= 1.75.0), docbook-xml (>= 4.5), xsltproc, libxml2-utils, libnatpmp-dev, libminiupnpc-dev, libsqlite3-dev, libhunspell-dev, zlib1g-dev, help2man
Standards-Version: 3.9.8
Vcs-Git: git://swift.im/swift
Vcs-Browser: http://swift.im/git/swift
diff --git a/Swift/Packaging/Debian/debian/copyright b/Swift/Packaging/Debian/debian/copyright
index a0c2c79..9219930 100644
--- a/Swift/Packaging/Debian/debian/copyright
+++ b/Swift/Packaging/Debian/debian/copyright
@@ -3,7 +3,7 @@ with help from Olly Betts <olly@survex.com>.
The upstream sources were obtained from http://swift.im.
-Copyright (C) 2010-2016 Isode Limited.
+Copyright (C) 2010-2019 Isode Limited.
Licensed under the GNU General Public License.
See /usr/share/common-licenses/GPL-3 for the full license.
diff --git a/Swift/Packaging/Debian/debian/rules b/Swift/Packaging/Debian/debian/rules
index 87c551b..ed432bb 100755
--- a/Swift/Packaging/Debian/debian/rules
+++ b/Swift/Packaging/Debian/debian/rules
@@ -4,7 +4,7 @@
export PYTHONDONTWRITEBYTECODE=1
export QT_SELECT=qt5
-SCONS_FLAGS=V=1 qt5=1 optimize=1 debug=1 allow_warnings=1 swiften_dll=1 docbook_xsl=/usr/share/xml/docbook/stylesheet/docbook-xsl docbook_xml=/usr/share/xml/docbook/schema/dtd/4.5 linkflags="$(shell dpkg-buildflags --get LDFLAGS)" ccflags="$(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)"
+SCONS_FLAGS=V=1 qt5=1 optimize=1 debug=1 allow_warnings=1 swiften_dll=1 help2man=1 docbook_xsl=/usr/share/xml/docbook/stylesheet/docbook-xsl docbook_xml=/usr/share/xml/docbook/schema/dtd/4.5 linkflags="$(shell dpkg-buildflags --get LDFLAGS)" ccflags="$(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)"
SCONS_INSTALL_BASE=$(CURDIR)/debian/tmp
SCONS_INSTALL_FLAGS=SWIFT_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr SWIFTEN_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr
SWIFT_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr SWIFTEN_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr
@@ -21,7 +21,7 @@ override_dh_clean:
override_dh_configure:
override_dh_auto_build:
- scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) Swift Swiften
+ scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) Swift Swiften debian/swift-im.1 debian/swiften-config.1
override_dh_auto_install:
scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) $(SCONS_INSTALL_FLAGS) $(SCONS_INSTALL_BASE)
diff --git a/Swift/Packaging/Debian/package.sh b/Swift/Packaging/Debian/package.sh
index d19f5dc..62dfff0 100755
--- a/Swift/Packaging/Debian/package.sh
+++ b/Swift/Packaging/Debian/package.sh
@@ -95,18 +95,6 @@ cat $DIRNAME/debian/control.in | sed -e "s/%SWIFTEN_SOVERSION%/$SWIFTEN_SOVERSIO
rm $DIRNAME/debian/control.in
mv $DIRNAME/debian/libswiften.install $DIRNAME/debian/libswiften$SWIFTEN_SOVERSION.install
cat ../../../COPYING.thirdparty | tail -n +3 >> $DIRNAME/debian/copyright
-# Generate updated man-page if possible
-if type "help2man" > /dev/null 2>&1; then
- if [ -f ../../QtUI/swift-im ]; then
- help2man -m "Swift Manual" -S "Swift" -n "swift-im" -N ../../QtUI/swift-im > $DIRNAME/debian/swift-im.1
- fi
- if [ -f ../../../Swiften/Config/swiften-config ]; then
- help2man -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N ../../../Swiften/Config/swiften-config > $DIRNAME/debian/swiften-config.1
- fi
-else
- >2& echo "Unable to generate man pages. Please ensure that help2man is installed"
- exit 1;
-fi
# Build
cd $DIRNAME
diff --git a/Swift/Packaging/Debian/package_all_platforms.sh b/Swift/Packaging/Debian/package_all_platforms.sh
index 097fe38..afd0621 100755
--- a/Swift/Packaging/Debian/package_all_platforms.sh
+++ b/Swift/Packaging/Debian/package_all_platforms.sh
@@ -24,9 +24,15 @@ export SWIFT_FORCE_LUCID="yep"
unset SWIFT_FORCE_LUCID
./package.sh
-for distro in xenial yakkety jessie sid; do
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ];
+then
+ platformsarray=( xenial artful jessie stretch sid )
+else
+ platformsarray=( $SWIFT_PACKAGE_PLATFORMS )
+fi
+
+for distro in "${platformsarray[@]}"; do
for arch in amd64; do
pbuilder-dist $distro $arch build *.dsc
done
done
-
diff --git a/Swift/Packaging/Debian/package_docker.sh b/Swift/Packaging/Debian/package_docker.sh
new file mode 100755
index 0000000..7fd1a3e
--- /dev/null
+++ b/Swift/Packaging/Debian/package_docker.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $(readlink -f $0 || realpath $0))
+export PYTHONPATH=../../../BuildTools/SCons
+VERSION=${VERSION:=`../../../BuildTools/GetBuildVersion.py swift`}
+DEBIAN_VERSION=`../../../BuildTools/DebianizeVersion.py $VERSION`
+SWIFTEN_SOVERSION=`../../../BuildTools/GetBuildVersion.py swift --major`
+SWIFT_SOURCE_DIR=swift-im-$DEBIAN_VERSION
+TARBALLBARE="swift-im_$DEBIAN_VERSION.orig.tar.gz"
+TARBALL="${SHARED_DIR}${TARBALLBARE}"
+# DEVATTN there is an issue with some versions of Qt(5.11.1) and docker see https://bugreports.qt.io/browse/QTBUG-64490. Workaround is to add privileged flag
+if [ -z ${DOCKERRUNEXTRAFLAGS+x} ];
+then
+ DOCKERRUNEXTRAFLAGS="--privileged"
+fi
+
+rm -rf $SWIFT_SOURCE_DIR
+git clone ../../../.git $SWIFT_SOURCE_DIR
+
+rm -rf $SWIFT_SOURCE_DIR/.git
+find $SWIFT_SOURCE_DIR -name .gitignore | xargs rm -f
+find $SWIFT_SOURCE_DIR/3rdParty -type f | grep -v uuid | grep -v SConscript | grep -v miniupnp | grep -v natpmp || xargs rm -f
+find $SWIFT_SOURCE_DIR/3rdParty -depth -empty -type d -exec rmdir {} \;
+rm -rf $SWIFT_SOURCE_DIR/3rdParty/SCons
+rm -rf $SWIFT_SOURCE_DIR/Swift/Packaging/Debian
+rm -rf $SWIFT_SOURCE_DIR/BuildTools/DocBook/Fonts
+rm -rf $SWIFT_SOURCE_DIR/BuildTools/Git/Hooks/commit-msg
+echo $VERSION > $SWIFT_SOURCE_DIR/VERSION.swift
+
+tar czf $TARBALLBARE $SWIFT_SOURCE_DIR
+cp $TARBALLBARE $SWIFT_SOURCE_DIR
+
+cp -r debian $SWIFT_SOURCE_DIR/debian
+../../../BuildTools/UpdateDebianChangelog.py $SWIFT_SOURCE_DIR/debian/changelog $DEBIAN_VERSION
+
+cat $SWIFT_SOURCE_DIR/debian/control.in | sed -e "s/%SWIFTEN_SOVERSION%/$SWIFTEN_SOVERSION/g" | sed -e "s/%WEBKIT_DEPENDENCY%/$WEBKIT_DEPENDENCY/g" > $SWIFT_SOURCE_DIR/debian/control
+rm $SWIFT_SOURCE_DIR/debian/control.in
+mv $SWIFT_SOURCE_DIR/debian/libswiften.install $SWIFT_SOURCE_DIR/debian/libswiften$SWIFTEN_SOVERSION.install
+cat ../../../COPYING.thirdparty | tail -n +3 >> $SWIFT_SOURCE_DIR/debian/copyright
+
+rm -rf swift-src
+mv $SWIFT_SOURCE_DIR swift-src
+docker build -t swift/swiftsourcebuilder -f Dockerfile.source .
+mkdir -p out/source
+docker run --rm -v`pwd`/gpg-keys:/gpg-keys -v`pwd`/out/source:/out swift/swiftsourcebuilder
+
+TMP_DOCKERFILE=Dockerfile.tmp.package
+
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ];
+then
+ platformsarray=( ubuntu:bionic ubuntu:cosmic debian:stretch debian:sid )
+else
+ platformsarray=( $SWIFT_PACKAGE_PLATFORMS )
+fi
+
+for distro in "${platformsarray[@]}";
+do
+ if [ -f $TMP_DOCKERFILE ];
+ then
+ rm $TMP_DOCKERFILE
+ fi
+ cat Dockerfile.package.in | sed -e "s/__DISTRO__/$distro/" -e "s/__DEBIAN_VERSION__/$DEBIAN_VERSION/" > $TMP_DOCKERFILE
+ docker build -t swift/packager -f $TMP_DOCKERFILE out/source
+ OUT_DIR="out/${distro//\://}"
+ echo $OUT_DIR
+ mkdir -p $OUT_DIR
+ docker run --rm $DOCKERRUNEXTRAFLAGS -v`pwd`/gpg-keys:/gpg-keys -v`pwd`/$OUT_DIR:/out swift/packager
+done
diff --git a/Swift/Packaging/Debian/update_debian_repo.sh b/Swift/Packaging/Debian/update_debian_repo.sh
index d62a376..fc736ed 100644
--- a/Swift/Packaging/Debian/update_debian_repo.sh
+++ b/Swift/Packaging/Debian/update_debian_repo.sh
@@ -73,14 +73,25 @@ command -v reprepro >/dev/null 2>&1 || { echo >&2 "This script requires aptly bu
mkdir -p $APT_REPO_ROOT
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ]; then
+ platformsarray=( bionic cosmic stretch sid )
+else
+ platformsarray=( $SWIFT_PACKAGE_PLATFORMS )
+fi
+
# distros
for full_distribution_path in $INCOMING_FOLDER/{debian,ubuntu}/*; do
distro_version=`basename $full_distribution_path`
distro_name=$(basename `dirname $full_distribution_path`)
distro_reprepro_root=${APT_REPO_ROOT}/${distro_name}/${distro_version}
- # ensure reprepro diretctory for this distribution version is present
- if [ ! -d "$distro_preprepro_root" ]; then
+ if ! [[ ${platformsarray[@]} == *"$distro_version"* ]]; then
+ echo "$distro_version was not found in SWIFT_PACKAGE_PLATFORMS. Skipping..."
+ continue
+ fi
+
+ # ensure reprepro directory for this distribution version is present
+ if [ ! -d "$distro_reprepro_root" ]; then
echo "Create distribution repository for $distro_name/$distro_version"
mkdir -p $distro_reprepro_root
mkdir -p ${distro_reprepro_root}/conf
@@ -89,7 +100,7 @@ for full_distribution_path in $INCOMING_FOLDER/{debian,ubuntu}/*; do
write_reprepo_conf_incoming_to_file "${distro_reprepro_root}/conf/incoming" "$full_distribution_path"
fi
- # This is workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808558
+ # This is workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808558
# and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843402
if [ "$distro_name/$distro_version" = "debian/sid" ]; then
sed -i '/dbgsym/ d' $full_distribution_path/*.changes
diff --git a/Swift/Packaging/SConscript b/Swift/Packaging/SConscript
new file mode 100644
index 0000000..fda5182
--- /dev/null
+++ b/Swift/Packaging/SConscript
@@ -0,0 +1,29 @@
+Import("env")
+import os
+
+################################################################################
+# Build
+################################################################################
+
+if env["SCONS_STAGE"] == "build" :
+ help2man = env.WhereIs('help2man', os.environ['PATH'])
+ if help2man:
+ env['HELP2MAN'] = help2man
+ env['HELP2MANSTR'] = "HELP2MAN $TARGET"
+
+ if Dir("#/debian").exists():
+ # This is needed for debian packaging using pbuilder which expects
+ # generated man pages in this location.
+ env['HELP2MAN_DEBIAN_DIR'] = "#/debian"
+ else:
+ env['HELP2MAN_DEBIAN_DIR'] = "Debian/debian"
+
+ swiftenConfigHelp = env.Command(
+ target='$HELP2MAN_DEBIAN_DIR/swiften-config.1', source='#/Swiften/Config/swiften-config',
+ action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR"))
+ swiftHelp = env.Command(
+ target='$HELP2MAN_DEBIAN_DIR/swift-im.1', source='#/Swift/QtUI/swift-im',
+ action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "Swift" -n "swift-im" -N "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./Swiften $SOURCE" > $TARGET', cmdstr = "$HELP2MANSTR"))
+ else:
+ print("Enabled help2man but help2man is not in the PATH of the current environment.")
+ Exit(1)
diff --git a/Swift/Packaging/WiX/Swift.wxs b/Swift/Packaging/WiX/Swift.wxs
index 1e8d129..a2e8dd6 100644
--- a/Swift/Packaging/WiX/Swift.wxs
+++ b/Swift/Packaging/WiX/Swift.wxs
@@ -3,18 +3,29 @@
<!-- For a sensible tutorial on WiX, see http://wix.tramontana.co.hu/tutorial -->
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
-
<?include variables.wxs ?>
<Product Name='Swift' Id='*' UpgradeCode='D7F276D5-BA67-421E-817B-9E7AB4B7D2BF' Language='1033' Codepage='1252' Version='$(var.Version)' Manufacturer='Swift.im'>
- <Package Id='*' Keywords='Installer' Description="Swift Installer" Comments="Swift is available under the GPL version 3" Manufacturer="Swift.im" InstallerVersion='300' Languages='1033' Compressed='yes' SummaryCodepage='1252' InstallScope="perMachine"/>
+ <Package Id='*' Keywords='Installer' Description="Swift Installer" Comments="Swift is available under the GPL version 3" Manufacturer="Swift.im" InstallerVersion='500' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
+ <Property Id="ALLUSERS" Value="2" />
+ <Property Id="MSIINSTALLPERUSER" Value="1" />
+ <Property Id="WIXUIVCREDISTINSTALL" Value="0" />
+
+ <Property Id="VCREDISTINSTALLED">
+ <RegistrySearch Id="VCREDISTINSTALLED"
+ Root="HKLM"
+ Key="SOFTWARE\Wow6432Node\Microsoft\VisualStudio\$(var.MsvcDotVersion)\VC\Runtimes\$(sys.BUILDARCH)"
+ Name="Installed"
+ Type="raw" />
+
+ </Property>
<Media Id='1' Cabinet='Swift.cab' EmbedCab='yes'/>
<!-- Schedule the upgrade to afterInstallExecute means that MSI will first install the new version
over the existing version and run the uninstall of the old version afterwards. This way shortcuts
are not recreated on every new installation and pinned shortcuts stay alive.
However this requires that the components for installed files with the same filename will always
- have the same GUID (do not run heat.exe with -gg flag) or else when MSI removes the components
+ have the same GUID (do not run heat.exe with -gg flag) or else when MSI removes the components
of the old version with the same filename as components of the new version it will delete the
files that belong to components of the new version.-->
<MajorUpgrade Schedule="afterInstallExecute" DowngradeErrorMessage="A newer version is already installed. Remove this version if you wish to downgrade." />
@@ -25,6 +36,9 @@
-->
<Directory Id='ProgramFilesFolder' Name='PFiles'>
+ <Directory Id="APPLICATIONFOLDER" Name="Swift">
+ </Directory>
+
<!--<Directory Id='INSTALLDIR' Name='Swift'>
</Directory>-->
</Directory>
@@ -42,8 +56,11 @@
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
+ <Property Id="WixAppFolder" Value="WixPerUserFolder" />
+
<Feature Id='Core' Level='1' Title='Swift' Description='All necessary Swift files' Display='expand' ConfigurableDirectory='INSTALLDIR' AllowAdvertise='no' Absent='disallow'>
<ComponentGroupRef Id='Files' />
+ <ComponentGroupRef Id='VCFiles' />
<!--<ComponentRef Id='Manual' />-->
</Feature>
@@ -53,23 +70,133 @@
<!--<UIRef Id='WixUI_Advanced'/>-->
<!--<UIRef Id="WixUI_Minimal"/>-->
- <UIRef Id="WixUI_Mondo"/>
+ <!--UIRef Id="WixUI_Mondo"/-->
+ <UIRef Id="WixUI_Swift"/>
+
<WixVariable Id='WixUILicenseRtf' Value='COPYING.rtf'/>
<Icon Id="Swift.exe" SourceFile="Swift.exe" />
<Property Id="ARPPRODUCTICON" Value="Swift.exe"/> <!-- The icon in the "Programs" dialog -->
- <!--
- VC Redistributable
+ <!--
+ VC Redistributable
-->
<Binary Id="CRTBinary" SourceFile="$(var.VCCRTFile)"/>
<CustomAction Id="CRTAction" Impersonate="no" Return="asyncNoWait" Execute="deferred" BinaryKey="CRTBinary" ExeCommand="/passive"/>
-
+ <InstallUISequence>
+ <!-- Suppress FindRelatedProducts untill the user selects the scope of the install -->
+ <FindRelatedProducts Suppress="yes" />
+ </InstallUISequence>
<InstallExecuteSequence>
- <Custom Action='CRTAction' After='InstallInitialize'/>
+ <Custom Action='CRTAction' After='InstallInitialize'>(NOT VCREDISTINSTALLED AND ALLUSERS = 1) OR WIXUIVCREDISTINSTALL = 1</Custom>
</InstallExecuteSequence>
</Product>
+ <Fragment>
+ <DirectoryRef Id="INSTALLDIR">
+ <Component Id="msvcp.dll" Guid="*">
+ <Condition>(NOT (VCREDISTINSTALLED OR ALLUSERS = 1)) AND WIXUIVCREDISTINSTALL = 0 </Condition>
+ <File Id="msvcp$(var.MsvcVersion).dll" KeyPath="yes" Source="$(var.VCCRTPath)\msvcp$(var.MsvcVersion).dll" />
+ </Component>
+ <Component Id="vcruntime.dll" Guid="*">
+ <Condition>(NOT (VCREDISTINSTALLED OR ALLUSERS = 1)) AND WIXUIVCREDISTINSTALL = 0 </Condition>
+ <?if $(var.MsvcVersion) > "120"?>
+ <File Id="vcruntime$(var.MsvcVersion).dll" KeyPath="yes" Source="$(var.VCCRTPath)\vcruntime$(var.MsvcVersion).dll" />
+ <?else?>
+ <File Id="msvcr$(var.MsvcVersion).dll" KeyPath="yes" Source="$(var.VCCRTPath)\msvcr$(var.MsvcVersion).dll" />
+ <?endif?>
+ </Component>
+ </DirectoryRef>
+ </Fragment>
+ <Fragment>
+ <ComponentGroup Id="VCFiles">
+ <ComponentRef Id="msvcp.dll" />
+ <ComponentRef Id="vcruntime.dll" />
+ </ComponentGroup>
+ </Fragment>
+ <Fragment>
+
+ <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" />
+ <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" />
+
+ <!-- This is Based on WixUI_Mondo, but it adds an InstallScopeDlg dialog -->
+ <UI Id="WixUI_Swift">
+ <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
+ <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
+ <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
+
+ <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
+ <Property Id="WixUI_Mode" Value="Mondo" />
+
+ <DialogRef Id="ErrorDlg" />
+ <DialogRef Id="FatalError" />
+ <DialogRef Id="FilesInUse" />
+ <DialogRef Id="MsiRMFilesInUse" />
+ <DialogRef Id="PrepareDlg" />
+ <DialogRef Id="ProgressDlg" />
+ <DialogRef Id="ResumeDlg" />
+ <DialogRef Id="UserExit" />
+
+ <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed AND NOT PATCH</Publish>
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
+
+ <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+ <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallScopeDlg" Order="2">LicenseAccepted = "1"</Publish>
+
+ <Publish Dialog="InstallScopeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
+ <!-- override default WixAppFolder of WixPerMachineFolder as standard user won't be shown the radio group to set WixAppFolder -->
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="WixAppFolder" Value="WixPerUserFolder" Order="1">!(wix.WixUISupportPerUser) AND NOT Privileged</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Value="{}" Order="2">WixAppFolder = "WixPerUserFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="ALLUSERS" Value="1" Order="3">WixAppFolder = "WixPerMachineFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Order="4">WixAppFolder = "WixPerUserFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Order="5">WixAppFolder = "WixPerMachineFolder"</Publish>
+ <Publish Dialog="InstallScopeDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
+ <!-- After selecting the scope of the installation, run FindRelatedProducts to find previous versions that needs upgrading -->
+ <Publish Dialog="InstallScopeDlg" Control="Next" Event="DoAction" Value="FindRelatedProducts" Order="6">1</Publish>
+
+ <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg">1</Publish>
+ <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="VCResdistDialog">NOT VCREDISTINSTALLED AND NOT ALLUSERS </Publish>
+ <Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="CustomizeDlg">NOT VCREDISTINSTALLED AND NOT ALLUSERS </Publish>
+ <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="VCResdistDialog">NOT VCREDISTINSTALLED AND NOT ALLUSERS </Publish>
+ <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="VerifyReadyDlg">VCREDISTINSTALLED OR ALLUSERS = 1</Publish>
+ <Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="CustomizeDlg">VCREDISTINSTALLED OR ALLUSERS = 1</Publish>
+ <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="VerifyReadyDlg">VCREDISTINSTALLED OR ALLUSERS = 1</Publish>
+
+ <Dialog Id="VCResdistDialog" Width="260" Height="85" Title="[ProductName] Setup">
+ <Control Id="VcRredistNo" Type="PushButton" X="132" Y="57" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUINo)">
+ <Publish Property="WIXUIVCREDISTINSTALL" Value="0">1</Publish>
+ <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ </Control>
+ <Control Id="VcRredistYes" Type="PushButton" X="72" Y="57" Width="56" Height="17" Text="!(loc.WixUIYes)">
+ <Publish Property="WIXUIVCREDISTINSTALL" Value="1">1</Publish>
+ <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ </Control>
+ <Control Id="Text" Type="Text" X="48" Y="15" Width="194" Height="30" NoPrefix="yes" Text="Visual Studio redistributables installation was not found on your computer. Would you like Swift to install them?" />
+ <Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="!(loc.CancelDlgIconTooltip)" FixedSize="yes" IconSize="32" Text="!(loc.CancelDlgIcon)" />
+ </Dialog>
+
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">WixUI_InstallMode = "Change"</Publish>
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VCResdistDialog" Order="1">NOT VCREDISTINSTALLED AND NOT ALLUSERS</Publish>
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="2">VCREDISTINSTALLED OR ALLUSERS = 1</Publish>
+
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">WixUI_InstallMode = "Update"</Publish>
+
+ <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
+
+ <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
+ </UI>
+ <UIRef Id="WixUI_Common" />
+ </Fragment>
</Wix>
diff --git a/Swift/Packaging/WiX/Swift_en-us.wxl b/Swift/Packaging/WiX/Swift_en-us.wxl
new file mode 100644
index 0000000..780b290
--- /dev/null
+++ b/Swift/Packaging/WiX/Swift_en-us.wxl
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="InstallScopeDlgPerUserDescription">[ProductName] will be installed in a user folder and auto-updates will be enabled. The application be installed only for your user and you do not need to be an Administrator. </String>
+</WixLocalization>
diff --git a/Swift/Packaging/WiX/include.xslt b/Swift/Packaging/WiX/include.xslt
index ec1ad50..df86446 100644
--- a/Swift/Packaging/WiX/include.xslt
+++ b/Swift/Packaging/WiX/include.xslt
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi" xmlns="http://schemas.microsoft.com/wix/2006/wi" exclude-result-prefixes="xsl wix">
<xsl:template match='wix:Directory[@Id="Swift"]/@Id'>
<xsl:attribute name='Id'>INSTALLDIR</xsl:attribute>
@@ -11,4 +11,14 @@
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
+
+ <xsl:template match="wix:Component">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:value-of select="concat(preceding-sibling::text(), ' ')" />
+ <RemoveFile Id="remove_{@Id}" Name="{@Id}" On="install" />
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
</xsl:stylesheet>